melin opened a new issue, #10725: URL: https://github.com/apache/iceberg/issues/10725
### Query engine JAVA API ### Question There are two partitions in the table. Query the data files of one partition, and the data files of two partitions are returned. filter(expression) does not take effect ```java DataFilesTable dataFilesTable = (DataFilesTable) MetadataTableUtils.createMetadataTableInstance(icebergTable, MetadataTableType.DATA_FILES); Expression expression = Expressions.and(Expressions.equal("partition.pt", "20240720"), Expressions.equal("partition.type", 1)); try (CloseableIterable<CombinedScanTask> tasks = dataFilesTable.newScan().filter(expression).planTasks()) { tasks.forEach(task -> { task.files().forEach(fileScanTask -> { DataTask fileTask = (DataTask) fileScanTask; fileTask.rows().forEach(row -> { System.out.println("row: " + row); System.out.println("\t" + row.get(1, String.class)); System.out.println("\t" + row.get(4, PartitionData.class)); System.out.println("\t" + row.get(5, Long.class)); System.out.println("\t" + row.get(6, Long.class)); }); System.out.println(fileTask.rows()); }); }); } ``` Result: ``` row: org.apache.iceberg.MetricsUtil$StructWithReadableMetrics@11eec06b hdfs://cdh1:8020/user/hive/warehouse/bigdata.db/iceberg_sample_2/data/pt=20240720/type=1/00000-1-17505e37-abe7-430a-825e-f2fdc4f0af6b-0-00001.parquet PartitionData{pt=20240720, type=1} 1 1383 row: org.apache.iceberg.MetricsUtil$StructWithReadableMetrics@65600fb3 hdfs://cdh1:8020/user/hive/warehouse/bigdata.db/iceberg_sample_2/data/pt=20240719/type=2/00000-1-17505e37-abe7-430a-825e-f2fdc4f0af6b-0-00002.parquet PartitionData{pt=20240719, type=2} 1 1383 ``` -- 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: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org