Examples of ExpressionParsingException


Examples of org.apache.drill.common.exceptions.ExpressionParsingException

  @JsonCreator
  public Project(@JsonProperty("projections") NamedExpression[] selections) {
    this.selections = selections;
    if (selections == null || selections.length == 0) {
      throw new ExpressionParsingException(
          "Project did not provide any projection selections.  At least one projection must be provided.");
//    for (int i = 0; i < selections.length; i++) {
//      PathSegment segment = selections[i].getRef().getRootSegment();
//      CharSequence path = segment.getNameSegment().getPath();
//      if (!segment.isNamed() || !path.equals("output"))
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    case BOOLEAN:
      return OptionValue.createBoolean(type, name, (Boolean) literal.getValue());

    }

    throw new ExpressionParsingException(String.format(
        "Drill doesn't support set option expressions with literals of type %s.", literal.getTypeName()));
  }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    @Override
    public void validate(OptionValue v) throws ExpressionParsingException {
      super.validate(v);
      if (v.num_val > max || v.num_val < 0) {
        throw new ExpressionParsingException(String.format("Option %s must be between %d and %d.", getOptionName(), 0,
            max));
      }
    }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    @Override
    public void validate(OptionValue v) throws ExpressionParsingException {
      super.validate(v);
      if (!isPowerOfTwo(v.num_val)) {
        throw new ExpressionParsingException(String.format("Option %s must be a power of two.", getOptionName()));
      }
    }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    @Override
    public void validate(OptionValue v) throws ExpressionParsingException {
      super.validate(v);
      if (v.float_val > max || v.float_val < min) {
        throw new ExpressionParsingException(String.format("Option %s must be between %d and %d.", getOptionName(), min,
            max));
      }
    }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    }

    @Override
    public void validate(OptionValue v) throws ExpressionParsingException {
      if (v.kind != kind) {
        throw new ExpressionParsingException(String.format("Option %s must be of type %s but you tried to set to %s.",
            getOptionName(), kind.name(), v.kind.name()));
      }
    }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

  public static JoinRelType resolve(String val){
    for (JoinRelType jt : JoinRelType.values()) {
      if (jt.name().equalsIgnoreCase(val))
        return jt;
    }
    throw new ExpressionParsingException(String.format("Unable to determine join type for value '%s'.", val));
  }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

  @JsonCreator
  public Project(@JsonProperty("projections") NamedExpression[] selections) {
    this.selections = selections;
    if (selections == null || selections.length == 0)
      throw new ExpressionParsingException(
          "Project did not provide any projection selections.  At least one projection must be provided.");
//    for (int i = 0; i < selections.length; i++) {
//      PathSegment segment = selections[i].getRef().getRootSegment();
//      CharSequence path = segment.getNameSegment().getPath();
//      if (!segment.isNamed() || !path.equals("output"))
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    case BOOLEAN:
      return OptionValue.createBoolean(type, name, (Boolean) literal.getValue());

    }

    throw new ExpressionParsingException(String.format(
        "Drill doesn't support set option expressions with literals of type %s.", literal.getTypeName()));
  }
View Full Code Here

Examples of org.apache.drill.common.exceptions.ExpressionParsingException

    @Override
    public void validate(OptionValue v) throws ExpressionParsingException {
      super.validate(v);
      if (v.num_val > max || v.num_val < 0)
        throw new ExpressionParsingException(String.format("Option %s must be between %d and %d.", getOptionName(), 0,
            max));
    }
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.