dzr171712 commented on code in PR #66611:
URL: https://github.com/apache/doris/pull/66611#discussion_r3818399723
##########
fe/fe-sql-parser/src/main/antlr4/org/apache/doris/nereids/DorisParser.g4:
##########
@@ -659,6 +659,7 @@ supportedAdminStatement
| ADMIN DIAGNOSE TABLET tabletId=INTEGER_VALUE
#adminDiagnoseTablet
| ADMIN SHOW REPLICA STATUS FROM baseTableRef (WHERE STATUS EQ|NEQ
STRING_LITERAL)? #adminShowReplicaStatus
| ADMIN COMPACT TABLE baseTableRef (WHERE TYPE EQ STRING_LITERAL)?
#adminCompactTable
+ | ADMIN COMPACT TABLET tabletId=INTEGER_VALUE (WHERE TYPE EQ
STRING_LITERAL)? #adminCompactTablet
Review Comment:
Fixed by making the WHERE TYPE = ... clause mandatory; previously, omitting
WHERE passed parsing and only produced a validation error instructing users to
specify it.
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/parser/LogicalPlanBuilder.java:
##########
@@ -1938,6 +1940,17 @@ public AdminCompactTableCommand
visitAdminCompactTable(AdminCompactTableContext
return new AdminCompactTableCommand(tableRefInfo, equalTo);
}
+ @Override
+ public AdminCompactTabletCommand
visitAdminCompactTablet(AdminCompactTabletContext ctx) {
+ EqualTo equalTo = null;
+ if (ctx.WHERE() != null) {
+ StringLiteral left = new
StringLiteral(stripQuotes(ctx.TYPE().getText()));
Review Comment:
Fixed by passing the compaction type directly to the command, removing the
unnecessary equality expression.
--
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]