vibhatha commented on a change in pull request #12664:
URL: https://github.com/apache/arrow/pull/12664#discussion_r834160353



##########
File path: cpp/examples/arrow/dataset_parquet_scan_example.cc
##########
@@ -62,8 +73,11 @@ struct Configuration {
 
   // Indicates the filter by which rows will be filtered. This optimization can
   // make use of partition information and/or file metadata if possible.
-  cp::Expression filter =
-      cp::greater(cp::field_ref("total_amount"), cp::literal(1000.0f));
+  // Equivalent filter with field_name instead of field_index
+  // cp::Expression filter = cp::greater(cp::field_ref("total_amount"),
+  // cp::literal(1000.0f));
+  // 0: pickup_at, 1: dropoff_at, 2: total_amount
+  cp::Expression filter = cp::greater(cp::field_ref(2), cp::literal(1000.0f));

Review comment:
       This is indeed a good one. Adding that. 




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