vibhatha commented on a change in pull request #12664:
URL: https://github.com/apache/arrow/pull/12664#discussion_r839561245
##########
File path: cpp/src/arrow/dataset/file_parquet_test.cc
##########
@@ -390,6 +390,38 @@ TEST_P(TestParquetFileFormatScan,
ScanRecordBatchReaderWithVirtualColumn) {
TEST_P(TestParquetFileFormatScan, ScanRecordBatchReaderWithDuplicateColumn) {
TestScanWithDuplicateColumn();
}
+TEST_P(TestParquetFileFormatScan, ScanRecordBatchReaderWithFieldPathFilter) {
+ TestScanWithFieldPathFilter();
+}
+TEST_P(TestParquetFileFormatScan,
ScanRecordBatchReaderWithFieldPathMultiFileFilter) {
+ compute::Expression filter = greater(field_ref(0), literal(20));
+ auto fields = {field("x", int32()), field("y", int32()), field("z",
int32())};
+ auto dataset_schema = schema(fields);
+ SetSchema(fields);
+ SetFilter(filter);
+ auto table = TableFromJSON(dataset_schema,
+ {
+ R"([[10, 20, 30]])",
+ });
+
+ auto options =
+
checked_pointer_cast<ParquetFileWriteOptions>(format_->DefaultWriteOptions());
+ options->writer_properties = parquet::WriterProperties::Builder()
+ .build();
+ options->arrow_writer_properties = parquet::ArrowWriterProperties::Builder()
+ .build();
+
+ auto written = WriteToBufferFromTable(dataset_schema, table, options);
+
+ EXPECT_OK_AND_ASSIGN(auto fragment,
format_->MakeFragment(FileSource{written}));
+
+ for (auto maybe_batch : PhysicalBatches(fragment)) {
+ ASSERT_OK_AND_ASSIGN(auto batch, maybe_batch);
+ std::cout << "Batch ::" << std::endl;
+ std::cout << batch->ToString() << std::endl;
Review comment:
This is part of addressing a review.
--
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]