huaxingao commented on code in PR #15328:
URL: https://github.com/apache/iceberg/pull/15328#discussion_r2818752121


##########
spark/v4.1/spark/src/jmh/java/org/apache/iceberg/spark/data/parquet/SparkParquetWritersNestedDataBenchmark.java:
##########
@@ -121,10 +126,28 @@ public void writeUsingSparkWriter() throws IOException {
             .set("spark.sql.parquet.outputTimestampType", "TIMESTAMP_MICROS")
             .set("spark.sql.caseSensitive", "false")
             .set("spark.sql.parquet.fieldId.write.enabled", "false")
+            .set("spark.sql.parquet.variant.annotateLogicalType.enabled", 
"false")
             .schema(SCHEMA)
             .build()) {
 
       writer.addAll(rows);
     }
   }
+
+  @Benchmark
+  @Threads(1)
+  public void writeUsingRegistryWriter() throws IOException {
+    try (DataWriter<InternalRow> writer =
+        FormatModelRegistry.dataWriteBuilder(
+                FileFormat.PARQUET,
+                InternalRow.class,
+                
EncryptedFiles.plainAsEncryptedOutput(Files.localOutput(dataFile)))
+            .schema(SCHEMA)
+            .engineSchema(SparkSchemaUtil.convert(SCHEMA))

Review Comment:
   Let’s consider this in a follow-up PR. Approving to unblock the current 
change.



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