deniskuzZ commented on code in PR #6152:
URL: https://github.com/apache/hive/pull/6152#discussion_r2616879617


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/HiveFileWriterFactory.java:
##########
@@ -149,4 +159,14 @@ HiveFileWriterFactory build() {
           positionDeleteRowSchema);
     }
   }
+
+  /**
+   * Set a sample record to use for data-driven variant shredding schema 
generation.
+   * Should be called before the Parquet writer is created.
+   */
+  public void initialize(Supplier<Record> record) {
+    if (sampleRecord == null) {
+      sampleRecord = record;

Review Comment:
   yes, something like this, explicit schema would be a better solution



##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/HiveFileWriterFactory.java:
##########
@@ -149,4 +159,14 @@ HiveFileWriterFactory build() {
           positionDeleteRowSchema);
     }
   }
+
+  /**
+   * Set a sample record to use for data-driven variant shredding schema 
generation.
+   * Should be called before the Parquet writer is created.
+   */
+  public void initialize(Supplier<Record> record) {
+    if (sampleRecord == null) {
+      sampleRecord = record;

Review Comment:
   yes, something like this, an explicit schema would be a better solution



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