deniskuzZ commented on code in PR #3758:
URL: https://github.com/apache/hive/pull/3758#discussion_r1021906705
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/WriterBuilder.java:
##########
@@ -92,7 +92,10 @@ public HiveIcebergWriter build() {
long targetFileSize = PropertyUtil.propertyAsLong(table.properties(),
TableProperties.WRITE_TARGET_FILE_SIZE_BYTES,
TableProperties.WRITE_TARGET_FILE_SIZE_BYTES_DEFAULT);
+ boolean isWriteDeleteRow =
Boolean.parseBoolean(properties.getOrDefault("iceberg.write.deleterow",
"false"));
+
Schema dataSchema = table.schema();
+ Schema positionalDeleteSchema = isWriteDeleteRow ? dataSchema : null;
Review Comment:
not sure if the naming is good, it's actually a data schema. Maybe better to
just inline this ternary operator in Factory constructor?
##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/WriterBuilder.java:
##########
@@ -92,7 +92,10 @@ public HiveIcebergWriter build() {
long targetFileSize = PropertyUtil.propertyAsLong(table.properties(),
TableProperties.WRITE_TARGET_FILE_SIZE_BYTES,
TableProperties.WRITE_TARGET_FILE_SIZE_BYTES_DEFAULT);
+ boolean isWriteDeleteRow =
Boolean.parseBoolean(properties.getOrDefault("iceberg.write.deleterow",
"false"));
+
Schema dataSchema = table.schema();
+ Schema positionalDeleteSchema = isWriteDeleteRow ? dataSchema : null;
Review Comment:
not sure if the naming is good, it's actually a data schema. Maybe better to
just inline this ternary operator in the Factory constructor?
--
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]