You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/09/30 19:34:28 UTC

[GitHub] [arrow] bkietz commented on a change in pull request #8311: ARROW-10008: [C++][Dataset] Fix filtering/row group statistics of dict columns

bkietz commented on a change in pull request #8311:
URL: https://github.com/apache/arrow/pull/8311#discussion_r497752291



##########
File path: cpp/src/arrow/dataset/filter.cc
##########
@@ -1255,14 +1255,42 @@ struct TreeEvaluator::Impl {
   }
 
   Result<Datum> operator()(const ComparisonExpression& expr) const {
-    ARROW_ASSIGN_OR_RAISE(auto lhs, Evaluate(*expr.left_operand()));
-    ARROW_ASSIGN_OR_RAISE(auto rhs, Evaluate(*expr.right_operand()));
+    ARROW_ASSIGN_OR_RAISE(Datum lhs, Evaluate(*expr.left_operand()));
+    ARROW_ASSIGN_OR_RAISE(Datum rhs, Evaluate(*expr.right_operand()));
 
     if (IsNullDatum(lhs) || IsNullDatum(rhs)) {
       return Datum(std::make_shared<BooleanScalar>());
     }
 
-    DCHECK(lhs.is_array());
+    if (lhs.type()->id() == Type::DICTIONARY && rhs.type()->id() == Type::DICTIONARY) {

Review comment:
       @wesm What do you think about adding kernels to scalar_compare.cc which do this inside compute:: ?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org