jshmchenxi commented on a change in pull request #2642:
URL: https://github.com/apache/iceberg/pull/2642#discussion_r752328938



##########
File path: parquet/src/main/java/org/apache/iceberg/parquet/ParquetWriter.java
##########
@@ -197,9 +198,11 @@ private void startRowGroup() {
 
     PageWriteStore pageStore = pageStoreCtorParquet.newInstance(
         compressor, parquetSchema, props.getAllocator(), 
this.columnIndexTruncateLength);
+    Preconditions.checkState(pageStore instanceof BloomFilterWriteStore,
+        "pageStore must be an instance of BloomFilterWriteStore");

Review comment:
       Yes, the check is redundant here. I'll remove it.
   
   > Seems like we may benefit from moving this into the DynamicConstructor 
code at the top of the file?
   
   We are checking the constructed instance against some interface type. Maybe 
it will help if we add constraint to `DynamicConstructor `.




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