-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
change pre_cast_lit_in_comparison to unwrap_cast_in_comparison #3662
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -767,8 +767,6 @@ async fn test_physical_plan_display_indent_multi_children() { | |
#[tokio::test] | ||
#[cfg_attr(tarpaulin, ignore)] | ||
async fn csv_explain() { | ||
// TODO: https://github.com/apache/arrow-datafusion/issues/3622 refactor the `PreCastLitInComparisonExpressions` | ||
|
||
// This test uses the execute function that create full plan cycle: logical, optimized logical, and physical, | ||
// then execute the physical plan and return the final explain results | ||
let ctx = SessionContext::new(); | ||
|
@@ -779,23 +777,6 @@ async fn csv_explain() { | |
|
||
// Note can't use `assert_batches_eq` as the plan needs to be | ||
// normalized for filenames and number of cores | ||
let expected = vec![ | ||
vec![ | ||
"logical_plan", | ||
"Projection: #aggregate_test_100.c1\ | ||
\n Filter: CAST(#aggregate_test_100.c2 AS Int32) > Int32(10)\ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
\n TableScan: aggregate_test_100 projection=[c1, c2], partial_filters=[CAST(#aggregate_test_100.c2 AS Int32) > Int32(10)]" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The key difference for anyone else following along is that
Has become
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, we remove the cast for |
||
], | ||
vec!["physical_plan", | ||
"ProjectionExec: expr=[c1@0 as c1]\ | ||
\n CoalesceBatchesExec: target_batch_size=4096\ | ||
\n FilterExec: CAST(c2@1 AS Int32) > 10\ | ||
\n RepartitionExec: partitioning=RoundRobinBatch(NUM_CORES)\ | ||
\n CsvExec: files=[ARROW_TEST_DATA/csv/aggregate_test_100.csv], has_header=true, limit=None, projection=[c1, c2]\ | ||
\n" | ||
]]; | ||
assert_eq!(expected, actual); | ||
|
||
let expected = vec![ | ||
vec![ | ||
"logical_plan", | ||
|
@@ -811,6 +792,7 @@ async fn csv_explain() { | |
\n CsvExec: files=[ARROW_TEST_DATA/csv/aggregate_test_100.csv], has_header=true, limit=None, projection=[c1, c2]\ | ||
\n" | ||
]]; | ||
assert_eq!(expected, actual); | ||
|
||
let sql = "explain SELECT c1 FROM aggregate_test_100 where c2 > 10"; | ||
let actual = execute(&ctx, sql).await; | ||
|
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.
this name is much easier to understand for me -- thank you