You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the projection push down only removes columns that are never referenced in the plan. However, sometimes a projection declares columns that themselves are never used.
This issue is about improving the projection push-down to remove any column that is not logically required by the plan.
Failing unit-test with the idea:
#[test]
fntable_unused_column() -> Result<()> {
lettable_scan = test_table_scan()?;
assert_eq!(3, table_scan.schema().fields().len());
assert_fields_eq(&table_scan, vec!["a", "b", "c"]);
// we never use "b" in the first projection => remove itletplan = LogicalPlanBuilder::from(&table_scan)
.project(vec![col("c"), col("a"), col("b")])? .filter(col("c").gt(&lit(1)))? .project(vec![col("c"), col("a")])? .build()?; assert_fields_eq(&plan, vec!["c", "a"]); let expected = "\
Projection: #c, #a\
\nSelection: #cGtInt32(1)\
\nProjection: #c, #a\
\nTableScan: testprojection=Some([0, 2])";
assert_optimized_plan_eq(&plan, expected);
Ok(())
}
Currently, the projection push down only removes columns that are never referenced in the plan. However, sometimes a projection declares columns that themselves are never used.
This issue is about improving the projection push-down to remove any column that is not logically required by the plan.
Failing unit-test with the idea:
This issue was firstly identified by @andygrove here.
Reporter: Jorge Leitão / @jorgecarleitao
Assignee: Jorge Leitão / @jorgecarleitao
PRs and other links:
Note: This issue was originally created as ARROW-9678. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: