[ 
https://issues.apache.org/jira/browse/DRILL-8057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470627#comment-17470627
 ] 

ASF GitHub Bot commented on DRILL-8057:
---------------------------------------

vvysotskyi commented on a change in pull request #2388:
URL: https://github.com/apache/drill/pull/2388#discussion_r780266603



##########
File path: 
exec/java-exec/src/main/java/org/apache/calcite/jdbc/DynamicRootSchema.java
##########
@@ -154,10 +157,25 @@ private void loadSchemaFactory(String schemaName, boolean 
caseSensitive) {
     }
   }
 
-  static class RootSchema extends AbstractSchema {
+  public static class RootSchema extends AbstractSchema {
 
-    public RootSchema() {
+    private StoragePluginRegistry storages;
+
+    private DynamicRootSchema dynRootSchema;
+
+    public RootSchema(StoragePluginRegistry storages) {
       super(Collections.emptyList(), ROOT_SCHEMA_NAME);
+      this.storages = storages;
+    }
+
+    @Override
+    public Set<String> getSubSchemaNames() {
+      return storages.availablePlugins();
+    }
+
+    @Override
+    public Schema getSubSchema(String name) {

Review comment:
       Could you please explain why we should override this method and delegate 
calls to `DynamicRootSchema`?

##########
File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaFilter.java
##########
@@ -226,6 +281,10 @@ private Result evaluateHelperFunction(Map<String, String> 
recordValues, Function
       }
 
       case "in": {
+        // I don't believe that this case will ever run.  The IN operator is 
compiled either

Review comment:
       I think it is possible when a user submits plan instead of query.




-- 
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]


> INFORMATION_SCHEMA filter push down is inefficient
> --------------------------------------------------
>
>                 Key: DRILL-8057
>                 URL: https://issues.apache.org/jira/browse/DRILL-8057
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Storage - Information Schema
>    Affects Versions: 1.19.0
>            Reporter: James Turton
>            Assignee: James Turton
>            Priority: Major
>             Fix For: 1.20.0
>
>
> WHERE clauses in queries against INFORMATION_SCHEMA do not stop Drill from 
> fetching a schema hierarchy from all enabled storage configs.  This results 
> in abysmal performance when unresponsive data sources are enabled, as 
> reported by users in the Apache Drill Slack channels.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to