wgtmac commented on code in PR #3262:
URL: https://github.com/apache/parquet-java/pull/3262#discussion_r2259152621


##########
parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestDataPageChecksums.java:
##########
@@ -688,8 +690,13 @@ private int getDataOffset(Page page) {
    */
   private ParquetFileReader getParquetFileReader(Path path, Configuration 
conf, List<ColumnDescriptor> columns)
       throws IOException {
-    ParquetMetadata footer = ParquetFileReader.readFooter(conf, path);
-    return new ParquetFileReader(conf, footer.getFileMetaData(), path, 
footer.getBlocks(), columns);
+    HadoopInputFile inputFile = HadoopInputFile.fromPath(path, conf);
+    SeekableInputStream inputStream = inputFile.newStream();
+    ParquetReadOptions readOptions = HadoopReadOptions.builder(conf).build();
+    ParquetMetadata footer = ParquetFileReader.readFooter(inputFile, 
readOptions, inputStream);
+    ParquetFileReader reader = ParquetFileReader.open(inputFile, footer, 
readOptions, inputStream);
+    reader.setRequestedSchema(columns);
+    return reader;

Review Comment:
   It would be better to explicitly add a new test case rather than silently 
changing old ones.



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