comphead commented on issue #19075: URL: https://github.com/apache/datafusion/issues/19075#issuecomment-3613028625
I came to the issue start with projection pushdown https://github.com/apache/datafusion/blob/8dac8f1c41894e0e67f04b051ef82ca8eda3dd6e/datafusion/physical-optimizer/src/projection_pushdown.rs#L78 from `remove_unnecessary_projections` The reason is the logical plan contains bad(or I would say weird) construction in projection expressions ``` datafusion/physical-plan/src/projection.rs:562:13] &projection = ProjectionExec { projector: Projector { projection: ProjectionExprs { exprs: [ ProjectionExpr { expr: BinaryExpr { left: BinaryExpr { left: Column { name: "hd_dep_count", index: 1, }, op: Eq, right: Literal { value: Int64(3), field: Field { name: "lit", data_type: Int64, }, }, fail_on_overflow: false, }, op: Or, right: BinaryExpr { left: Column { name: "hd_dep_count", index: 1, }, op: Eq, right: Literal { value: Int64(1), field: Field { name: "lit", data_type: Int64, }, }, fail_on_overflow: false, }, fail_on_overflow: false, }, alias: "__common_expr_2", }, ProjectionExpr { expr: Column { name: "hd_demo_sk", index: 0, }, alias: "hd_demo_sk", }, ProjectionExpr { expr: Column { name: "hd_dep_count", index: 1, }, alias: "hd_dep_count", }, ], }, ``` @adriangb as you worked recently on projections, WDYT is this expression is unexpected? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
