github-actions[bot] commented on code in PR #64933:
URL: https://github.com/apache/doris/pull/64933#discussion_r3498909163
##########
be/src/exec/operator/schema_scan_operator.cpp:
##########
@@ -186,6 +187,8 @@ Status SchemaScanOperatorX::prepare(RuntimeState* state) {
for (; j < columns_desc.size(); ++j) {
if (boost::iequals(_dest_tuple_desc->slots()[i]->col_name(),
columns_desc[j].name)) {
_slot_offsets[i] = j;
+ _common_scanner_param->required_columns.insert(
Review Comment:
This still derives `required_columns` from the scan tuple descriptor, but
the normal SQL path does not actually shrink that tuple for schema scans.
`LogicalSchemaScan` is not `OutputPrunable`, so for a query like `SELECT
UPDATE_TIME FROM information_schema.tables ...`, column pruning can leave the
`LogicalSchemaScan` with its full schema output and place a
`Project(UPDATE_TIME)` above it. The implementation rule then copies the scan's
full logical properties into `PhysicalSchemaScan`, and
`PhysicalPlanTranslator.visitPhysicalSchemaScan()` builds the BE tuple
descriptor from `schemaScan.getOutput()`. This loop therefore inserts every
`TABLES` column, so FE still sees `TABLE_ROWS`, `DATA_LENGTH`,
`AVG_ROW_LENGTH`, and `INDEX_LENGTH` as required and calls
`getTableStatusStats()`. The new unit tests only call `listTableStatus()` with
a hand-built pruned `requiredColumns` set, so they do not cover the planner
path that is supposed to produce that set. Please carry the actually required
schema-scan slots through planning, or add another FE/BE-side source of final
slot requirements, and cover an `information_schema.tables` SQL projection such
as only `UPDATE_TIME`.
--
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]