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
[6X] Fix FNullRejecting() error while trying to process zero-placed predicate #13172
Merged
bhuvnesh2703
merged 1 commit into
greenplum-db:6X_STABLE
from
arenadata:nullrejecting_error_zero_arity
Mar 31, 2022
Merged
[6X] Fix FNullRejecting() error while trying to process zero-placed predicate #13172
bhuvnesh2703
merged 1 commit into
greenplum-db:6X_STABLE
from
arenadata:nullrejecting_error_zero_arity
Mar 31, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InnerLife0
force-pushed
the
nullrejecting_error_zero_arity
branch
from
March 4, 2022 05:10
c9750a5
to
df79b4f
Compare
chrishajas
approved these changes
Mar 24, 2022
bhuvnesh2703
approved these changes
Mar 24, 2022
Thank your @InnerLife0 for the contribution. I will take it to the Review Committee to approve / disapprove it for 6X. |
InnerLife0
force-pushed
the
nullrejecting_error_zero_arity
branch
from
March 25, 2022 04:44
ff167db
to
84f4989
Compare
Changed minidump. |
Got Approval. Please squash it, and i can merge afterwards. |
…ate. When trying to do NULL rejection over zero-placed predicate, e.g. any strict function with zero arguments, we may pass NULL children array from EberEvaluate() to underlying Eber() functions. This may lead to errors, such as assertion error at EberNullOnAnyNullChild() function which used by many subclasses. As underlying Eber() functions doesn't perform any NULL check, we need to pass an empty array to them in case we working with zero-placed predicate. Another option was to return EberAny from EberEvaluate() in case we dealing with zero arity, but there is underlying CScalarConst::Eber() function which should be called and which do it's stuff ignoring incoming argument at all. Here I decided to keep current solution as it's clean. A little highlighting of function folding. If you'll remove topmost select from any of new tests, you'll not get an error because strict function will be folded, and thus, became Const. Starting from 4cf4743 such functions under topmost select not folded, because such select has no parse->rtable. At the other hand, Postgres planner, on which ORCA fell back before current patch, can do folding because of separate calls to eval_const_expressions() from subplans.
InnerLife0
force-pushed
the
nullrejecting_error_zero_arity
branch
from
March 29, 2022 04:41
da0d449
to
e27ab38
Compare
Squashed. CI is OK. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When trying to do NULL rejection over zero-placed predicate, e.g. any strict function with zero arguments, we may pass NULL children array from EberEvaluate() to underlying Eber() functions. This may lead to errors, such as assertion error at EberNullOnAnyNullChild() function which used by many subclasses. As underlying Eber() functions doesn't perform any NULL check, we need to pass an empty array to them in case we working with zero-placed predicate.
Another option was to return EberAny from EberEvaluate() in case we dealing with zero arity, but there is underlying CScalarConst::Eber() function which should be called and which do it's stuff ignoring incoming argument at all. Here I decided to keep current solution as it's clean.
A little highlighting of function folding. If you'll remove topmost select from any of new tests, you'll not get an error because strict function will be folded, and thus, became Const. Starting from 4cf4743 such functions under topmost select not folded, because such select has no parse->rtable. At the other hand, Postgres planner, on which ORCA fell back before current patch, can do folding because of separate calls to eval_const_expressions() from subplans