github-actions[bot] commented on code in PR #66042:
URL: https://github.com/apache/doris/pull/66042#discussion_r3654248074
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java:
##########
@@ -758,7 +758,13 @@ private LogicalPlan getLogicalPlan(TableIf table,
UnboundRelation unboundRelatio
String ddlSql = hmsTable.getViewText();
Plan hiveViewPlan = parseAndAnalyzeExternalView(
hmsTable, hiveCatalog, hiveDb, ddlSql,
cascadesContext);
- return new LogicalSubQueryAlias<>(qualifiedTableName,
hiveViewPlan);
+ // Hive view body slot names may diverge from the
declared view schema; pass the
+ // schema as aliases so the outer query resolves
columns by the view definition.
+ List<String> columnAliases =
hmsTable.getFullSchema().stream()
Review Comment:
[P1] Preserve the nullable schema fallback before streaming
`HMSExternalTable.getFullSchema()` returns `null` when its schema-cache
lookup is empty. The child `LogicalView.computeOutput()` explicitly accepts
null/empty schemas and falls back to the analyzed body, but this eager
`.stream()` runs first and turns the catalog-drop/cache-lifecycle case into an
uncontextualized NPE. Please either preserve that fallback here or raise a
contextual `AnalysisException`, and add a null-schema binding test.
--
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]