Skip to content

Leverage input array's null buffer for regex replace to optimize sparse arrays #3803

@isidentical

Description

@isidentical

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We can repurpose the input string array's null buffer directly on the specialized regex implementation so that we won't be spending time on re-building it.

Describe the solution you'd like
When we know only one input is an array (on the specialized case), we should be able to re-use the existing null buffer. The generic case can also be done in a similar fashion but that would be a bit more hard since now we would need to re-combine 4 null buffers (which might be easy with the underlying bitmap representation, though I doubt it would worth the complexity since the specialized path already covers the generic case).

Describe alternatives you've considered
None.

Additional context
Originally from @Dandandan as part of #3518.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions