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

migrate string functions to inovke_with_args #14722

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

zjregee
Copy link
Member

@zjregee zjregee commented Feb 17, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Deprecate and remove invoke_batch in string functions and migrate to providing invoke_with_args.

Are these changes tested?

Yes.

Are there any user-facing changes?

None.

@zjregee
Copy link
Member Author

zjregee commented Feb 17, 2025

cc: @goldmedal

@zjregee zjregee force-pushed the migrate-string-functions branch from 54f5be7 to 3a24290 Compare February 17, 2025 11:49
Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @zjregee. I left some comments for the benchmark. The other parts look great.

Comment on lines 43 to 46
criterion::black_box(
concat()
.invoke_with_args(ScalarFunctionArgs {
args: args.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can move clone out of black_box. It can decrease the impact of clone for the benchmark result. (It's more close to the previous version.)

Suggested change
criterion::black_box(
concat()
.invoke_with_args(ScalarFunctionArgs {
args: args.clone(),
let args_cloned = args.clone();
criterion::black_box(
concat()
.invoke_with_args(ScalarFunctionArgs {
args: args_cloned,

In my laptop, if we place clone in the black_box, the result will slow down by about 5%.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think other benchmark cases can be improved by moving out the clone().

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for your suggestion, I have optimized this in the submission.

@zjregee zjregee force-pushed the migrate-string-functions branch from 3751730 to 942c3a8 Compare February 18, 2025 03:22
@zjregee zjregee force-pushed the migrate-string-functions branch from 942c3a8 to b19ae17 Compare February 18, 2025 03:28
@zjregee
Copy link
Member Author

zjregee commented Feb 18, 2025

And I noticed that #14686 introduced a call invoke_batch that was going to be outdated, I modified it here.

Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @zjregee. It looks great 👍

@alamb
Copy link
Contributor

alamb commented Feb 18, 2025

🚀

@alamb alamb merged commit 2be19e5 into apache:main Feb 18, 2025
24 checks passed
@zjregee zjregee deleted the migrate-string-functions branch February 18, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate String Functions to inovke_with_args
3 participants