You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2022/01/07 13:52:18 UTC

[GitHub] [drill] vvysotskyi commented on a change in pull request #2388: DRILL-8057: INFORMATION_SCHEMA filter push down is inefficient

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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org