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