gszadovszky commented on code in PR #3306:
URL: https://github.com/apache/parquet-java/pull/3306#discussion_r2324227092
##########
parquet-avro/src/main/java/org/apache/parquet/avro/AvroConverters.java:
##########
@@ -339,4 +342,74 @@ public String convert(Binary binary) {
return stringifier.stringify(binary);
}
}
+
+ static final class FieldDecimalIntConverter extends AvroPrimitiveConverter {
+ private final int scale;
+ private int[] dict = null;
Review Comment:
The other primitive converters does not have dictionary support by default
because they just write the original value as is. Dictionary support makes
sense only if you cache the converted (`BigDecimal`) values to spare the time
of the conversion when the same value (dictionary index) appears.
##########
parquet-avro/src/test/java/org/apache/parquet/avro/TestReadWrite.java:
##########
@@ -400,6 +408,55 @@ public void testFixedDecimalValues() throws Exception {
Assert.assertEquals("Content should match", expected, records);
}
+ @Test
+ public void testDecimalInt64Values() throws Exception {
Review Comment:
We should cover INT32 as well. (Maybe just add another column for it in this
test and rename the method.)
--
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]