github-actions[bot] commented on code in PR #69277:
URL: https://github.com/apache/doris/pull/69277#discussion_r4322996714
##########
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:
[P3] Reject overqualified table names before constructing TableNameInfo
`WARM UP SELECT * FROM bogus.lake.db.items PROPERTIES
(read_index_only=true)` is accepted here, but `TableNameInfo(List<String>)`
keeps only the last three components, so an existing `lake.db.items` is warmed
and `bogus` is silently ignored. Index-only execution bypasses `BindRelation`,
which rejects this four-part identifier for ordinary SELECT and data warmup.
Validate that the original FROM identifier has one to three parts before
constructing `TableNameInfo`, and cover this negative case.
--
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]