You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "YoungRX (via GitHub)" <gi...@apache.org> on 2023/03/15 02:30:49 UTC

[GitHub] [arrow] YoungRX commented on issue #34515: [C++] How to use predicate pushdown of binary and decimal types in arrow::parquet?

YoungRX commented on issue #34515:
URL: https://github.com/apache/arrow/issues/34515#issuecomment-1469205185

   Yes. But I use `arrow::Datum(std::forward<int64_t>(timestamp_value));` as a literal.
   The specific code is as follows:
   ```
       if (strcmp(opName, ">") == 0) {
           predicate_filter.push_back(arrow::compute::greater(
               arrow::compute::field_ref(colField->name()),
               arrow::compute::literal(arrow::Datum(std::forward<int64_t>(timestamp_value)))
           ));
   ```
   According to the example you gave:
   ```
       if (strcmp(opName, ">") == 0) {
           predicate_filter.push_back(arrow::compute::greater(
               arrow::compute::field_ref("timestamp_col"),
               arrow::compute::literal(arrow::Datum(std::forward<int64_t>(17)))
           ));
   ```
   Then, an error is reported when Bind() is used.
   
   If I use `literal(std::make_shared<TimestampScalar>(timestamp(), 17))`, is the problem likely to be solved? What about the other 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: github-unsubscribe@arrow.apache.org

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