use of io.trino.sql.tree.StringLiteral in project trino by trinodb.
the class TestSqlParser method testSessionIdentifiers.
@Test
public void testSessionIdentifiers() {
assertStatement("SET SESSION \"foo-bar\".baz = 'x'", new SetSession(QualifiedName.of("foo-bar", "baz"), new StringLiteral("x")));
assertStatementIsInvalid("SET SESSION foo-bar.name = 'value'").withMessage("line 1:16: mismatched input '-'. Expecting: '.', '='");
assertStatement("RESET SESSION \"foo-bar\".baz", new ResetSession(QualifiedName.of("foo-bar", "baz")));
assertStatementIsInvalid("RESET SESSION foo-bar.name").withMessage("line 1:18: mismatched input '-'. Expecting: '.', <EOF>");
}
Aggregations