drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsuanyi <...@git.apache.org>
Subject [GitHub] drill pull request: Drill 4372 review
Date Thu, 17 Mar 2016 04:29:18 GMT
Github user hsuanyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/397#discussion_r56454322
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/DrillFunctionRegistry.java
---
    @@ -17,40 +17,66 @@
      */
     package org.apache.drill.exec.expr.fn;
     
    -import java.util.Arrays;
     import java.util.Collection;
    +import java.util.Collections;
     import java.util.HashMap;
    -import java.util.HashSet;
     import java.util.List;
    +import java.util.Map;
     import java.util.Map.Entry;
     import java.util.Set;
     
    +import com.google.common.collect.ImmutableMap;
    +import com.google.common.collect.Lists;
    +import com.google.common.collect.Maps;
    +import com.google.common.collect.Sets;
     import org.apache.calcite.sql.SqlOperator;
    +import org.apache.calcite.sql.type.SqlTypeName;
    +import org.apache.commons.lang3.tuple.Pair;
     import org.apache.drill.common.scanner.persistence.AnnotatedClassDescriptor;
     import org.apache.drill.common.scanner.persistence.ScanResult;
    -import org.apache.drill.exec.expr.DrillFunc;
    +import org.apache.drill.common.types.TypeProtos;
     import org.apache.drill.exec.planner.logical.DrillConstExecutor;
     import org.apache.drill.exec.planner.sql.DrillOperatorTable;
     import org.apache.drill.exec.planner.sql.DrillSqlAggOperator;
    +import org.apache.drill.exec.planner.sql.DrillSqlAggOperatorNotInfer;
     import org.apache.drill.exec.planner.sql.DrillSqlOperator;
     
     import com.google.common.collect.ArrayListMultimap;
    -import com.google.common.collect.Sets;
    +import org.apache.drill.exec.planner.sql.DrillSqlOperatorNotInfer;
     
    +/**
    + * Registry of Drill functions.
    + */
     public class DrillFunctionRegistry {
    -  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillFunctionRegistry.class);
    +  private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillFunctionRegistry.class);
     
    -  private ArrayListMultimap<String, DrillFuncHolder> methods = ArrayListMultimap.create();
    +  // key: function name (lowercase) value: list of functions with that name
    +  private final ArrayListMultimap<String, DrillFuncHolder> registeredFunctions
= ArrayListMultimap.create();
     
    -  /* Hash map to prevent registering functions with exactly matching signatures
    -   * key: Function Name + Input's Major Type
    -   * Value: Class name where function is implemented
    -   */
    -  private HashMap<String, String> functionSignatureMap = new HashMap<>();
    +  private static final ImmutableMap<String, Pair<Integer, Integer>> drillFuncToRange
= ImmutableMap.<String, Pair<Integer, Integer>> builder()
    --- End diff --
    
    addressed


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