drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julienledem <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-4047: Select with options
Date Sat, 07 Nov 2015 01:28:19 GMT
Github user julienledem commented on a diff in the pull request:

    https://github.com/apache/drill/pull/246#discussion_r44204824
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
---
    @@ -221,9 +603,46 @@ public void dropView(String viewName) throws IOException {
           return viewSet;
         }
     
    +    private Set<String> rawTableNames() {
    +      return newHashSet(
    +          transform(tables.keySet(), new com.google.common.base.Function<TableInstance,
String>() {
    +        @Override
    +        public String apply(TableInstance input) {
    +          return input.sig.name;
    +        }
    +      }));
    +    }
    +
         @Override
         public Set<String> getTableNames() {
    -      return Sets.union(tables.keySet(), getViews());
    +      System.out.println("getTableNames");
    +      return Sets.union(rawTableNames(), getViews());
    +    }
    +
    +    @Override
    +    public Set<String> getFunctionNames() {
    +      System.out.println("getFunctionNames");
    +      return rawTableNames();
    +    }
    +
    +    @Override
    +    public List<Function> getFunctions(String name) {
    +      System.out.println("getFunctions(" + name + ")");
    +      List<TableSignature> sigs = optionExtractor.getTableSignatures(name);
    +      System.out.println(sigs);
    +//      List<TableSignature> sigs = Arrays.asList(
    +//          new TableSignature(name, new TableParamDef("delimiter", String.class, true)),
    +//          new TableSignature(name, new TableParamDef("delimiter", Integer.TYPE, true)),
    +//          new TableSignature(name, new TableParamDef("foo", Integer.TYPE, true), new
TableParamDef("bar", Integer.TYPE, true)),
    +//          new TableSignature(name, new TableParamDef("foo", String.class, true))
    +//      );
    --- End diff --
    
    todo:cleanup


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message