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

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


    FunctionTemplate template = clazz.getAnnotation(FunctionTemplate.class);
    if(template == null){
      return failure("Class does not declare FunctionTemplate annotation.", clazz);
    }

    if ((template.name().isEmpty() && template.names().length == 0) || // none set
        (!template.name().isEmpty() && template.names().length != 0)) { // both are set
      return failure("Must use only one annotations 'name' or 'names', not both", clazz);
    }

    // start by getting field information.
View Full Code Here


    if(template == null){
      return failure("Class does not declare FunctionTemplate annotation.", clazz);
    }

    if ((template.name().isEmpty() && template.names().length == 0) || // none set
        (!template.name().isEmpty() && template.names().length != 0)) { // both are set
      return failure("Must use only one annotations 'name' or 'names', not both", clazz);
    }

    // start by getting field information.
    List<ValueReference> params = Lists.newArrayList();
View Full Code Here

      // return holder
      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:
View Full Code Here

    FunctionTemplate template = clazz.getAnnotation(FunctionTemplate.class);
    if (template == null) {
      return failure("Class does not declare FunctionTemplate annotation.", clazz);
    }

    if ((template.name().isEmpty() && template.names().length == 0) || // none set
        (!template.name().isEmpty() && template.names().length != 0)) { // both are set
      return failure("Must use only one annotations 'name' or 'names', not both", clazz);
    }

    // start by getting field information.
View Full Code Here

    if (template == null) {
      return failure("Class does not declare FunctionTemplate annotation.", clazz);
    }

    if ((template.name().isEmpty() && template.names().length == 0) || // none set
        (!template.name().isEmpty() && template.names().length != 0)) { // both are set
      return failure("Must use only one annotations 'name' or 'names', not both", clazz);
    }

    // start by getting field information.
    List<ValueReference> params = Lists.newArrayList();
View Full Code Here

      // return holder
      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:
View Full Code Here

    FunctionTemplate template = clazz.getAnnotation(FunctionTemplate.class);
    if(template == null){
      return failure("Class does not declare FunctionTemplate annotation.", clazz);
    }

    if ((template.name().isEmpty() && template.names().length == 0) || // none set
        (!template.name().isEmpty() && template.names().length != 0)) { // both are set
      return failure("Must use only one annotations 'name' or 'names', not both", clazz);
    }

    // start by getting field information.
View Full Code Here

    if(template == null){
      return failure("Class does not declare FunctionTemplate annotation.", clazz);
    }

    if ((template.name().isEmpty() && template.names().length == 0) || // none set
        (!template.name().isEmpty() && template.names().length != 0)) { // both are set
      return failure("Must use only one annotations 'name' or 'names', not both", clazz);
    }

    // start by getting field information.
    List<ValueReference> params = Lists.newArrayList();
View Full Code Here

      // return holder
      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:
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.