Dandandan commented on code in PR #20142:
URL: https://github.com/apache/datafusion/pull/20142#discussion_r2767474039
##########
datafusion/core/tests/physical_optimizer/filter_pushdown.rs:
##########
@@ -1213,7 +1213,7 @@ async fn
test_hashjoin_dynamic_filter_pushdown_partitioned() {
- RepartitionExec: partitioning=Hash([a@0, b@1], 12),
input_partitions=1
- DataSourceExec: file_groups={1 group: [[test.parquet]]},
projection=[a, b, c], file_type=test, pushdown_supported=true
- RepartitionExec: partitioning=Hash([a@0, b@1], 12),
input_partitions=1
- - DataSourceExec: file_groups={1 group: [[test.parquet]]},
projection=[a, b, e], file_type=test, pushdown_supported=true,
predicate=DynamicFilter [ empty ]
+ - DataSourceExec: file_groups={1 group: [[test.parquet]]},
projection=[a, b, e], file_type=test, pushdown_supported=true, predicate=CASE
hash_repartition % 12 WHEN 0 THEN DynamicFilter [ empty ] WHEN 1 THEN
DynamicFilter [ empty ] WHEN 2 THEN DynamicFilter [ empty ] WHEN 3 THEN
DynamicFilter [ empty ] WHEN 4 THEN DynamicFilter [ empty ] WHEN 5 THEN
DynamicFilter [ empty ] WHEN 6 THEN DynamicFilter [ empty ] WHEN 7 THEN
DynamicFilter [ empty ] WHEN 8 THEN DynamicFilter [ empty ] WHEN 9 THEN
DynamicFilter [ empty ] WHEN 10 THEN DynamicFilter [ empty ] WHEN 11 THEN
DynamicFilter [ empty ] ELSE false END
Review Comment:
I wonder if the routing can be better done by some custom `PhysicalExpr`
rather than the long `CASE WHEN`. It at least allows for some easier
optimization (e.g. doing direct lookup instead of expression evaluation), the
downside is maybe that expression simplification won't work as automatic?
--
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]