arina-ielchiieva commented on a change in pull request #1792: DRILL-7250: Query 
with CTE fails when its name matches to the table name without access
URL: https://github.com/apache/drill/pull/1792#discussion_r285529572
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/calcite/jdbc/DynamicRootSchema.java
 ##########
 @@ -61,6 +61,8 @@ public StoragePluginRegistry getSchemaFactories() {
   @Override
   protected CalciteSchema getImplicitSubSchema(String schemaName,
                                                boolean caseSensitive) {
+    // Drill registers schemas in lower case, see AbstractSchema constructor
+    schemaName = schemaName != null ? schemaName.toLowerCase() : null;
 
 Review comment:
   Not critical, but maybe it's better to invert: `schemaName == null ? ...`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to