Eventual-Inc / Daft

Distributed DataFrame for Python designed for the cloud, powered by Rust
https://getdaft.io
Apache License 2.0
1.81k stars 112 forks source link

[EXPRESSIONS] `.str.substr` #1934

Closed colin-ho closed 1 week ago

colin-ho commented 3 months ago

substr(start, length=None)

Computes the substr with a given starting index and length.

https://ibis-project.org/reference/expression-strings#ibis.expr.types.strings.StringValue.substr

danila-b commented 1 month ago

Hey! I assume this one is still needed. I would be happy to give it a try and contribute to it.

samster25 commented 1 month ago

@danila-b go for it!

danila-b commented 1 month ago

Thanks @samster25

I opened a draft PR with some initial blueprints. https://github.com/Eventual-Inc/Daft/pull/2269

There is a bit of confusion about data type mapping since substr(start, len) parameters can be of a different datatype at the same time. I could use some pointers or examples on how it can be handled elegantly. https://github.com/Eventual-Inc/Daft/pull/2269#discussion_r1597607896

colin-ho commented 1 week ago

Closes with https://github.com/Eventual-Inc/Daft/pull/2269