Gabriel39 commented on code in PR #69277:
URL: https://github.com/apache/doris/pull/69277#discussion_r4323190682
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -9583,6 +9583,28 @@ public LogicalPlan
visitWarmUpSelect(DorisParser.WarmUpSelectContext ctx) {
}
LogicalProject project = new LogicalProject(projectList, filter);
+ Map<String, String> properties = visitPropertyClause(ctx.properties);
+ for (String key : properties.keySet()) {
+ if (!"read_index_only".equals(key)) {
+ throw new AnalysisException("Unknown WARM UP SELECT property:
" + key);
+ }
+ }
+ String indexOnly = properties.getOrDefault("read_index_only", "false");
+ if (!"true".equalsIgnoreCase(indexOnly) &&
!"false".equalsIgnoreCase(indexOnly)) {
+ throw new AnalysisException("read_index_only must be true or
false");
+ }
+ if (Boolean.parseBoolean(indexOnly)) {
+ if (ctx.whereClause() != null || ctx.explain() != null) {
+ throw new AnalysisException("Index-only WARM UP SELECT does
not support WHERE or EXPLAIN");
+ }
+ // Index cache fills must not execute the data scan or require the
data-file cache.
+ List<String> columns = indexWarmupColumns(ctx, projectList);
+ UnboundBlackholeSink<?> sink = new UnboundBlackholeSink<>(project,
+ new UnboundBlackholeSinkContext(true));
+ return new WarmupSelectCommand(sink,
+ new
TableNameInfo(visitMultipartIdentifier(ctx.warmUpSingleTableRef().multipartIdentifier())),
Review Comment:
Fixed in
[90ed9b4c2a](https://github.com/apache/doris/commit/90ed9b4c2a1d329cbecbb9f889430d4934e5b81a).
The command retains the complete original FROM identifier and resolves it
through RelationUtil before table access. The normal one-to-three-part
validation now rejects bogus.lake.db.items instead of letting TableNameInfo
drop the leading component.
A negative regression asserts that the full invalid identifier appears in
the error and that privilege/table access is not reached. All 113 focused FE
tests and FE Checkstyle pass.
--
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]