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

chore: Migrate Regex function to invoke_with_args #14728

Merged
merged 3 commits into from
Feb 18, 2025

Conversation

irenjj
Copy link
Contributor

@irenjj irenjj commented Feb 17, 2025

Which issue does this PR close?

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

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 @irenjj. Overall looks good to me, but I think there are some outdated annotations.

&[ColumnarValue::Scalar(v_sv), ColumnarValue::Scalar(regex_sv)],
1,
);
#[allow(deprecated)]
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 it is out of date. It's for inovke_batch but we have migrated to inovek_with_args. We can remove it.

Copy link
Contributor

Choose a reason for hiding this comment

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

There are other similar parts. We can remove all of them.

#[allow(deprecated)]
let re = RegexpCountFunc::new().invoke_with_args(ScalarFunctionArgs {
args: vec![ColumnarValue::Scalar(v_sv), ColumnarValue::Scalar(regex_sv)],
number_rows: 2,
Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed that it's different from the previous number 🤔. However, I think regexp_count never uses the number of rows. It's fine.

@findepi findepi changed the title chore" Migrate Regex function to invoke_with_args chore: Migrate Regex function to invoke_with_args Feb 17, 2025
@irenjj
Copy link
Contributor Author

irenjj commented Feb 18, 2025

Thanks @goldmedal , have modified according to your suggestion, PTAL. :)

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 @irenjj 👍 It looks good to me.

@goldmedal goldmedal merged commit ed98690 into apache:main Feb 18, 2025
24 checks passed
@irenjj irenjj deleted the migrate_regex_func branch February 18, 2025 14:07
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 Regex function to invoke_with_args
2 participants