lxy-9602 commented on code in PR #8321:
URL: https://github.com/apache/paimon/pull/8321#discussion_r3457184523
##########
paimon-format/src/main/java/org/apache/paimon/format/parquet/writer/ParquetBuilder.java:
##########
@@ -34,4 +36,10 @@ public interface ParquetBuilder<T> extends Serializable {
/** Creates and configures a parquet writer to the given output file. */
ParquetWriter<T> createWriter(OutputFile out, String compression) throws
IOException;
+
+ default ParquetWriter<T> createWriter(
+ OutputFile out, String compression, Supplier<Map<String, byte[]>>
metadataSupplier)
+ throws IOException {
+ return createWriter(out, compression);
Review Comment:
Thanks for pointing this out. I agree that silently falling back to the
two-argument createWriter would make the metadata support look available while
the footer entries are actually dropped, which is quite misleading.
I updated the default metadata-aware `createWriter` overload to fail
explicitly with `UnsupportedOperationException` unless a ParquetBuilder
implementation wires the metadata supplier into the writer path. I also added a
regression test to cover a builder that only implements the original
two-argument createWriter, making sure it fails explicitly instead of silently
ignoring metadata.
--
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]