-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
bugfix: fix eval nullalbe()
in simplify_exprs
#5208
Conversation
nullalbe()
in
simplify_exprs`nullalbe()
in simplify_exprs
8178c24
to
f76e667
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @jackwener
Is there some test we could write that would show the effect of this change?
// Pass down the `children merge schema` and `plan schema` to evaluate expression types. | ||
// pass all `child schema` and `plan schema` isn't enough, because like `t1 semi join t2 on | ||
// on t1.id = t2.id`, each individual schema can't contain all the columns in it. | ||
let children_merge_schema = DFSchemaRef::new(merge_schema(plan.inputs())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some ways, it seems to me that we should only be using the children's schemas as the expressions within he LogicalPlan
should be in terms of the plan's inputs (the children's schemas) not the plan's output (plan.schema()
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to me that we should only be using the children's schemas.
I can't agree with it more.
But current code get attribution of some Expression by get it from plan.schema()
instead of inferring/computing them from children ouput.
For example, some test will fail like csv_query_group_by_and_having_and_where
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something else to work on over time, perhaps
current tests can cover this problem, but it was hidden by set Before this PR, I'm working on #4685 and try to fix all bug in it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current tests can cover this problem, but it was hidden by skip_failed_rules.
👍
Sounds good. Thank you @jackwener
Benchmark runs are scheduled for baseline = e222bd6 and contender = f0c6719. f0c6719 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #5191.
Rationale for this change
What changes are included in this PR?
Remove use
all_schemas()
but use the plan schema + children_merge_schema().set
pub skip_failed_rules: bool, default = false
Before this PR,
right_anti_filter_push_down
andright_semi_with_alias_filter
will fail.After this PR, they will success.
Are these changes tested?
Current test can cover it (we just need to disable skip_fail)
Are there any user-facing changes?