korlov42 commented on code in PR #2280:
URL: https://github.com/apache/ignite-3/pull/2280#discussion_r1251689114


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/PrepareServiceImpl.java:
##########
@@ -183,19 +174,25 @@ public void onSchemaUpdated() {
         cache.clear();
     }
 
-    private CompletableFuture<QueryPlan> prepareDdl(SqlNode sqlNode, 
PlanningContext ctx) {
+    private CompletableFuture<QueryPlan> prepareDdl(ParsedResult parsedResult, 
PlanningContext ctx) {
+        SqlNode sqlNode = parsedResult.parsedTree();
+
         assert sqlNode instanceof SqlDdl : sqlNode == null ? "null" : 
sqlNode.getClass().getName();
 
         return CompletableFuture.completedFuture(new 
DdlPlan(ddlConverter.convert((SqlDdl) sqlNode, ctx)));
     }
 
-    private CompletableFuture<QueryPlan> prepareExplain(SqlNode explain, 
PlanningContext ctx) {
+    private CompletableFuture<QueryPlan> prepareExplain(ParsedResult 
parsedResult, PlanningContext ctx) {
         return CompletableFuture.supplyAsync(() -> {
             IgnitePlanner planner = ctx.planner();
 
+            SqlNode sqlNode = parsedResult.parsedTree();
+
+            assert single(sqlNode);
+
             // Validate
             // We extract query subtree inside the validator.
-            SqlNode explainNode = planner.validate(explain);
+            SqlNode explainNode = planner.validate(sqlNode);

Review Comment:
   This patch was never meant to address this issue. I've filed separate JIRA 
case for this https://issues.apache.org/jira/browse/IGNITE-19908



-- 
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]

Reply via email to