You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/12/06 12:42:48 UTC

[GitHub] [druid] abhishekagarwal87 commented on a change in pull request #11911: Human-readable and actionable SQL error messages

abhishekagarwal87 commented on a change in pull request #11911:
URL: https://github.com/apache/druid/pull/11911#discussion_r762972511



##########
File path: sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidPlanner.java
##########
@@ -209,23 +212,27 @@ public PlannerResult plan() throws SqlParseException, ValidationException, RelCo
         // Not a CannotPlanningException, rethrow without trying with bindable
         throw e;
       }
+      if (parsed.getInsertNode() != null) {
+        // Cannot INSERT with BINDABLE.
+        throw e;
+      }
       // Try again with BINDABLE convention. Used for querying Values and metadata tables.
       try {
-        return planWithBindableConvention(explain, root);
+        return planWithBindableConvention(rootQueryRel, parsed.getExplainNode());
       }
       catch (Exception e2) {
         e.addSuppressed(e2);
-        log.noStackTrace().warn(e, "Failed to plan the query '%s'", sql);
+        log.noStackTrace().warn(e, "Failed to plan the query '%s'", plannerContext.getSql());

Review comment:
       I made the changes in `QueryLifecycle` to be consistent with logging here. 




-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org