@Test public void testSemanticError() throws QuarkException, SQLException { SqlQueryParser parser = new SqlQueryParser(info); try { parser.parse( "select count(*) from test.many_colum where " + "test.many_columns.j > 100 and test.many_columns.i = 10"); failBecauseExceptionWasNotThrown(SQLException.class); } catch (SQLException e) { assertThat((Throwable) e).hasMessageContaining("Table 'TEST.MANY_COLUM' not found"); } }
@Test public void testSyntaxError() throws QuarkException, SQLException { SqlQueryParser parser = new SqlQueryParser(info); try { parser.parse( "select count(*) test.many_columns where " + "test.many_columns.j > 100 and test.many_columns.i = 10"); failBecauseExceptionWasNotThrown(SQLException.class); } catch (SQLException e) { assertThat((Throwable) e).hasMessageContaining("Encountered \".\" at line 1, column 21."); } }