nastra commented on code in PR #11247:
URL: https://github.com/apache/iceberg/pull/11247#discussion_r1796746457


##########
spark/v3.5/spark/src/test/java/org/apache/iceberg/spark/data/parquet/vectorized/TestParquetDictionaryEncodedVectorizedReads.java:
##########
@@ -93,4 +125,64 @@ public void testMixedDictionaryNonDictionaryReads() throws 
IOException {
         true,
         BATCH_SIZE);
   }
+
+  @Test
+  public void testBinaryNotAllPagesDictionaryEncoded() throws IOException {
+    Schema schema = new Schema(Types.NestedField.required(1, "bytes", 
Types.BinaryType.get()));
+    File parquetFile = File.createTempFile("junit", null, temp.toFile());
+    assertThat(parquetFile.delete()).as("Delete should succeed").isTrue();
+
+    Iterable<GenericData.Record> records = 
RandomData.generateFallbackData(schema, 500, 0L, 100);
+    try (FileAppender<GenericData.Record> writer =
+        Parquet.write(Files.localOutput(parquetFile))
+            .schema(schema)
+            .set(PARQUET_DICT_SIZE_BYTES, "4096")
+            .set(PARQUET_PAGE_ROW_LIMIT, "100")
+            .build()) {
+      writer.addAll(records);
+    }
+    // After this, parquetFile contains one column chunk of binary data in 
five pages,

Review Comment:
   nit: please add a newline before this



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

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

Reply via email to