Package org.apache.drill.exec.expr.annotations

Examples of org.apache.drill.exec.expr.annotations.FunctionTemplate.scope()


          return new DrillSimpleFuncHolder(template.scope(), template.nulls(),
                                           template.isBinaryCommutative(),
                                           template.isRandom(), registeredNames,
                                           ps, outputField, works, methods, imports, template.costCategory());
      case SC_BOOLEAN_OPERATOR:
        return new DrillBooleanOPHolder(template.scope(), template.nulls(),
            template.isBinaryCommutative(),
            template.isRandom(), registeredNames,
            ps, outputField, works, methods, imports);
       
      case DECIMAL_MAX_SCALE:
View Full Code Here


            template.isBinaryCommutative(),
            template.isRandom(), registeredNames,
            ps, outputField, works, methods, imports);
       
      case DECIMAL_MAX_SCALE:
          return new DrillDecimalMaxScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MUL_SCALE:
          return new DrillDecimalSumScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ADD_SCALE:
View Full Code Here

       
      case DECIMAL_MAX_SCALE:
          return new DrillDecimalMaxScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MUL_SCALE:
          return new DrillDecimalSumScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ADD_SCALE:
          return new DrillDecimalAddFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_CAST:
View Full Code Here

                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MUL_SCALE:
          return new DrillDecimalSumScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ADD_SCALE:
          return new DrillDecimalAddFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_CAST:
          return new DrillDecimalCastFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_DIV_SCALE:
View Full Code Here

                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ADD_SCALE:
          return new DrillDecimalAddFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_CAST:
          return new DrillDecimalCastFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_DIV_SCALE:
          return new DrillDecimalDivScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MOD_SCALE:
View Full Code Here

                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_CAST:
          return new DrillDecimalCastFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_DIV_SCALE:
          return new DrillDecimalDivScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MOD_SCALE:
          return new DrillDecimalModScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SET_SCALE:
View Full Code Here

                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_DIV_SCALE:
          return new DrillDecimalDivScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MOD_SCALE:
          return new DrillDecimalModScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SET_SCALE:
          return new DrillDecimalSetScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ZERO_SCALE:
View Full Code Here

                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_MOD_SCALE:
          return new DrillDecimalModScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SET_SCALE:
          return new DrillDecimalSetScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ZERO_SCALE:
          return new DrillDecimalZeroScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case HOLISTIC_AGGREGATE:
View Full Code Here

                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SET_SCALE:
          return new DrillDecimalSetScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_ZERO_SCALE:
          return new DrillDecimalZeroScaleFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
                  template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case HOLISTIC_AGGREGATE:
      case RANGE_AGGREGATE:
      default:
        return failure("Unsupported Function Type.", clazz);
View Full Code Here

        if (isInject && !field.getType().equals(DrillBuf.class)) {
          return failure(String.format("Only DrillBuf is allowed to be injected.  You attempted to inject %s.", field.getType()), clazz, field);
        }
        WorkspaceReference wsReference = new WorkspaceReference(field.getType(), field.getName(), isInject);

        if (!isInject && template.scope() == FunctionScope.POINT_AGGREGATE && !ValueHolder.class.isAssignableFrom(field.getType()) ) {
          return failure(String.format("Aggregate function '%s' workspace variable '%s' is of type '%s'. Please change it to Holder type.", template.name(), field.getName(), field.getType()), clazz, field);
        }

        //If the workspace var is of Holder type, get its MajorType and assign to WorkspaceReference.
        if (ValueHolder.class.isAssignableFrom(field.getType())) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.