adriangb opened a new issue, #21784:
URL: https://github.com/apache/datafusion/issues/21784

   ### Is your feature request related to a problem or challenge?
   
   In https://github.com/apache/arrow-rs/pull/9511 we introduced APIs to answer 
the question "does this boolean array have any true/false values" faster than 
`true_count() == 0` and such.
   
   We should audit uses in DataFusion where we can apply these APIs.
   
   From the arrow PR:
   
   - **`datafusion/functions-nested/src/array_has.rs`** — 
`eq_array.true_count() > 0` → `eq_array.has_true()`
   - **`datafusion/physical-plan/src/topk/mod.rs`** — `filter.true_count() == 
0` check → `!filter.has_true()`
   - **`datafusion/datasource-parquet/src/metadata.rs`** — 
`exactness.true_count() == 0` and `combined_mask.true_count() > 0`
   - **`datafusion/physical-plan/src/joins/nested_loop_join.rs`** — 
`bitmap.true_count() == 0` checks
   - **`datafusion/physical-expr-common/src/physical_expr.rs`** — 
`selection_count == 0` from `selection.true_count()`
   - **`datafusion/physical-expr/src/expressions/binary.rs`** — short-circuit 
checks for AND/OR
   
   
   ### Describe the solution you'd like
   
   Audit use of true_count() and false_count().
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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]

Reply via email to