weijietong commented on code in PR #9705:
URL: https://github.com/apache/paimon/pull/9705#discussion_r3986502668
##########
paimon-core/src/main/java/org/apache/paimon/operation/DataEvolutionSplitRead.java:
##########
@@ -593,27 +685,52 @@ private FileRecordReader<InternalRow> createFileReader(
RowType readRowType,
@Nullable DeletionVectorWithRange deletionVector)
throws IOException {
- return createFileReader(
- partition,
- file,
- formatReaderMapping,
- rowRanges,
- readRowType,
- readTarget(file, dataFilePathFactory, rowRanges),
- deletionVector,
- null);
+ return (FileRecordReader<InternalRow>)
+ createFileReader(
+ partition,
+ file,
+ dataFilePathFactory,
+ formatReaderMapping,
+ rowRanges,
+ readRowType,
+ readTarget(file, dataFilePathFactory, rowRanges),
+ deletionVector,
+ null,
+ null);
}
- private FileRecordReader<InternalRow> createFileReader(
+ private RecordReader<InternalRow> createFileReader(
BinaryRow partition,
DataFileMeta file,
+ DataFilePathFactory dataFilePathFactory,
FormatReaderMapping formatReaderMapping,
List<Range> rowRanges,
RowType readRowType,
FileReadTarget readTarget,
@Nullable DeletionVectorWithRange deletionVector,
- @Nullable FileIndexResult fileIndexResult)
+ @Nullable FileIndexResult fileIndexResult,
+ @Nullable RowRange fileRowRange)
throws IOException {
+ // When a row range is requested but the caller did not pre-compute a
file index result
+ // (e.g. the DataBunch merge path), build the selection bitmap here so
a pushdown-capable
+ // format (parquet) prunes row groups by both endpoints. fileRowRange
is non-null only for a
+ // full-scan range read (no filter / DV), so physical == effective
here.
+ if (fileRowRange != null && fileIndexResult == null) {
+ fileIndexResult =
+ FileIndexEvaluator.evaluate(
+ fileIO,
+ formatReaderMapping.getDataSchema(),
Review Comment:
done
--
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]