felipecrv commented on code in PR #42106:
URL: https://github.com/apache/arrow/pull/42106#discussion_r1638473910


##########
cpp/src/arrow/compute/expression.h:
##########
@@ -118,6 +124,12 @@ class ARROW_EXPORT Expression {
   // XXX someday
   // NullGeneralization::type nullable() const;
 
+  /// Whether the entire expression (including all its subexpressions) is
+  /// selection-vector-aware. If true, then the expression can be executed 
using the "fast
+  /// path" - all kernels directly working on the selection vector. Otherwise 
the
+  /// execution takes the "slow path" - gathering the input and scattering the 
output.
+  bool selection_vector_aware() const;

Review Comment:
   I think that this should return the `TypeMatcher` or the `DataType` or be a 
`bool MatchesSelectionVector(TypeHolder/DataType)` that is derived from what 
`KernelSignatures` contain to let the evaluation system check which kinds of 
selection vectors they accept (`INT32`, `INT64` or `BOOL`).
   
   So you can extend `KernelSignature` to have a new type matcher (matches 
nothing by default) that can match selection vector types.



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

Reply via email to