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:50:03 GMT
Github user hsuanyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/397#discussion_r56455160
  
    --- Diff: contrib/storage-hive/core/src/main/java/org/apache/drill/exec/expr/fn/HiveFunctionRegistry.java
---
    @@ -204,4 +220,46 @@ private HiveFuncHolder matchAndCreateUDFHolder(String udfName,
         return null;
       }
     
    +  public class HiveSqlReturnTypeInference implements SqlReturnTypeInference {
    +    private HiveSqlReturnTypeInference() {
    +
    +    }
    +
    +    @Override
    +    public RelDataType inferReturnType(SqlOperatorBinding opBinding) {
    +      for (RelDataType type : opBinding.collectOperandTypes()) {
    +        final TypeProtos.MinorType minorType = TypeInferenceUtils.getDrillTypeFromCalciteType(type);
    +        if(minorType == TypeProtos.MinorType.LATE) {
    +          return opBinding.getTypeFactory()
    +              .createTypeWithNullability(
    +                  opBinding.getTypeFactory().createSqlType(SqlTypeName.ANY),
    +                  true);
    +        }
    +      }
    +
    +      final FunctionCall functionCall = TypeInferenceUtils.convertSqlOperatorBindingToFunctionCall(opBinding);
    +      final HiveFuncHolder hiveFuncHolder = getFunction(functionCall);
    +      if(hiveFuncHolder == null) {
    +        String operandTypes = "";
    --- 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