-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Pass the input schema to stats_projection for ProjectionExpr #17123
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
Conversation
|
Thank you for this fix @hareshkh 🙏 can you please add a test so we don't accidentally break this again in the future? |
|
@alamb - Added a test, checked that it fails if the wrong schema is supplied. Can you please take a pass again? Also, when this fix merges, is it possible to cherry-pick it on top of 48.0.1 - to release maybe a 48.0.2? |
alamb
left a comment
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 @hareshkh
I also pushed a commit to this PR to solve the CI error.
Is there any chance you can make a PR to the branch-49 branch so we can include this in the 49.0.1 release as well?
|
|
||
| assert_eq!(stats.num_rows, Precision::Exact(10)); | ||
| assert_eq!(stats.column_statistics.len(), 2, "Expected 2 columns in projection statistics"); | ||
| assert_eq!(stats.total_byte_size.is_exact().unwrap_or(false), true); |
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.
I verified this test covers the change by running the test without the code change and it fails like this
assertion `left == right` failed
left: false
right: true
Left: false
Right: true
We can consider doing a 48.0.2 release - If you want to do so can you please file a new ticket to discuss the possibility here It seems like this might be something we want to include in the upcoming |
|
@alamb : Yes, once this PR merges, I can create a PR to the |
Merged! Thank you. |
…17123) * Pass the input schema to stats_projection for ProjectionExpr * Adds a test * fmt * clippy --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
…17123) * Pass the input schema to stats_projection for ProjectionExpr * Adds a test * fmt * clippy --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Which issue does this PR close?
Rationale for this change
bounds_check()requires input schema, whileschemafield is the output schema.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?