@Override
  public VectorExpressionDescriptor.Descriptor getDescriptor() {
    VectorExpressionDescriptor.Builder b = new VectorExpressionDescriptor.Builder();
    b.setMode(VectorExpressionDescriptor.Mode.PROJECTION)
            .setNumArguments(2)
            .setArgumentTypes(
                    VectorExpressionDescriptor.ArgumentType.STRING_FAMILY,
                    VectorExpressionDescriptor.ArgumentType.STRING_FAMILY)
            .setInputExpressionTypes(
                    VectorExpressionDescriptor.InputExpressionType.COLUMN,
                    VectorExpressionDescriptor.InputExpressionType.SCALAR);
    return b.build();
  }
This is a superclass for binary string functions that operate directly on the
input and set the output. First parameter is a column second is a scalar.
It is suitable for direct, in-place operations on
strings, such as for fast implementations of two parameter version of  TRIM(), LTRIM(), and RTRIM().
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/StringTrimColScalarBase.java