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

colexec: fix remapping of indexed vars in filter expressions #41423

Closed
wants to merge 1 commit into from

Conversation

yuzefovich
Copy link
Member

Previously, the remapping of indexed variables was done incorrectly
(the range for indices was too small which would cause the "custom"
ordinal of the form '@#[d]+' to keep the pound sign). Now this is
fixed.

Fixes: #41407.

Release note: None

Previously, the remapping of indexed variables was done incorrectly
(the range for indices was too small which would cause the "custom"
ordinal of the form '@#[d]+' to keep the pound sign). Now this is
fixed.

Release note: None
@yuzefovich yuzefovich requested review from jordanlewis, asubiotto and a team October 8, 2019 01:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich
Copy link
Member Author

Still, the current way of remapping the variables is problematic - in some cases (when a sequence of symbols @# is already present in the original filter expression), we might return incorrect results. For example, if we have a filter like @1 = '@#1', and we're doing remapping such that @1 is first replaced with @#1, then we will replace both of @#1 with @1 which will make our filter as @1 = '@1'. I don't know how to fix it though :/ Any ideas?

@yuzefovich
Copy link
Member Author

I guess, maybe the correct way to handle this situation is not do the remapping (i.e. the modification) of the expression at all, but rather use a custom IVarContainer that will handle the redirection when evaluating the datums?

@yuzefovich
Copy link
Member Author

Replaced by #42198.

@yuzefovich yuzefovich closed this Nov 6, 2019
@yuzefovich yuzefovich deleted the fix-on-expr branch November 6, 2019 00:04
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.

sql: unable to vectorize: "#": syntax error
2 participants