Examples of ExpressionParsingException


Examples of cambridge.ExpressionParsingException

    public Expression parse(String expressionString, int line, int col) throws ExpressionParsingException {

        try {
            return new OgnlExpression(Ognl.parseExpression(expressionString), expressionString);
        } catch (OgnlException e) {
            throw new ExpressionParsingException(line, col, "Error parsing expression on line: " + line + ", column: " + col + ", expression: " + expressionString, e);
        }
    }
View Full Code Here

Examples of cambridge.ExpressionParsingException

        org.apache.commons.jexl2.Expression compiledExpression;
        try {
            DebugInfo debug = new DebugInfo(expressionString, line, column);
            compiledExpression = engine.createExpression(expressionString, debug);
        } catch (JexlException e) {
            throw new ExpressionParsingException(line, column, expressionString, e);
        }

        return new JEXLExpression(compiledExpression, expressionString, line, column);
    }
View Full Code Here

Examples of cambridge.ExpressionParsingException

    public Expression parse(String expressionString, int line, int col) throws ExpressionParsingException {

        try {
            return new OgnlExpression(Ognl.parseExpression(expressionString), expressionString);
        } catch (OgnlException e) {
            throw new ExpressionParsingException(line, col, "Error parsing expression on line: " + line + ", column: " + col + ", expression: " + expressionString, e);
        }
    }
View Full Code Here

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

  }
 
 
  public LogicalExpression createExpression(String functionName, ExpressionPosition ep, List<LogicalExpression> args){
    FunctionDefinition d = funcMap.get(functionName);
    if(d == null) throw new ExpressionParsingException(String.format("Unable to find function definition for function named '%s'", functionName));
    return d.newCall(args, ep);
  }
View Full Code Here

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

  private final NamedExpression[] selections;

  @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"))
        throw new ExpressionParsingException(String.format(
            "Outputs for projections always have to start with named path of output. First segment was named '%s' or was named [%s]", path, segment.isNamed()));

    }
  }
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 extraValidate(OptionValue v) throws ExpressionParsingException {
      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 extraValidate(OptionValue v) throws ExpressionParsingException {
      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 final 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

    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
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.