private static Expression orNullHashCode(Expression expression) { return new CoalesceExpression(expression, new LongLiteral(String.valueOf(NULL_HASH_CODE))); }
@Override protected Void visitLongLiteral(LongLiteral node, Integer indentLevel) { print(indentLevel, "Long[" + node.getValue() + "]"); return null; }
private static Expression orNullHashCode(Expression expression) { return new CoalesceExpression(expression, new LongLiteral(String.valueOf(NULL_HASH_CODE))); }
@Override protected Long visitLongLiteral(LongLiteral node, ConnectorSession session) { return node.getValue(); }
private static Expression bigint(long value) { return new Cast(new LongLiteral(String.valueOf(value)), BIGINT.toString()); }
@Override protected Long visitLongLiteral(LongLiteral node, ConnectorSession session) { return node.getValue(); }
private static Expression bigint(long value) { return new Cast(new LongLiteral(String.valueOf(value)), BIGINT.toString()); }
@Override protected Void visitLongLiteral(LongLiteral node, Integer indentLevel) { print(indentLevel, "Long[" + node.getValue() + "]"); return null; }
@Override public Result apply(TableFinishNode node, Captures captures, Context context) { return Result.ofPlanNode( new ValuesNode( node.getId(), node.getOutputSymbols(), ImmutableList.of(ImmutableList.of(new LongLiteral("0"))))); } }
@Override protected String visitLongLiteral(LongLiteral node, Void context) { return Long.toString(node.getValue()); }
@Override public Result apply(TableFinishNode node, Captures captures, Context context) { return Result.ofPlanNode( new ValuesNode( node.getId(), node.getOutputSymbols(), ImmutableList.of(ImmutableList.of(new LongLiteral("0"))))); } }
@Override protected String visitLongLiteral(LongLiteral node, Void context) { return Long.toString(node.getValue()); }
private static LongLiteral number(long number) { return new LongLiteral(String.valueOf(number)); }
private static LongLiteral number(long number) { return new LongLiteral(String.valueOf(number)); }
@Test public void testBetween() { assertExpression("1 BETWEEN 2 AND 3", new BetweenPredicate(new LongLiteral("1"), new LongLiteral("2"), new LongLiteral("3"))); assertExpression("1 NOT BETWEEN 2 AND 3", new NotExpression(new BetweenPredicate(new LongLiteral("1"), new LongLiteral("2"), new LongLiteral("3")))); }
@Override public Node visitIntegerLiteral(SqlBaseParser.IntegerLiteralContext context) { return new LongLiteral(getLocation(context), context.getText()); }