nastra commented on code in PR #12079:
URL: https://github.com/apache/iceberg/pull/12079#discussion_r1932378730
##########
parquet/src/test/java/org/apache/iceberg/parquet/TestParquet.java:
##########
@@ -219,6 +228,191 @@ public void testTwoLevelList() throws IOException {
assertThat(recordRead.get("topbytes")).isEqualTo(expectedBinary);
}
+ @Test
+ public void testStreamClosedProperly() throws IOException {
+ // test for input
+ {
+ class TestStreamClosedProperlyStream extends SeekableInputStream
+ implements DelegatingInputStream {
+ boolean thisClosed = false;
+ boolean delegateClosed = false;
+
+ {
+ reset();
+ }
+
+ @Override
+ public InputStream getDelegate() {
+ return new FSDataInputStream(
+ new InputStream() {
Review Comment:
is this actually the right type of stream being created here? Should this
rather be as shown below?
```
return new FSDataInputStream(
HadoopStreams.wrap(
new SeekableInputStream() {
@Override
public long getPos() throws IOException {
return 0;
}
@Override
public void seek(long newPos) throws IOException {}
@Override
public int read() {
return 0;
}
@Override
public void close() {
delegateClosed = true;
}
}));
```
--
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]