jnturton commented on code in PR #2655: URL: https://github.com/apache/drill/pull/2655#discussion_r979810768
########## 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 when plugin auto disabling is switched on then this second attempt to convert the query fails with an error of "schema not found" because the plugin has been disabled. This error isn't as informative to the user as the original error raised when attempting to access the plugin so I didn't want this to be the error that they get back... -- 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: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org