Package org.apache.drill.common.expression

Examples of org.apache.drill.common.expression.Arg


 
  @Override
  public FunctionDefinition[] getFunctionDefintions() {
    return new FunctionDefinition[]{
        FunctionDefinition.simple("regex_like", new BasicArgumentValidator( //
            new Arg(true, false, "pattern", MinorType.VARCHAR, MinorType.VARCHAR), //
            new Arg(false, true, "value", MinorType.FIXEDCHAR, MinorType.VARCHAR, MinorType.VARCHAR) ), FixedType.FIXED_BIT),
    };

  }
View Full Code Here


    @Override
    public FunctionDefinition[] getFunctionDefintions() {
      return new FunctionDefinition[] {
          FunctionDefinition.simple("repeated_contains", new BasicArgumentValidator( //
              new Arg("repeatedToSearch", //
                  Types.repeated(MinorType.BIGINT), //
                  Types.repeated(MinorType.INT)), //
              new Arg("targetValue", Types.required(MinorType.BIGINT))), //
              OutputTypeDeterminer.FixedType.FIXED_BIT),

          FunctionDefinition.simple(
              "repeated_count",
              new BasicArgumentValidator(new Arg("repeatedToSearch", Types.repeated(MinorType.BIGINT), Types
                  .repeated(MinorType.INT))), new OutputTypeDeterminer.FixedType(Types.required(MinorType.INT)))

      };
    }
View Full Code Here

    @Override
    public FunctionDefinition[] getFunctionDefintions() {
      return new FunctionDefinition[] {
          FunctionDefinition.simple("charsubstring",
                                    new BasicArgumentValidator(new Arg(Types.required(TypeProtos.MinorType.VARCHAR),
                                                                       Types.optional(TypeProtos.MinorType.VARCHAR)),
                                                               new Arg(false, false, "offset", TypeProtos.MinorType.BIGINT),
                                                               new Arg(false, false, "length", TypeProtos.MinorType.BIGINT)),
                                    new OutputTypeDeterminer.SameAsFirstInput(),
                                    "substring",
                                    "substr")
      };
    }
View Full Code Here

    @Override
    public FunctionDefinition[] getFunctionDefintions() {
      return new FunctionDefinition[] {
          FunctionDefinition.simple("bytesubstring",
                                    new BasicArgumentValidator(new Arg(Types.required(TypeProtos.MinorType.VARBINARY),
                                                                       Types.optional(TypeProtos.MinorType.VARBINARY)),
                                                               new Arg(false, false, "offset", TypeProtos.MinorType.BIGINT),
                                                               new Arg(false, false, "length", TypeProtos.MinorType.BIGINT)),
                                    new OutputTypeDeterminer.SameAsFirstInput(),
                                    "byte_substr")
      };
    }
View Full Code Here

TOP

Related Classes of org.apache.drill.common.expression.Arg

Copyright © 2018 www.massapicom. 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.