starocean999 commented on code in PR #47894:
URL: https://github.com/apache/doris/pull/47894#discussion_r1955486705
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -5637,5 +5640,59 @@ public LogicalPlan
visitShowQueuedAnalyzeJobs(ShowQueuedAnalyzeJobsContext ctx)
String stateValue = ctx.stateValue == null ? null :
stripQuotes(ctx.stateValue.getText());
return new ShowQueuedAnalyzeJobsCommand(tableName, stateKey,
stateValue);
}
+
+ @Override
+ public LogicalPlan visitDescribeTable(DorisParser.DescribeTableContext
ctx) {
+ String tableName = null;
+ if (ctx.multipartIdentifier() != null) {
+ List<String> nameParts =
visitMultipartIdentifier(ctx.multipartIdentifier());
+ tableName = nameParts.get(0); // only one entry possible
+ }
+ return new DescribeCommand(tableName, false);
+ }
+
+ @Override
+ public LogicalPlan
visitDescribeTableAll(DorisParser.DescribeTableAllContext ctx) {
+ String tableName = null;
+ if (ctx.multipartIdentifier() != null) {
+ List<String> nameParts =
visitMultipartIdentifier(ctx.multipartIdentifier());
+ tableName = nameParts.get(0); // only one entry possible
+ }
+ return new DescribeCommand(tableName, true);
+ }
+
+ @Override
+ public List<String> visitTableAlias(DorisParser.TableAliasContext ctx) {
+ if (ctx.identifierList() != null) {
+ return visitIdentifierList(ctx.identifierList());
+ }
+ return new ArrayList<>();
+ }
+
+ @Override
+ public LogicalPlan
visitDescribeTableValuedFunction(DorisParser.DescribeTableValuedFunctionContext
ctx) {
+ String tvfName = null;
+ if (ctx.tvfName != null) {
+ tvfName = ctx.tvfName.getText();
+ }
+ String alias = null;
Review Comment:
```suggestion
String alias = visitTableAlias(ctx.tableAlias());
```
--
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]