Github user vdiravka commented on a diff in the pull request: https://github.com/apache/drill/pull/549#discussion_r72142344 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/CompoundIdentifierConverter.java --- @@ -115,6 +119,18 @@ public SqlNode visitChild( enableComplex = true; } } + if (expr.getKind() == SqlKind.SELECT) { + if (((SqlSelect) expr).getFrom() instanceof DrillCompoundIdentifier) { + fullSchemasSet.add((DrillCompoundIdentifier) ((SqlSelect) expr).getFrom()); + } else if (((SqlSelect) expr).getFrom() instanceof SqlJoin) { --- End diff -- You are right. I should add recursive checking of full-schema identifier of every nested query. Anyway it doesn't help now because when I ran the query with nested subqueries with different schema-qualified tables I got an error from calcite. I've already written about it in calcite dev list.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---