private Constant newConstant(Object val) { Constant c = new Constant(val); if (useBindings) { //TODO: validate that this is a reasonable approach //we are using bind variables since that helps limit the size of the source sql //but a prepared plan is really of no use in this scenario c.setBindEligible(true); } return c; }
private Constant evaluate(Expression expression, boolean isBindEligible) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { Object value = null; if (expression instanceof Criteria) { value = evaluator.evaluateTVL((Criteria)expression, Collections.emptyList()); } else { value = evaluator.evaluate(expression, Collections.emptyList()); } if (value instanceof Constant) { return (Constant)value; //multi valued substitution } Constant result = new Constant(value, expression.getType()); result.setBindEligible(isBindEligible); return result; }
private Constant evaluate(Expression expression, boolean isBindEligible) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { Object value = null; if (expression instanceof Criteria) { value = evaluator.evaluateTVL((Criteria)expression, Collections.emptyList()); } else { value = evaluator.evaluate(expression, Collections.emptyList()); } if (value instanceof Constant) { return (Constant)value; //multi valued substitution } Constant result = new Constant(value, expression.getType()); result.setBindEligible(isBindEligible); return result; }
private Constant evaluate(Expression expression, boolean isBindEligible) throws ExpressionEvaluationException, BlockedException, TeiidComponentException { Object value = null; if (expression instanceof Criteria) { value = evaluator.evaluateTVL((Criteria)expression, Collections.emptyList()); } else { value = evaluator.evaluate(expression, Collections.emptyList()); } if (value instanceof Constant) { return (Constant)value; //multi valued substitution } Constant result = new Constant(value, expression.getType()); result.setBindEligible(isBindEligible); return result; }
private Constant newConstant(Object val, Expression ex) { Constant c; if (ex != null) { c = new Constant(val, ex.getType()); } else { c = new Constant(val); } if (useBindings) { //TODO: validate that this is a reasonable approach //we are using bind variables since that helps limit the size of the source sql //but a prepared plan is really of no use in this scenario c.setBindEligible(true); } return c; }
private Constant newConstant(Object val, Expression ex) { Constant c; if (ex != null) { c = new Constant(val, ex.getType()); } else { c = new Constant(val); } if (useBindings) { //TODO: validate that this is a reasonable approach //we are using bind variables since that helps limit the size of the source sql //but a prepared plan is really of no use in this scenario c.setBindEligible(true); } return c; }
for (Object o : av.getValues()) { Constant c = new Constant(o); c.setBindEligible(constant.isBindEligible()); vals.add(c); if (baseType == null) {
for (Object o : av.getValues()) { Constant c = new Constant(o); c.setBindEligible(constant.isBindEligible()); vals.add(c); if (baseType == null) {
for (Object o : av.getValues()) { Constant c = new Constant(o); c.setBindEligible(constant.isBindEligible()); vals.add(c); if (baseType == null) {
return; c.setBindEligible(false); return; c.setBindEligible(false);
return; c.setBindEligible(false); return; c.setBindEligible(false);
return; c.setBindEligible(false);