jnturton commented on code in PR #2655:
URL: https://github.com/apache/drill/pull/2655#discussion_r981927883
##########
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DrillSqlWorker.java:
##########
@@ -130,11 +132,18 @@ private static PhysicalPlan convertPlan(QueryContext
context, String sql, Pointe
logger.trace("There was an error during conversion into physical plan. "
+
"Will sync remote and local function registries if needed and retry
" +
"in case if issue was due to missing function implementation.", e);
- // it is prohibited to retry query planning for ANALYZE statement since
it changes
- // query-level option values and will fail when rerunning with updated
values
- if (context.getFunctionRegistry().syncWithRemoteRegistry(
- context.getDrillOperatorTable().getFunctionRegistryVersion())
- && context.getSQLStatementType() != SqlStatementType.ANALYZE) {
+
+ int funcRegVer =
context.getDrillOperatorTable().getFunctionRegistryVersion();
+ // We do not retry conversion if the error is a UserException of type
RESOURCE
+ boolean isResourceErr = e instanceof UserException && ((UserException)
e).getErrorType() == RESOURCE;
Review Comment:
@vvysotskyi do you think that some new variable in UserException or
UserExceptionContext which indicates that a plugin was disabled as a result of
the underlying error would be preferable? This exception is visible in all of
the needed places and seems like a pretty natural home for this information...
--
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]