stuhood commented on issue #21207: URL: https://github.com/apache/datafusion/issues/21207#issuecomment-5027542456
> [@stuhood](https://github.com/stuhood) would it matter for your usage if you got `CASE partition_routing_hash(col) WHEN 0 THEN col IN <list 1> WHEN 1 THEN col IN <list 2> ... END` v.s. `col IN <list1> OR col IN <list2> ...` vs `col IN <merged list>`? The case expression is more difficult to push into the index, but not impossible. We don't currently handle them. I suppose that one way to think about it though is that the `CASE` expression exposes strictly more information than the `OR`'d lists do: it may be more or less cheap for a particular expression evaluator to load the partitioning key vs the in-list column... and depending on the list size, each of those portions of the expression may be more or less selective. So maybe the right answer is to expose as much information as you have, and then let the consumer decide what to do with it? But that sortof hinges on being able to recognize the `CASE` pattern as an optimization relative to OR'd lists, so that you can choose to ignore the `CASE` portion and `OR` them. -- 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]
