use of io.prestosql.sql.tree.CharLiteral in project hetu-core by openlookeng.
the class TestSqlParser method testLiterals.
@Test
public void testLiterals() {
assertExpression("TIME" + " 'abc'", new TimeLiteral("abc"));
assertExpression("TIMESTAMP" + " 'abc'", new TimestampLiteral("abc"));
assertExpression("INTERVAL '33' day", new IntervalLiteral("33", Sign.POSITIVE, IntervalField.DAY, Optional.empty()));
assertExpression("INTERVAL '33' day to second", new IntervalLiteral("33", Sign.POSITIVE, IntervalField.DAY, Optional.of(IntervalField.SECOND)));
assertExpression("CHAR 'abc'", new CharLiteral("abc"));
}
Aggregations