openinx commented on a change in pull request #2642:
URL: https://github.com/apache/iceberg/pull/2642#discussion_r667681542
##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetWriter.java
##########
@@ -38,16 +38,17 @@
import org.apache.parquet.bytes.ByteBufferAllocator;
import org.apache.parquet.column.ColumnWriteStore;
import org.apache.parquet.column.ParquetProperties;
-import org.apache.parquet.column.page.PageWriteStore;
+import org.apache.parquet.column.values.bloomfilter.BloomFilterWriteStore;
import org.apache.parquet.hadoop.CodecFactory;
+import org.apache.parquet.hadoop.ColumnChunkPageWriteStore;
import org.apache.parquet.hadoop.ParquetFileWriter;
import org.apache.parquet.hadoop.metadata.CompressionCodecName;
import org.apache.parquet.schema.MessageType;
class ParquetWriter<T> implements FileAppender<T>, Closeable {
- private static DynConstructors.Ctor<PageWriteStore> pageStoreCtorParquet =
DynConstructors
- .builder(PageWriteStore.class)
+ private static DynConstructors.Ctor<ColumnChunkPageWriteStore>
pageStoreCtorParquet = DynConstructors
+ .builder(ColumnChunkPageWriteStore.class)
Review comment:
The `ColumnChunkPageWriteStore` is also marked as
`InterfaceAudience.Private` in `parquet-mr` project, so we should not depend
on this private interface explicty in java code in case of upgrading issues.
I can understand that we change it from `PageWriterStore` to
`ColumnChunkPageWriteStore` because we will need to pass a
`BloomFilterWriteStore` for the following `newColumnWriteStore`. Maybe we
could change the way to express this logic:
```java
Precondition.checkState(pageStore instance of BloomFilterWriteStore,
"pageStore must be an instance of BloomFilterWriteStore");
this.writeStore = props.newColumnWriteStore(parquetSchema,
pageStore,(BloomFilterWriteStore) pageStore);
```
--
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]