aokolnychyi commented on code in PR #8466:
URL: https://github.com/apache/iceberg/pull/8466#discussion_r1313602674


##########
spark/v3.4/spark/src/test/java/org/apache/iceberg/spark/source/TestParquetScan.java:
##########
@@ -93,26 +98,67 @@ protected void writeAndValidate(Schema schema) throws 
IOException {
                 schema,
                 type -> type.isMapType() && type.asMapType().keyType() != 
Types.StringType.get()));
 
+    Table table = createTable(schema);
+
+    // Important: use the table's schema for the rest of the test
+    // When tables are created, the column ids are reassigned.
+    List<GenericData.Record> expected = 
RandomData.generateList(table.schema(), 100, 1L);
+    writeRecords(table, expected);
+
+    configureVectorization(table);
+
+    Dataset<Row> df = spark.read().format("iceberg").load(table.location());
+
+    List<Row> rows = df.collectAsList();
+    Assert.assertEquals("Should contain 100 rows", 100, rows.size());
+
+    for (int i = 0; i < expected.size(); i += 1) {
+      TestHelpers.assertEqualsSafe(table.schema().asStruct(), expected.get(i), 
rows.get(i));
+    }
+  }
+
+  @Test
+  public void testEmptyTableProjection() throws IOException {

Review Comment:
   This is the test that uses an empty projection.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to