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

A hacky approach for regexpr rewrite #5

Closed
wants to merge 6 commits into from

Conversation

thirtiseven
Copy link
Owner

This pr rewrites GpuRLike to GpuStartsWith for a special case with a hacky approach.

A general way will be to change RegexParser instead of string when overriding.

And the rewrite is actually wrong, we can't rewrite rlike abc(.*) to startsWith abc because the pattern can occur anywhere in the string. Only rlike ^abc(.*) can be rewritten. I did it intentionally wrong specifically for a customer's sql.

@thirtiseven
Copy link
Owner Author

Will merge it to main, close now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant