github-actions[bot] commented on code in PR #66261:
URL: https://github.com/apache/doris/pull/66261#discussion_r3682447028
##########
be/src/format_v2/table_reader.cpp:
##########
@@ -765,6 +765,50 @@ Status TableReader::_build_table_filters_from_conjuncts() {
return Status::OK();
}
+Status TableReader::refresh_conjuncts(VExprContextSPtrs conjuncts) {
+ _conjuncts = std::move(conjuncts);
+ if (_data_reader.reader == nullptr) {
+ // The split is prepared but its physical reader has not opened yet.
open_reader() will use
+ // this newest snapshot directly, so no pending request is needed.
+ return Status::OK();
+ }
+ if (!_data_reader.reader->supports_scan_request_refresh()) {
+ return Status::OK();
+ }
+
+ RETURN_IF_ERROR(_build_table_filters_from_conjuncts());
+ auto refreshed_request = std::make_shared<FileScanRequest>();
+ RETURN_IF_ERROR(_data_reader.column_mapper->create_scan_request(
Review Comment:
[P1] Keep the mapper snapshot valid across refresh
`create_scan_request()` rebuilds every active mapping projection, but this
refresh path never prepares/opens those replacements and mutates the shared
mapper immediately even though Parquet delays the new request until a row-group
boundary. With a schema-evolution cast, the next `finalize_chunk()` executes a
fresh `Cast` before `prepare()` initializes its function, causing a
failure/crash; nested projection state can likewise diverge from the
still-active block layout. Please keep mapper/layout/request state immutable
and activate it together, or avoid rebuilding active projections and prepare
every replacement before use.
##########
be/src/format_v2/table_reader.cpp:
##########
@@ -765,6 +765,50 @@ Status TableReader::_build_table_filters_from_conjuncts() {
return Status::OK();
}
+Status TableReader::refresh_conjuncts(VExprContextSPtrs conjuncts) {
+ _conjuncts = std::move(conjuncts);
+ if (_data_reader.reader == nullptr) {
Review Comment:
[P2] Forward refreshes through active hybrid readers
`PaimonHybridReader` and `HudiHybridReader` keep their real native/JNI child
in `_current_split_reader`, never populate this base `_data_reader.reader`, and
do not override `refresh_conjuncts()`. This return therefore leaves the active
child on its old predicate snapshot. Scanner residual filtering preserves rows,
but later Parquet row-group pruning and JNI-side early filtering are lost for
the rest of the split. Please retain the newest outer snapshot and forward a
clone to the current child.
--
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]