lxy-9602 commented on code in PR #8524:
URL: https://github.com/apache/paimon/pull/8524#discussion_r3568982602
##########
paimon-core/src/main/java/org/apache/paimon/append/AppendOnlyWriter.java:
##########
@@ -344,13 +421,20 @@ private RollingFileWriter<InternalRow, DataFileMeta>
createRollingRowWriter() {
fileCompression,
statsCollectorFactories.statsCollectors(writeSchema.getFieldNames()),
fileIndexOptions,
+ writerFactory(),
FileSource.APPEND,
asyncFileWrite,
statsDenseStore,
writeCols,
rowSidecarFileFormat);
}
+ private FormatWriterFactory writerFactory() {
+ FormatWriterFactory factory =
fileFormat.createWriterFactory(writeSchema);
+ return ShreddingWritePlanWriterFactories.wrapMapSharedShredding(
Review Comment:
MAP shared-shredding needs a `MapSharedShreddingContext` initialized from
previous file metadata to determine the physical column count, which is
difficult to handle in the format layer. That is why it is currently wrapped in
`AppendOnlyWriter`, while Variant is wrapped inside Parquet. For consistency,
would you suggest keeping this split, moving both wrappers to the writer
framework, or handling both in the format layer?
--
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]