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

Allow specialized physical functions to provide hints for the array adapter #3762

Closed
isidentical opened this issue Oct 7, 2022 · 0 comments · Fixed by #3765
Closed

Allow specialized physical functions to provide hints for the array adapter #3762

isidentical opened this issue Oct 7, 2022 · 0 comments · Fixed by #3765
Labels
enhancement New feature or request

Comments

@isidentical
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We currently have a specialization system (used by the regex_replace at the moment, but can be extended to similar functions) that always produces functions with adapters, but sometimes the newly created functions might not need padded arrays for scalars (_regexp_replace_static_pattern_replace only needs an array of length-1 for the last three arguments). Instead of requiring the specialized functions to implement APIs that process raw ColumnarValue's and provides multiple implementations (because not all arguments can be hinted/known), we can extend the array->scalar adapter (make_scalar_function) to also take a list of hints and produce more optimized inputs.

This is something that was noticed during the regex_replace speed-up discussion, where on some inputs the time spent on into_array() can be as high as %25 of the whole execution.

Describe the solution you'd like
A new API that can take some hints about what the decorated function expects in terms.

Describe alternatives you've considered
Not doing this and writing multiple implementations for specialized functions that directly consumes ColumnarValue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant