clintropolis commented on code in PR #19830:
URL: https://github.com/apache/druid/pull/19830#discussion_r3936903947
##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidPlanner.java:
##########
@@ -147,6 +152,16 @@ private SqlStatementHandler createHandler(final SqlNode
node)
}
SqlStatementHandler.HandlerContext handlerContext = new
HandlerContextImpl();
+
+ if (query instanceof DruidSqlCreateTable || query instanceof
DruidSqlAlterTable) {
+ // The grammar does not admit EXPLAIN of a DDL statement; this guards
the case anyway, since a DDL statement
+ // has no query to explain.
+ if (explain != null) {
+ throw InvalidSqlInput.exception("EXPLAIN is not supported for [%s]",
query.getKind());
+ }
+ return createDdlHandler(handlerContext, query);
Review Comment:
done, though didn't refactor `CAN_DML`, can do that in a follow-up
--
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]