pvary commented on code in PR #16501:
URL: https://github.com/apache/iceberg/pull/16501#discussion_r3285877480


##########
arrow/src/test/java/org/apache/iceberg/arrow/vectorized/TestArrowReader.java:
##########
@@ -388,6 +388,99 @@ public void testTimestampMillisAreReadCorrectly() throws 
Exception {
     assertThat(totalRowsRead).as("Should read all 
rows").isEqualTo(millisValues.size());
   }
 
+  /**
+   * Regression test: a decimal column whose Iceberg field carries an 
initialDefault/writeDefault
+   * must be readable by the vectorized reader. Before the fix to {@code
+   * VectorizedArrowReader#getPhysicalType}, allocating the vector copied the 
decimal-typed default
+   * onto the underlying physical type (int/long/fixed) and failed with {@code
+   * IllegalArgumentException: Cannot cast default value to ...}.
+   */
+  @Test
+  public void testDecimalWithDefaultIsReadByVectorizedReader() throws 
Exception {

Review Comment:
   My main point here was, that I don't see an end-to-end test here, and I was 
wondering if the coverage was there.



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