nsivabalan commented on a change in pull request #4253:
URL: https://github.com/apache/hudi/pull/4253#discussion_r769998324
##########
File path:
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/DataSourceUtils.java
##########
@@ -309,4 +311,15 @@ public static HiveSyncConfig
buildHiveSyncConfig(TypedProperties props, String b
DataSourceWriteOptions.HIVE_SUPPORT_TIMESTAMP_TYPE().defaultValue()));
return hiveSyncConfig;
}
+
+ // Now by default ParquetWriteSupport will write DecimalType to parquet as
int32/int64 when the scale of decimalType < Decimal.MAX_LONG_DIGITS(),
+ // but AvroParquetReader which used by HoodieParquetReader cannot support
read int32/int64 as DecimalType.
+ // try to find current schema whether contains that DecimalType, and auto
set the value of "hoodie.parquet.writeLegacyFormat.enabled"
+ public static void autoModifyParquetWriteLegacyFormatParameter(Map<String,
String> properties, StructType schema) {
Review comment:
one last nit. can we name this
"mayBeOverwriteParquetWriteLegacyFormatProp"
--
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]