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

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


                  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

        // workspace work.
        boolean isInject = inject != null;
        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

      ValueReference[] ps = params.toArray(new ValueReference[params.size()]);
      WorkspaceReference[] works = workspaceFields.toArray(new WorkspaceReference[workspaceFields.size()]);


      String[] registeredNames = ((template.name().isEmpty()) ? template.names() : new String[] {template.name()} );
      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
View Full Code Here


      String[] registeredNames = ((template.name().isEmpty()) ? template.names() : new String[] {template.name()} );
      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SUM_AGGREGATE:
View Full Code Here

      switch(template.scope()){
      case POINT_AGGREGATE:
        return new DrillAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SUM_AGGREGATE:
        return new DrillDecimalSumAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case SIMPLE:
View Full Code Here

          template.isRandom(), registeredNames, ps, outputField, works, methods, imports, template.costCategory());
      case DECIMAL_AGGREGATE:
        return new DrillDecimalAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case DECIMAL_SUM_AGGREGATE:
        return new DrillDecimalSumAggFuncHolder(template.scope(), template.nulls(), template.isBinaryCommutative(),
          template.isRandom(), registeredNames, ps, outputField, works, methods, imports);
      case SIMPLE:
        if (outputField.isComplexWriter)
          return new DrillComplexWriterFuncHolder(template.scope(), template.nulls(),
              template.isBinaryCommutative(),
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.