zizon commented on code in PR #12079:
URL: https://github.com/apache/iceberg/pull/12079#discussion_r1935015216


##########
parquet/src/main/java/org/apache/iceberg/parquet/ParquetIO.java:
##########
@@ -82,22 +75,10 @@ static OutputFile file(org.apache.iceberg.io.OutputFile 
file, Configuration conf
   }
 
   static SeekableInputStream stream(org.apache.iceberg.io.SeekableInputStream 
stream) {
-    if (stream instanceof DelegatingInputStream) {
-      InputStream wrapped = ((DelegatingInputStream) stream).getDelegate();
-      if (wrapped instanceof FSDataInputStream) {
-        return HadoopStreams.wrap((FSDataInputStream) wrapped);
-      }
-    }
     return new ParquetInputStreamAdapter(stream);
   }
 
   static PositionOutputStream 
stream(org.apache.iceberg.io.PositionOutputStream stream) {
-    if (stream instanceof DelegatingOutputStream) {

Review Comment:
   I think the fallback path still works as long as the `Adapter` accepts the 
correct argument type.
   
   But yes, it worth a tweet about this specialized unwrap and re-wrap behavior.
   What it purpose do is un-clear here at least for me.
   
   I  anticipate it as a simple indirect-removing technique but effectively 
leaks the `DelegatingStream` here.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to