Skip to content

Conversation

@Omega359
Copy link
Contributor

Which issue does this PR close?

Closes #9842

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,

Omega359 added 21 commits March 14, 2024 09:42
…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/expr/src/expr_fn.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/functions/src/unicode/substr.rs
#	datafusion/physical-expr/src/functions.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 logical-expr Logical plan and expressions physical-expr Changes to the physical-expr crates optimizer Optimizer rules core Core DataFusion crate labels Mar 29, 2024
@Omega359 Omega359 marked this pull request as ready for review March 29, 2024 23:02
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.

Thank you @Omega359 -- this looks great. I merged up from main to resolve a conflict

]
serde = ["arrow-schema/serde"]
unicode_expressions = [
"datafusion-physical-expr/unicode_expressions",
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

return Some(String::new());
}

let splitted: Box<dyn Iterator<Item = _>> = if n > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can probably make this significantly faster by avoiding the Box::new() here and the call to to_owned() below. I realize this is not something changed in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll create a separate benchmark for this.

@alamb alamb merged commit a5f7714 into apache:main Mar 30, 2024
@alamb
Copy link
Contributor

alamb commented Mar 30, 2024

Thanks again @Omega359

@Omega359 Omega359 deleted the feature/9842 branch March 30, 2024 20:11
Lordworms pushed a commit to Lordworms/arrow-datafusion that referenced this pull request Apr 1, 2024
…nctions (apache#9864)

* 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

* move the Translate, SubstrIndex, FindInSet functions to new datafusion-functions crate

* Test code cleanup

* unicode_expressions Cargo.toml updates.

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

move the Translate, SubstrIndex, FindInSet functions to new datafusion-functions crate

2 participants