Skip to content

Commit

Permalink
More review comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
parthchandra committed Jan 4, 2024
1 parent 2dca808 commit c696902
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static final class ColumnChunkPageReader implements PageReader {
private final BlockCipher.Decryptor blockDecryptor;
private final byte[] dataPageAAD;
private final byte[] dictionaryPageAAD;
private final ParquetMetricsCallback metricsCallback;
// private final ParquetMetricsCallback metricsCallback;

ColumnChunkPageReader(
BytesInputDecompressor decompressor,
Expand All @@ -89,8 +89,7 @@ static final class ColumnChunkPageReader implements PageReader {
byte[] fileAAD,
int rowGroupOrdinal,
int columnOrdinal,
ParquetReadOptions options,
ParquetMetricsCallback callback) {
ParquetReadOptions options) {
this.decompressor = decompressor;
this.compressedPages = new ArrayDeque<DataPage>(compressedPages);
this.compressedDictionaryPage = compressedDictionaryPage;
Expand All @@ -112,7 +111,6 @@ static final class ColumnChunkPageReader implements PageReader {
dataPageAAD = null;
dictionaryPageAAD = null;
}
this.metricsCallback = callback;
}

private int getPageOrdinal(int currentPageIndex) {
Expand Down Expand Up @@ -305,6 +303,7 @@ public DataPage visit(DataPageV2 dataPageV2) {
}

private void setDecompressMetrics(BytesInput bytes, long start) {
final ParquetMetricsCallback metricsCallback = options.getMetricsCallback();
if (metricsCallback != null) {
long time = Math.max(System.nanoTime() - start, 0);
long len = bytes.size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,8 @@ public ParquetFileReader(Configuration conf, Path file, ParquetMetadata footer)
* @param conf the Hadoop Configuration
* @param file Path to a parquet file
* @param footer a {@link ParquetMetadata} footer already read from the file
* @param options {@link ParquetReadOptions}
* @throws IOException if the file can not be opened
* @deprecated will be removed in 2.0.0.
*/
public ParquetFileReader(Configuration conf, Path file, ParquetMetadata footer, ParquetReadOptions options)
throws IOException {
Expand Down

0 comments on commit c696902

Please sign in to comment.