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

refactor: Add macro to refactor array functions registration #12577

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jinchengchenghh
Copy link
Contributor

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 7, 2025
Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 1197a9e
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/67cfff1fb466060008d1a804

@jinchengchenghh jinchengchenghh changed the title refactor: Refactor array functions registeration refactor: Add macro to refactor array functions registration Mar 7, 2025
@jinchengchenghh jinchengchenghh force-pushed the func branch 2 times, most recently from f5aea4f to f6d0410 Compare March 10, 2025 09:38
@jinchengchenghh
Copy link
Contributor Author

Can you help review this PR? Thanks! @rui-mo @zhli1142015

registerArrayRemoveFunctions<Varbinary>(prefix);
registerArrayRemoveFunctions<Generic<T1>>(prefix);
REGISTER_SCALAR_FUNCTIONS_WITHOUT_VARCHAR(
registerArrayRemoveFunctions, prefix);
registerFunction<
ArrayRemoveFunctionString,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know the reason why we need to implement a separate function specifically for the VARCHAR type?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The StringWriter push_back API uses copy_from which is a deep copy, usually in the simple function case, it should be a reference copy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So we use setNoCopy instead of push_back for VARCHAR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants