Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move strpos, substr functions to datafusion_functions #9849

Merged
merged 19 commits into from
Mar 29, 2024

Conversation

Omega359
Copy link
Contributor

Which issue does this PR close?

Closes #9835

Rationale for this change

As part of #9285 the unicode functions should be migrated to the new datafusion-functions crate in the new structure

What changes are included in this PR?

Code, tests

Are these changes tested?

Yes

Are there any user-facing changes?

No

…ailable feature in DataFusion and building with nightly may not be a good recommendation when getting started.
…_expressions feature flag, move char_length function
# Conflicts:
#	datafusion/expr/src/built_in_function.rs
#	datafusion/functions/src/unicode/mod.rs
#	datafusion/physical-expr/src/unicode_expressions.rs
# Conflicts:
#	datafusion/expr/src/built_in_function.rs
#	datafusion/functions/src/unicode/left.rs
#	datafusion/functions/src/unicode/lpad.rs
#	datafusion/functions/src/unicode/mod.rs
#	datafusion/functions/src/unicode/reverse.rs
#	datafusion/functions/src/unicode/right.rs
#	datafusion/functions/src/unicode/rpad.rs
#	datafusion/physical-expr/src/unicode_expressions.rs
#	datafusion/proto/src/generated/pbjson.rs
#	datafusion/proto/src/generated/prost.rs
#	datafusion/proto/src/logical_plan/from_proto.rs
#	datafusion/proto/src/logical_plan/to_proto.rs
@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Physical Expressions sqllogictest SQL Logic Tests (.slt) labels Mar 29, 2024
@Omega359 Omega359 marked this pull request as ready for review March 29, 2024 12:51
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚂 -- thanks again @Omega359 . We are getting close to having this all migrated. Crazy

super::substr().call(vec![string, position])
}

#[doc = "substring from the `position` with `length` characters"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for bringing both forms of substr along

test_function!(
SubstrFunc::new(),
&[
ColumnarValue::Scalar(ScalarValue::from("joséésoj")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@alamb alamb merged commit c2879f5 into apache:main Mar 29, 2024
24 checks passed
Lordworms pushed a commit to Lordworms/arrow-datafusion that referenced this pull request Apr 1, 2024
* Fix to_timestamp benchmark

* Remove reference to simd and nightly build as simd is no longer an available feature in DataFusion and building with nightly may not be a good recommendation when getting started.

* Fixed missing trim() function.

* Create unicode module in datafusion/functions/src/unicode and unicode_expressions feature flag, move char_length function

* move Left, Lpad, Reverse, Right, Rpad functions to datafusion_functions

* move strpos, substr functions to datafusion_functions

* Cleanup tests
@Omega359 Omega359 deleted the feature/9835 branch April 1, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions physical-expr Physical Expressions sql SQL Planner sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move strpos, substr functions to datafusion_functions
2 participants