You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/11/18 00:46:47 UTC
[GitHub] [pinot] agavra commented on a diff in pull request #9818: [multistage] m0ar tests! (binary, boolean, char, time)
agavra commented on code in PR #9818:
URL: https://github.com/apache/pinot/pull/9818#discussion_r1025881018
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/QueryEnvironment.java:
##########
@@ -129,6 +130,9 @@ public QueryPlan planQuery(String sqlQuery, SqlNodeAndOptions sqlNodeAndOptions)
plannerContext.setOptions(sqlNodeAndOptions.getOptions());
RelRoot relRoot = compileQuery(sqlNodeAndOptions.getSqlNode(), plannerContext);
return toDispatchablePlan(relRoot, plannerContext);
+ } catch (CalciteContextException e) {
+ throw new RuntimeException("Error composing query plan for '" + sqlQuery
+ + "': " + e.getMessage() + "'", e);
Review Comment:
This allows us to bubble up the error from the underlying message. e.g. instead of the user seeing `"Error composing query plan for : 'some sql'"` they'll see more details in the case of a `CalciteContextException`, which will give info like `Cannot use operator '=' to compare <STRING> and <INTEGER>`. I didn't want to bubble up any random exception because some might have really unehlpeful error messages, thats' why I separate out the clauses.
--
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@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org