gaborkaszab commented on code in PR #18198:
URL: https://github.com/apache/iceberg/pull/18198#discussion_r4065374507


##########
flink/v1.20/flink/src/test/java/org/apache/iceberg/flink/maintenance/operator/TestDataFileRewriteRunner.java:
##########
@@ -225,7 +225,7 @@ void testError() throws Exception {
                   .poll()
                   .getValue()
                   .getMessage())
-          .contains("File does not exist: ");
+          .contains("Failed to open input stream for file: ");

Review Comment:
   This is an error scenario test that verifies that reading from missing files 
is handled gracefully. The error text changes because we create `InputFile` 
differently: via the `newInputFile` variant that accepts a length.
   
   Originally the test failed when doing an extra RPC to get the length before 
reading the file:
   ```
   NotFoundException: File does not exist: 
/tmp/.../generic-appender-partition-test-...
     at HadoopInputFile.lazyStat(HadoopInputFile.java:166)
     at HadoopInputFile.getLength(HadoopInputFile.java:177)
     at Parquet$ReadBuilder.<init>(Parquet.java:1334)      <-- reads length up 
front
     at Parquet.read(Parquet.java:1254)
     at ParquetFormatModel.readBuilder(ParquetFormatModel.java:140)
     at 
RowDataFileScanTaskReader.newIterable(RowDataFileScanTaskReader.java:108)
   ```
   
   While now the extra RPC is gone, this fails when trying to actually open the 
file:
   ```
   NotFoundException: Failed to open input stream for file: 
/tmp/.../generic-appender-partition-test-...
     at HadoopInputFile.newStream(HadoopInputFile.java:187)
     at EagerInputFile.newStream(EagerInputFile.java:76)
     at ParquetIO$ParquetInputFile.newStream(ParquetIO.java:254)
     at ParquetFileReader.<init>(ParquetFileReader.java:961)
     at ReadConf.newReader(ReadConf.java:194)
   ```
   
   I think this is acceptable. WDYT @pvary ?



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