aihuaxu commented on code in PR #14297:
URL: https://github.com/apache/iceberg/pull/14297#discussion_r2734466870
##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetVariantWriters.java:
##########
@@ -275,8 +275,14 @@ private ShreddedVariantWriter(
@Override
public void write(int repetitionLevel, VariantValue value) {
if (typedWriter.types().contains(value.type())) {
- typedWriter.write(repetitionLevel, value);
- writeNull(valueWriter, repetitionLevel, valueDefinitionLevel);
+ try {
+ typedWriter.write(repetitionLevel, value);
+ writeNull(valueWriter, repetitionLevel, valueDefinitionLevel);
+ } catch (IllegalArgumentException e) {
Review Comment:
This is simpler. Probably we can introduce a DecimalWriter to handle that by
checking if there is scale mismatch and fallback to write to value field.
Do you prefer that approach?
--
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]