Pass the input schema to stats_projection for ProjectionExpr#17123
Pass the input schema to stats_projection for ProjectionExpr#17123alamb merged 6 commits intoapache:mainfrom
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? |
|
|
||
| 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.
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?