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: [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]