From 0675d08f25717091e1f105135fb889ce03daf9b9 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Wed, 2 Aug 2017 17:03:49 +0300 Subject: [PATCH] Remove support for indices with multiple types Indices discovery actively ignores indices with more than one type. However queries made such indices throw an exception (assuming the user by mistake or not, selects such an index). Original commit: elastic/x-pack-elasticsearch@16855c7b8f1631c2cae831758c9945cd14d8e45a --- .../xpack/sql/cli/ExplainIT.java | 51 +- .../sql/jdbc/net/client/JdbcHttpClient.java | 4 +- .../xpack/sql/jdbc/CsvSpecIT.java | 4 +- .../xpack/sql/jdbc/ErrorsIT.java | 16 +- .../xpack/sql/jdbc/SqlSpecIT.java | 12 +- .../xpack/sql/jdbc/framework/DataLoader.java | 8 +- .../sql/jdbc/framework/JdbcTestUtils.java | 31 + .../SpecBaseIntegrationTestCase.java | 19 +- sql/jdbc/src/test/resources/agg.sql-spec | 162 +- sql/jdbc/src/test/resources/command.csv-spec | 2 +- sql/jdbc/src/test/resources/datetime.sql-spec | 30 +- sql/jdbc/src/test/resources/example.csv-spec | 2 +- sql/jdbc/src/test/resources/example.sql-spec | 2 +- sql/jdbc/src/test/resources/filter.sql-spec | 16 +- sql/jdbc/src/test/resources/fulltext.csv-spec | 8 +- sql/jdbc/src/test/resources/math.sql-spec | 58 +- sql/jdbc/src/test/resources/select.sql-spec | 40 +- .../src/test/resources/setup_test_emp.sql | 4 +- sql/server/src/main/antlr/SqlBase.g4 | 5 +- sql/server/src/main/antlr/SqlBase.tokens | 392 +++-- sql/server/src/main/antlr/SqlBaseLexer.tokens | 390 +++-- ...eption.java => InvalidIndexException.java} | 6 +- .../xpack/sql/analysis/analyzer/Analyzer.java | 15 +- .../xpack/sql/analysis/catalog/Catalog.java | 15 +- .../xpack/sql/analysis/catalog/EsCatalog.java | 75 +- .../xpack/sql/analysis/catalog/EsIndex.java | 47 +- .../xpack/sql/analysis/catalog/EsType.java | 73 - .../sql/analysis/catalog/InMemoryCatalog.java | 108 -- .../xpack/sql/execution/search/Scroller.java | 8 +- .../function/AbstractFunctionRegistry.java | 2 +- .../xpack/sql/parser/CommandBuilder.java | 7 +- .../xpack/sql/parser/ExpressionBuilder.java | 2 +- .../xpack/sql/parser/IdentifierBuilder.java | 22 +- .../xpack/sql/parser/LogicalPlanBuilder.java | 3 - .../xpack/sql/parser/SqlBaseLexer.java | 641 ++++---- .../xpack/sql/parser/SqlBaseParser.java | 1454 ++++++++--------- .../xpack/sql/plan/TableIdentifier.java | 25 +- .../xpack/sql/plan/logical/CatalogTable.java | 31 +- .../sql/plan/logical/command/ShowColumns.java | 25 +- .../sql/plan/logical/command/ShowTables.java | 30 +- .../xpack/sql/plan/physical/EsQueryExec.java | 18 +- .../xpack/sql/planner/Mapper.java | 8 +- .../xpack/sql/planner/QueryFolder.java | 4 +- .../xpack/sql/plugin/jdbc/JdbcServer.java | 42 +- .../plugin/sql/action/TransportSqlAction.java | 9 +- .../xpack/sql/session/SqlSettings.java | 2 +- 46 files changed, 1786 insertions(+), 2142 deletions(-) create mode 100644 sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/JdbcTestUtils.java rename sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/{UnknownTypeException.java => InvalidIndexException.java} (61%) delete mode 100644 sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsType.java delete mode 100644 sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/InMemoryCatalog.java diff --git a/sql/cli/src/test/java/org/elasticsearch/xpack/sql/cli/ExplainIT.java b/sql/cli/src/test/java/org/elasticsearch/xpack/sql/cli/ExplainIT.java index ea2ebdcbb43..152acc8381a 100644 --- a/sql/cli/src/test/java/org/elasticsearch/xpack/sql/cli/ExplainIT.java +++ b/sql/cli/src/test/java/org/elasticsearch/xpack/sql/cli/ExplainIT.java @@ -5,43 +5,46 @@ */ package org.elasticsearch.xpack.sql.cli; +import org.apache.lucene.util.LuceneTestCase.AwaitsFix; + import java.io.IOException; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.startsWith; +@AwaitsFix(bugUrl = "https://github.com/elastic/x-pack-elasticsearch/issues/2074") public class ExplainIT extends CliIntegrationTestCase { public void testExplainBasic() throws IOException { index("test", body -> body.field("test_field", "test_value")); - command("EXPLAIN (PLAN PARSED) SELECT * FROM test.doc"); + command("EXPLAIN (PLAN PARSED) SELECT * FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("With[{}]")); assertThat(in.readLine(), startsWith("\\_Project[[?*]]")); - assertThat(in.readLine(), startsWith(" \\_UnresolvedRelation[[index=test, type=doc],null]")); + assertThat(in.readLine(), startsWith(" \\_UnresolvedRelation[[test],null]")); assertEquals("", in.readLine()); - command("EXPLAIN " + (randomBoolean() ? "" : "(PLAN ANALYZED) ") + "SELECT * FROM test.doc"); + command("EXPLAIN " + (randomBoolean() ? "" : "(PLAN ANALYZED) ") + "SELECT * FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("Project[[test_field{r}#")); assertThat(in.readLine(), startsWith("\\_SubQueryAlias[doc]")); - assertThat(in.readLine(), startsWith(" \\_CatalogTable[index=test,type=doc][test_field{r}#")); + assertThat(in.readLine(), startsWith(" \\_CatalogTable[test][test_field{r}#")); assertEquals("", in.readLine()); - command("EXPLAIN (PLAN OPTIMIZED) SELECT * FROM test.doc"); + command("EXPLAIN (PLAN OPTIMIZED) SELECT * FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("Project[[test_field{r}#")); - assertThat(in.readLine(), startsWith("\\_CatalogTable[index=test,type=doc][test_field{r}#")); + assertThat(in.readLine(), startsWith("\\_CatalogTable[test][test_field{r}#")); assertEquals("", in.readLine()); // TODO in this case we should probably remove the source filtering entirely. Right? It costs but we don't need it. - command("EXPLAIN (PLAN EXECUTABLE) SELECT * FROM test.doc"); + command("EXPLAIN (PLAN EXECUTABLE) SELECT * FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); - assertThat(in.readLine(), startsWith("EsQueryExec[test/doc,{")); + assertThat(in.readLine(), startsWith("EsQueryExec[test,{")); assertThat(in.readLine(), startsWith(" \"_source\" : {")); assertThat(in.readLine(), startsWith(" \"includes\" : [")); assertThat(in.readLine(), startsWith(" \"test_field\"")); @@ -56,36 +59,36 @@ public class ExplainIT extends CliIntegrationTestCase { index("test", body -> body.field("test_field", "test_value1").field("i", 1)); index("test", body -> body.field("test_field", "test_value2").field("i", 2)); - command("EXPLAIN (PLAN PARSED) SELECT * FROM test.doc WHERE i = 2"); + command("EXPLAIN (PLAN PARSED) SELECT * FROM test WHERE i = 2"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("With[{}]")); assertThat(in.readLine(), startsWith("\\_Project[[?*]]")); assertThat(in.readLine(), startsWith(" \\_Filter[?i = 2]")); - assertThat(in.readLine(), startsWith(" \\_UnresolvedRelation[[index=test, type=doc],null]")); + assertThat(in.readLine(), startsWith(" \\_UnresolvedRelation[[type],null]")); assertEquals("", in.readLine()); - command("EXPLAIN " + (randomBoolean() ? "" : "(PLAN ANALYZED) ") + "SELECT * FROM test.doc WHERE i = 2"); + command("EXPLAIN " + (randomBoolean() ? "" : "(PLAN ANALYZED) ") + "SELECT * FROM test WHERE i = 2"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("Project[[i{r}#")); assertThat(in.readLine(), startsWith("\\_Filter[i{r}#")); assertThat(in.readLine(), startsWith(" \\_SubQueryAlias[doc]")); - assertThat(in.readLine(), startsWith(" \\_CatalogTable[index=test,type=doc][i{r}#")); + assertThat(in.readLine(), startsWith(" \\_CatalogTable[test][i{r}#")); assertEquals("", in.readLine()); - command("EXPLAIN (PLAN OPTIMIZED) SELECT * FROM test.doc WHERE i = 2"); + command("EXPLAIN (PLAN OPTIMIZED) SELECT * FROM test WHERE i = 2"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("Project[[i{r}#")); assertThat(in.readLine(), startsWith("\\_Filter[i{r}#")); - assertThat(in.readLine(), startsWith(" \\_CatalogTable[index=test,type=doc][i{r}#")); + assertThat(in.readLine(), startsWith(" \\_CatalogTable[test][i{r}#")); assertEquals("", in.readLine()); - command("EXPLAIN (PLAN EXECUTABLE) SELECT * FROM test.doc WHERE i = 2"); + command("EXPLAIN (PLAN EXECUTABLE) SELECT * FROM test WHERE i = 2"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); - assertThat(in.readLine(), startsWith("EsQueryExec[test/doc,{")); + assertThat(in.readLine(), startsWith("EsQueryExec[test,{")); assertThat(in.readLine(), startsWith(" \"query\" : {")); assertThat(in.readLine(), startsWith(" \"term\" : {")); assertThat(in.readLine(), startsWith(" \"i\" : {")); @@ -112,33 +115,33 @@ public class ExplainIT extends CliIntegrationTestCase { index("test", body -> body.field("test_field", "test_value1").field("i", 1)); index("test", body -> body.field("test_field", "test_value2").field("i", 2)); - command("EXPLAIN (PLAN PARSED) SELECT COUNT(*) FROM test.doc"); + command("EXPLAIN (PLAN PARSED) SELECT COUNT(*) FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("With[{}]")); assertThat(in.readLine(), startsWith("\\_Project[[?COUNT(?*)]]")); - assertThat(in.readLine(), startsWith(" \\_UnresolvedRelation[[index=test, type=doc],null]")); + assertThat(in.readLine(), startsWith(" \\_UnresolvedRelation[[test],null]")); assertEquals("", in.readLine()); - command("EXPLAIN " + (randomBoolean() ? "" : "(PLAN ANALYZED) ") + "SELECT COUNT(*) FROM test.doc"); + command("EXPLAIN " + (randomBoolean() ? "" : "(PLAN ANALYZED) ") + "SELECT COUNT(*) FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("Aggregate[[],[COUNT(1)#")); assertThat(in.readLine(), startsWith("\\_SubQueryAlias[doc]")); - assertThat(in.readLine(), startsWith(" \\_CatalogTable[index=test,type=doc][i{r}#")); + assertThat(in.readLine(), startsWith(" \\_CatalogTable[test][i{r}#")); assertEquals("", in.readLine()); - command("EXPLAIN (PLAN OPTIMIZED) SELECT COUNT(*) FROM test.doc"); + command("EXPLAIN (PLAN OPTIMIZED) SELECT COUNT(*) FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); assertThat(in.readLine(), startsWith("Aggregate[[],[COUNT(1)#")); - assertThat(in.readLine(), startsWith("\\_CatalogTable[index=test,type=doc][i{r}#")); + assertThat(in.readLine(), startsWith("\\_CatalogTable[test][i{r}#")); assertEquals("", in.readLine()); - command("EXPLAIN (PLAN EXECUTABLE) SELECT COUNT(*) FROM test.doc"); + command("EXPLAIN (PLAN EXECUTABLE) SELECT COUNT(*) FROM test"); assertThat(in.readLine(), containsString("plan")); assertThat(in.readLine(), startsWith("----------")); - assertThat(in.readLine(), startsWith("EsQueryExec[test/doc,{")); + assertThat(in.readLine(), startsWith("EsQueryExec[test,{")); assertThat(in.readLine(), startsWith(" \"size\" : 0,")); assertThat(in.readLine(), startsWith(" \"_source\" : false,")); assertThat(in.readLine(), startsWith(" \"stored_fields\" : \"_none_\"")); diff --git a/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/JdbcHttpClient.java b/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/JdbcHttpClient.java index 4952f382173..efe4d1de415 100644 --- a/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/JdbcHttpClient.java +++ b/sql/jdbc/src/main/java/org/elasticsearch/xpack/sql/jdbc/net/client/JdbcHttpClient.java @@ -134,9 +134,9 @@ public class JdbcHttpClient implements Closeable { ExceptionResponse ex = (ExceptionResponse) response; throw ex.asException(); } - if (response.responseType() == ResponseType.EXCEPTION) { + if (response.responseType() == ResponseType.ERROR) { ErrorResponse error = (ErrorResponse) response; - throw new JdbcException("%s", error.stack); + throw new JdbcException("Server returned error: %s", error.stack); } return response; } diff --git a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/CsvSpecIT.java b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/CsvSpecIT.java index 7ec3ef650f8..690714f72f8 100644 --- a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/CsvSpecIT.java +++ b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/CsvSpecIT.java @@ -43,8 +43,6 @@ public class CsvSpecIT extends SpecBaseIntegrationTestCase { assertMatchesCsv(testCase.query, testName, testCase.expectedResults); } catch (AssertionError ae) { throw reworkException(new AssertionError(errorMessage(ae), ae.getCause())); - } catch (Throwable th) { - throw reworkException(th); } } @@ -93,4 +91,4 @@ public class CsvSpecIT extends SpecBaseIntegrationTestCase { String query; String expectedResults; } -} +} \ No newline at end of file diff --git a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/ErrorsIT.java b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/ErrorsIT.java index d59d92d7732..e2127d63e6a 100644 --- a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/ErrorsIT.java +++ b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/ErrorsIT.java @@ -9,24 +9,28 @@ import org.elasticsearch.xpack.sql.jdbc.framework.JdbcIntegrationTestCase; import java.sql.Connection; import java.sql.SQLException; +import java.util.Locale; /** * Tests for error messages. */ public class ErrorsIT extends JdbcIntegrationTestCase { + + String message(String index) { + return String.format(Locale.ROOT, "line 1:15: Cannot resolve index %s (does not exist or has multiple types)", index); + } public void testSelectFromMissingTable() throws Exception { try (Connection c = esJdbc()) { - SQLException e = expectThrows(SQLException.class, () -> c.prepareStatement("SELECT * from test.doc").executeQuery()); - assertEquals("line 1:15: Cannot resolve index test", e.getMessage()); + SQLException e = expectThrows(SQLException.class, () -> c.prepareStatement("SELECT * from test").executeQuery()); + assertEquals(message("test"), e.getMessage()); } } - public void testSelectFromMissingType() throws Exception { - index("test", builder -> builder.field("name", "bob")); + public void testMultiTypeIndex() throws Exception { try (Connection c = esJdbc()) { - SQLException e = expectThrows(SQLException.class, () -> c.prepareStatement("SELECT * from test.notdoc").executeQuery()); - assertEquals("line 1:15: Cannot resolve type notdoc in index test", e.getMessage()); + SQLException e = expectThrows(SQLException.class, () -> c.prepareStatement("SELECT * from multi_type").executeQuery()); + assertEquals(message("multi_type"), e.getMessage()); } } } diff --git a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/SqlSpecIT.java b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/SqlSpecIT.java index d7fbd395083..ee8a885828b 100644 --- a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/SqlSpecIT.java +++ b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/SqlSpecIT.java @@ -37,6 +37,10 @@ public class SqlSpecIT extends SpecBaseIntegrationTestCase { @ParametersFactory(shuffle = false, argumentFormatting = PARAM_FORMATTNG) public static List readScriptSpec() throws Exception { + + // example for enabling logging + //JdbcTestUtils.sqlLogging(); + SqlSpecParser parser = new SqlSpecParser(); return CollectionUtils.combine( readScriptSpec("/select.sql-spec", parser), @@ -45,7 +49,7 @@ public class SqlSpecIT extends SpecBaseIntegrationTestCase { readScriptSpec("/math.sql-spec", parser), readScriptSpec("/agg.sql-spec", parser)); } - + private static class SqlSpecParser implements Parser { @Override public Object parse(String line) { @@ -70,14 +74,14 @@ public class SqlSpecIT extends SpecBaseIntegrationTestCase { } catch (AssertionError ae) { throw reworkException(new AssertionError(errorMessage(ae), ae.getCause())); } - } catch (Throwable th) { - throw reworkException(th); } } private ResultSet executeQuery(Connection con) throws SQLException { Statement statement = con.createStatement(); - statement.setFetchSize(randomInt(10)); + //statement.setFetchSize(randomInt(10)); + // NOCOMMIT: hook up pagination + statement.setFetchSize(1000); return statement.executeQuery(query); } diff --git a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/DataLoader.java b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/DataLoader.java index dd58b0c3303..ea2df735bb9 100644 --- a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/DataLoader.java +++ b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/DataLoader.java @@ -11,6 +11,7 @@ import org.elasticsearch.client.http.entity.ContentType; import org.elasticsearch.client.http.entity.StringEntity; import org.elasticsearch.common.CheckedBiConsumer; import org.elasticsearch.common.io.PathUtils; +import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.json.JsonXContent; import org.elasticsearch.xpack.sql.jdbc.SqlSpecIT; @@ -26,8 +27,10 @@ import static java.util.Collections.singletonMap; public class DataLoader { public static void main(String[] args) throws Exception { - RestClient client = RestClient.builder(new HttpHost("localhost", 9200)).build(); - loadDatasetIntoEs(client); + try (RestClient client = RestClient.builder(new HttpHost("localhost", 9200)).build()) { + loadDatasetIntoEs(client); + Loggers.getLogger(DataLoader.class).info("Data loaded"); + } } protected static void loadDatasetIntoEs(RestClient client) throws Exception { @@ -70,6 +73,7 @@ public class DataLoader { bulk.append("}\n"); }); client.performRequest("POST", "/test_emp/emp/_bulk", singletonMap("refresh", "true"), new StringEntity(bulk.toString(), ContentType.APPLICATION_JSON)); + } private static void csvToLines(String name, CheckedBiConsumer, List, Exception> consumeLine) throws Exception { diff --git a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/JdbcTestUtils.java b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/JdbcTestUtils.java new file mode 100644 index 00000000000..ead38955b0d --- /dev/null +++ b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/JdbcTestUtils.java @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +package org.elasticsearch.xpack.sql.jdbc.framework; + +import org.elasticsearch.common.logging.Loggers; +import org.elasticsearch.xpack.sql.util.CollectionUtils; + +import java.util.Map; +import java.util.Map.Entry; + +public abstract class JdbcTestUtils { + + public static void sqlLogging() { + String t = "TRACE"; + String d = "DEBUG"; + + Map of = CollectionUtils.of("org.elasticsearch.xpack.sql.parser", t, + "org.elasticsearch.xpack.sql.analysis.analyzer", t, + "org.elasticsearch.xpack.sql.optimizer", t, + "org.elasticsearch.xpack.sql.rule", t, + "org.elasticsearch.xpack.sql.planner", t, + "org.elasticsearch.xpack.sql.execution.search", t); + + for (Entry entry : of.entrySet()) { + Loggers.setLevel(Loggers.getLogger(entry.getKey()), entry.getValue()); + } + } +} diff --git a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/SpecBaseIntegrationTestCase.java b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/SpecBaseIntegrationTestCase.java index 1fa3b1fa949..af6320b613a 100644 --- a/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/SpecBaseIntegrationTestCase.java +++ b/sql/jdbc/src/test/java/org/elasticsearch/xpack/sql/jdbc/framework/SpecBaseIntegrationTestCase.java @@ -5,14 +5,11 @@ */ package org.elasticsearch.xpack.sql.jdbc.framework; -import org.elasticsearch.client.ResponseException; import org.elasticsearch.common.Booleans; import org.elasticsearch.common.Strings; import org.elasticsearch.common.io.PathUtils; -import org.junit.AfterClass; import org.junit.BeforeClass; -import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; @@ -46,21 +43,9 @@ public abstract class SpecBaseIntegrationTestCase extends JdbcIntegrationTestCas loadDatasetIntoEs(); } - @AfterClass - public static void cleanupTestData() throws IOException { - try { - client().performRequest("DELETE", "/*"); - } catch (ResponseException e) { - if (e.getResponse().getStatusLine().getStatusCode() != 404) { - // 404 means no indices which shouldn't cause a failure - throw e; - } - } - } - @Override protected boolean preserveIndicesUponCompletion() { - return true; + return !SETUP_DATA; } public SpecBaseIntegrationTestCase(String groupName, String testName, Integer lineNumber, Path source) { @@ -125,7 +110,7 @@ public abstract class SpecBaseIntegrationTestCase extends JdbcIntegrationTestCas return pairs; } - + public interface Parser { Object parse(String line); } diff --git a/sql/jdbc/src/test/resources/agg.sql-spec b/sql/jdbc/src/test/resources/agg.sql-spec index 414344fff49..c65a314ba58 100644 --- a/sql/jdbc/src/test/resources/agg.sql-spec +++ b/sql/jdbc/src/test/resources/agg.sql-spec @@ -3,33 +3,33 @@ // groupByOnText -SELECT gender g FROM "test_emp.emp" GROUP BY gender; +SELECT gender g FROM "test_emp" GROUP BY gender; groupByOnTextWithWhereClause -SELECT gender g FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender; +SELECT gender g FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender; groupByOnTextWithWhereAndLimit -SELECT gender g FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender LIMIT 1; +SELECT gender g FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender LIMIT 1; groupByOnTextOnAlias -SELECT gender g FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY g; +SELECT gender g FROM "test_emp" WHERE emp_no < 10020 GROUP BY g; groupByOnTextOnAliasOrderDesc -SELECT gender g FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY g ORDER BY g DESC; +SELECT gender g FROM "test_emp" WHERE emp_no < 10020 GROUP BY g ORDER BY g DESC; groupByOnDate -SELECT birth_date b FROM "test_emp.emp" GROUP BY birth_date ORDER BY birth_date DESC; +SELECT birth_date b FROM "test_emp" GROUP BY birth_date ORDER BY birth_date DESC; groupByOnDateWithWhereClause -SELECT birth_date b FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY birth_date ORDER BY birth_date DESC; +SELECT birth_date b FROM "test_emp" WHERE emp_no < 10020 GROUP BY birth_date ORDER BY birth_date DESC; groupByOnDateWithWhereAndLimit -SELECT birth_date b FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY birth_date ORDER BY birth_date DESC LIMIT 1; +SELECT birth_date b FROM "test_emp" WHERE emp_no < 10020 GROUP BY birth_date ORDER BY birth_date DESC LIMIT 1; groupByOnDateOnAlias -SELECT birth_date b FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY b ORDER BY birth_date DESC; +SELECT birth_date b FROM "test_emp" WHERE emp_no < 10020 GROUP BY b ORDER BY birth_date DESC; groupByOnNumber -SELECT emp_no e FROM "test_emp.emp" GROUP BY emp_no ORDER BY emp_no DESC; +SELECT emp_no e FROM "test_emp" GROUP BY emp_no ORDER BY emp_no DESC; groupByOnNumberWithWhereClause -SELECT emp_no e FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY emp_no ORDER BY emp_no DESC; +SELECT emp_no e FROM "test_emp" WHERE emp_no < 10020 GROUP BY emp_no ORDER BY emp_no DESC; groupByOnNumberWithWhereAndLimit -SELECT emp_no e FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY emp_no ORDER BY emp_no DESC LIMIT 1; +SELECT emp_no e FROM "test_emp" WHERE emp_no < 10020 GROUP BY emp_no ORDER BY emp_no DESC LIMIT 1; groupByOnNumberOnAlias -SELECT emp_no e FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY e ORDER BY emp_no DESC; +SELECT emp_no e FROM "test_emp" WHERE emp_no < 10020 GROUP BY e ORDER BY emp_no DESC; // // Aggregate Functions @@ -37,160 +37,160 @@ SELECT emp_no e FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY e ORDER BY emp // COUNT aggCountImplicit -SELECT COUNT(*) c FROM "test_emp.emp"; +SELECT COUNT(*) c FROM "test_emp"; aggCountImplicitWithCast -SELECT CAST(COUNT(*) AS INT) c FROM "test_emp.emp"; +SELECT CAST(COUNT(*) AS INT) c FROM "test_emp"; aggCountImplicitWithConstant -SELECT COUNT(1) FROM "test_emp.emp"; +SELECT COUNT(1) FROM "test_emp"; aggCountImplicitWithConstantAndFilter -SELECT COUNT(1) FROM "test_emp.emp" WHERE emp_no < 10010; +SELECT COUNT(1) FROM "test_emp" WHERE emp_no < 10010; aggCountAliasAndWhereClause -SELECT gender g, COUNT(*) c FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender; +SELECT gender g, COUNT(*) c FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender; aggCountAliasAndWhereClauseAndLimit -SELECT gender g, COUNT(*) c FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender LIMIT 1; +SELECT gender g, COUNT(*) c FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender LIMIT 1; aggCountAliasWithCastAndFilter -SELECT gender g, CAST(COUNT(*) AS INT) c FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender; +SELECT gender g, CAST(COUNT(*) AS INT) c FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender; aggCountWithAlias -SELECT gender g, COUNT(*) c FROM "test_emp.emp" GROUP BY g; +SELECT gender g, COUNT(*) c FROM "test_emp" GROUP BY g; // Conditional COUNT aggCountAndHaving -SELECT gender g, COUNT(*) c FROM "test_emp.emp" GROUP BY g HAVING COUNT(*) > 10; +SELECT gender g, COUNT(*) c FROM "test_emp" GROUP BY g HAVING COUNT(*) > 10; aggCountOnColumnAndHaving -SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING COUNT(gender) > 10; +SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING COUNT(gender) > 10; // NOT supported yet since Having introduces a new agg //aggCountOnColumnAndWildcardAndHaving -//SELECT gender g, COUNT(*) c FROM "test_emp.emp" GROUP BY g HAVING COUNT(gender) > 10; +//SELECT gender g, COUNT(*) c FROM "test_emp" GROUP BY g HAVING COUNT(gender) > 10; aggCountAndHavingOnAlias -SELECT gender g, COUNT(*) c FROM "test_emp.emp" GROUP BY g HAVING c > 10; +SELECT gender g, COUNT(*) c FROM "test_emp" GROUP BY g HAVING c > 10; aggCountOnColumnAndHavingOnAlias -SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING c > 10; +SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10; aggCountOnColumnAndMultipleHaving -SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING c > 10 AND c < 70; +SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND c < 70; aggCountOnColumnAndMultipleHavingWithLimit -SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING c > 10 AND c < 70 LIMIT 1; +SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND c < 70 LIMIT 1; aggCountOnColumnAndHavingOnAliasAndFunction -SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING c > 10 AND COUNT(gender) < 70; +SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND COUNT(gender) < 70; // NOT supported yet since Having introduces a new agg //aggCountOnColumnAndHavingOnAliasAndFunctionWildcard -> COUNT(*/1) vs COUNT(gender) -//SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING c > 10 AND COUNT(*) < 70; +//SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND COUNT(*) < 70; //aggCountOnColumnAndHavingOnAliasAndFunctionConstant -//SELECT gender g, COUNT(gender) c FROM "test_emp.emp" GROUP BY g HAVING c > 10 AND COUNT(1) < 70; +//SELECT gender g, COUNT(gender) c FROM "test_emp" GROUP BY g HAVING c > 10 AND COUNT(1) < 70; // MIN aggMinImplicit -SELECT MIN(emp_no) m FROM "test_emp.emp"; +SELECT MIN(emp_no) m FROM "test_emp"; aggMinImplicitWithCast -SELECT CAST(MIN(emp_no) AS SMALLINT) m FROM "test_emp.emp"; +SELECT CAST(MIN(emp_no) AS SMALLINT) m FROM "test_emp"; aggMin -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY gender; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY gender; aggMinWithCast -SELECT CAST(MIN(emp_no) AS SMALLINT) m FROM "test_emp.emp" GROUP BY gender; +SELECT CAST(MIN(emp_no) AS SMALLINT) m FROM "test_emp" GROUP BY gender; aggMinAndCount -SELECT MIN(emp_no) m, COUNT(1) c FROM "test_emp.emp" GROUP BY gender; +SELECT MIN(emp_no) m, COUNT(1) c FROM "test_emp" GROUP BY gender; aggMinAndCountWithFilter -SELECT MIN(emp_no) m, COUNT(1) c FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender ; +SELECT MIN(emp_no) m, COUNT(1) c FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender ; aggMinAndCountWithFilterAndLimit -SELECT MIN(emp_no) m, COUNT(1) c FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender LIMIT 1; +SELECT MIN(emp_no) m, COUNT(1) c FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender LIMIT 1; aggMinWithCastAndFilter -SELECT gender g, CAST(MIN(emp_no) AS SMALLINT) m, COUNT(1) c FROM "test_emp.emp" WHERE emp_no < 10020 GROUP BY gender; +SELECT gender g, CAST(MIN(emp_no) AS SMALLINT) m, COUNT(1) c FROM "test_emp" WHERE emp_no < 10020 GROUP BY gender; aggMinWithAlias -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY g; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY g; // Conditional MIN aggMinWithHaving -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING MIN(emp_no) > 10; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY g HAVING MIN(emp_no) > 10; aggMinWithHavingOnAlias -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10; aggMinWithMultipleHaving -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10 AND m < 99999; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10 AND m < 99999; aggMinWithMultipleHavingWithLimit -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10 AND m < 99999 LIMIT 1; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10 AND m < 99999 LIMIT 1; aggMinWithMultipleHavingOnAliasAndFunction -SELECT gender g, MIN(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10 AND MIN(emp_no) < 99999; +SELECT gender g, MIN(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10 AND MIN(emp_no) < 99999; // MAX aggMaxImplicit -SELECT MAX(emp_no) c FROM "test_emp.emp"; +SELECT MAX(emp_no) c FROM "test_emp"; aggMaxImplicitWithCast -SELECT CAST(MAX(emp_no) AS SMALLINT) c FROM "test_emp.emp"; +SELECT CAST(MAX(emp_no) AS SMALLINT) c FROM "test_emp"; aggMax -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY gender ; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY gender ; aggMaxWithCast -SELECT gender g, CAST(MAX(emp_no) AS SMALLINT) m FROM "test_emp.emp" GROUP BY gender ; +SELECT gender g, CAST(MAX(emp_no) AS SMALLINT) m FROM "test_emp" GROUP BY gender ; aggMaxAndCount -SELECT MAX(emp_no) m, COUNT(1) c FROM "test_emp.emp" GROUP BY gender; +SELECT MAX(emp_no) m, COUNT(1) c FROM "test_emp" GROUP BY gender; aggMaxAndCountWithFilter -SELECT gender g, MAX(emp_no) m, COUNT(1) c FROM "test_emp.emp" WHERE emp_no > 10000 GROUP BY gender; +SELECT gender g, MAX(emp_no) m, COUNT(1) c FROM "test_emp" WHERE emp_no > 10000 GROUP BY gender; aggMaxAndCountWithFilterAndLimit -SELECT gender g, MAX(emp_no) m, COUNT(1) c FROM "test_emp.emp" WHERE emp_no > 10000 GROUP BY gender LIMIT 1; +SELECT gender g, MAX(emp_no) m, COUNT(1) c FROM "test_emp" WHERE emp_no > 10000 GROUP BY gender LIMIT 1; aggMaxWithAlias -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY g; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY g; // Conditional MAX aggMaxWithHaving -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING MAX(emp_no) > 10; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY g HAVING MAX(emp_no) > 10; aggMaxWithHavingOnAlias -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10; aggMaxWithMultipleHaving -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10 AND m < 99999; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10 AND m < 99999; aggMaxWithMultipleHavingWithLimit -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10 AND m < 99999 LIMIT 1; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10 AND m < 99999 LIMIT 1; aggMaxWithMultipleHavingOnAliasAndFunction -SELECT gender g, MAX(emp_no) m FROM "test_emp.emp" GROUP BY g HAVING m > 10 AND MAX(emp_no) < 99999; +SELECT gender g, MAX(emp_no) m FROM "test_emp" GROUP BY g HAVING m > 10 AND MAX(emp_no) < 99999; // SUM aggSumImplicitWithCast -SELECT CAST(SUM(emp_no) AS BIGINT) s FROM "test_emp.emp"; +SELECT CAST(SUM(emp_no) AS BIGINT) s FROM "test_emp"; aggSumWithCast -SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s FROM "test_emp.emp" GROUP BY gender; +SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s FROM "test_emp" GROUP BY gender; aggSumWithCastAndCount -SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s, COUNT(1) c FROM "test_emp.emp" GROUP BY gender; +SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s, COUNT(1) c FROM "test_emp" GROUP BY gender; aggSumWithCastAndCountWithFilter -SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s, COUNT(1) c FROM "test_emp.emp" WHERE emp_no > 10000 GROUP BY gender; +SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s, COUNT(1) c FROM "test_emp" WHERE emp_no > 10000 GROUP BY gender; aggSumWithCastAndCountWithFilterAndLimit -SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s, COUNT(1) c FROM "test_emp.emp" WHERE emp_no > 10000 GROUP BY gender LIMIT 1; +SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s, COUNT(1) c FROM "test_emp" WHERE emp_no > 10000 GROUP BY gender LIMIT 1; aggSumWithAlias -SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s FROM "test_emp.emp" GROUP BY g; +SELECT gender g, CAST(SUM(emp_no) AS BIGINT) s FROM "test_emp" GROUP BY g; // Conditional SUM aggSumWithHaving -SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY g HAVING SUM(emp_no) > 10; +SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY g HAVING SUM(emp_no) > 10; aggSumWithHavingOnAlias -SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY g HAVING s > 10; +SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY g HAVING s > 10; aggSumWithMultipleHaving -SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY g HAVING s > 10 AND s < 10000000; +SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY g HAVING s > 10 AND s < 10000000; aggSumWithMultipleHavingWithLimit -SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY g HAVING s > 10 AND s < 10000000 LIMIT 1; +SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY g HAVING s > 10 AND s < 10000000 LIMIT 1; aggSumWithMultipleHavingOnAliasAndFunction -SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY g HAVING s > 10 AND SUM(emp_no) > 10000000; +SELECT gender g, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY g HAVING s > 10 AND SUM(emp_no) > 10000000; // AVG aggAvgImplicitWithCast -SELECT CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp"; +SELECT CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp"; aggAvgWithCastToFloat -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY gender; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY gender; // casting to an exact type - varchar, bigint, etc... will likely fail due to rounding error aggAvgWithCastToDouble -SELECT gender g, CAST(AVG(emp_no) AS DOUBLE) a FROM "test_emp.emp" GROUP BY gender; +SELECT gender g, CAST(AVG(emp_no) AS DOUBLE) a FROM "test_emp" GROUP BY gender; aggAvgWithCastAndCount -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a, COUNT(1) c FROM "test_emp.emp" GROUP BY gender; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a, COUNT(1) c FROM "test_emp" GROUP BY gender; aggAvgWithCastAndCountWithFilter -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a, COUNT(1) c FROM "test_emp.emp" WHERE emp_no > 10000 GROUP BY gender ; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a, COUNT(1) c FROM "test_emp" WHERE emp_no > 10000 GROUP BY gender ; aggAvgWithCastAndCountWithFilterAndLimit -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a, COUNT(1) c FROM "test_emp.emp" WHERE emp_no > 10000 GROUP BY gender LIMIT 1; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a, COUNT(1) c FROM "test_emp" WHERE emp_no > 10000 GROUP BY gender LIMIT 1; aggAvgWithAlias -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY g; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY g; // Conditional AVG aggAvgWithHaving -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY g HAVING AVG(emp_no) > 10; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY g HAVING AVG(emp_no) > 10; aggAvgWithHavingOnAlias -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY g HAVING a > 10; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY g HAVING a > 10; aggAvgWithMultipleHaving -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY g HAVING a > 10 AND a < 10000000; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY g HAVING a > 10 AND a < 10000000; aggAvgWithMultipleHavingWithLimit -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY g HAVING a > 10 AND a < 10000000 LIMIT 1; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY g HAVING a > 10 AND a < 10000000 LIMIT 1; aggAvgWithMultipleHavingOnAliasAndFunction -SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp.emp" GROUP BY g HAVING a > 10 AND AVG(emp_no) > 10000000; +SELECT gender g, CAST(AVG(emp_no) AS FLOAT) a FROM "test_emp" GROUP BY g HAVING a > 10 AND AVG(emp_no) > 10000000; diff --git a/sql/jdbc/src/test/resources/command.csv-spec b/sql/jdbc/src/test/resources/command.csv-spec index 9674a5b6335..3b179a9c254 100644 --- a/sql/jdbc/src/test/resources/command.csv-spec +++ b/sql/jdbc/src/test/resources/command.csv-spec @@ -108,7 +108,7 @@ test_emp |emp // DESCRIBE describe -DESCRIBE "test_emp.emp"; +DESCRIBE "test_emp"; column | type birth_date |TIMESTAMP diff --git a/sql/jdbc/src/test/resources/datetime.sql-spec b/sql/jdbc/src/test/resources/datetime.sql-spec index e655312fa31..0870f68b9a0 100644 --- a/sql/jdbc/src/test/resources/datetime.sql-spec +++ b/sql/jdbc/src/test/resources/datetime.sql-spec @@ -6,11 +6,11 @@ // Time // dateTimeSecond -SELECT SECOND(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT SECOND(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; dateTimeMinute -SELECT MINUTE(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT MINUTE(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; dateTimeHour -SELECT HOUR(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT HOUR(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; // @@ -18,17 +18,17 @@ SELECT HOUR(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 // dateTimeDay -SELECT DAY(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT DAY(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; dateTimeDayOfMonth -SELECT DAY_OF_MONTH(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT DAY_OF_MONTH(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; // dateTimeDayOfWeek - disable since it starts at 0 not 1 -// SELECT DAY_OF_WEEK(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +// SELECT DAY_OF_WEEK(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; dateTimeDayOfYear -SELECT DAY_OF_YEAR(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT DAY_OF_YEAR(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; dateTimeMonth -SELECT MONTH(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT MONTH(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; dateTimeYear -SELECT YEAR(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT YEAR(birth_date) d, last_name l FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; // NOCOMMIT figure out a way to test the aliases that are unsupported by h2 but are supported by us because they are like PostgreSQL @@ -37,19 +37,19 @@ SELECT YEAR(birth_date) d, last_name l FROM "test_emp.emp" WHERE emp_no < 10010 // Filter // dateTimeFilterDayOfMonth -SELECT DAY_OF_MONTH(birth_date) AS d, last_name l FROM "test_emp.emp" WHERE DAY_OF_MONTH(birth_date) <= 10 ORDER BY emp_no LIMIT 5; +SELECT DAY_OF_MONTH(birth_date) AS d, last_name l FROM "test_emp" WHERE DAY_OF_MONTH(birth_date) <= 10 ORDER BY emp_no LIMIT 5; dateTimeFilterMonth -SELECT MONTH(birth_date) AS d, last_name l FROM "test_emp.emp" WHERE MONTH(birth_date) <= 5 ORDER BY emp_no LIMIT 5; +SELECT MONTH(birth_date) AS d, last_name l FROM "test_emp" WHERE MONTH(birth_date) <= 5 ORDER BY emp_no LIMIT 5; dateTimeFilterYear -SELECT YEAR(birth_date) AS d, last_name l FROM "test_emp.emp" WHERE YEAR(birth_date) <= 1960 ORDER BY emp_no LIMIT 5; +SELECT YEAR(birth_date) AS d, last_name l FROM "test_emp" WHERE YEAR(birth_date) <= 1960 ORDER BY emp_no LIMIT 5; // // Aggregate // dateTimeAggByYear -SELECT YEAR(birth_date) AS d, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY YEAR(birth_date) ORDER BY YEAR(birth_date) LIMIT 5; +SELECT YEAR(birth_date) AS d, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY YEAR(birth_date) ORDER BY YEAR(birth_date) LIMIT 5; // NOCOMMIT Elasticsearch doesn't line up // dateTimeAggByMonth -// SELECT MONTH(birth_date) AS d, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY MONTH(birth_date) ORDER BY MONTH(birth_date) LIMIT 5; +// SELECT MONTH(birth_date) AS d, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY MONTH(birth_date) ORDER BY MONTH(birth_date) LIMIT 5; // dateTimeAggByDayOfMonth -// SELECT DAY_OF_MONTH(birth_date) AS d, CAST(SUM(emp_no) AS INT) s FROM "test_emp.emp" GROUP BY DAY_OF_MONTH(birth_date) ORDER BY DAY_OF_MONTH(birth_date) DESC; +// SELECT DAY_OF_MONTH(birth_date) AS d, CAST(SUM(emp_no) AS INT) s FROM "test_emp" GROUP BY DAY_OF_MONTH(birth_date) ORDER BY DAY_OF_MONTH(birth_date) DESC; diff --git a/sql/jdbc/src/test/resources/example.csv-spec b/sql/jdbc/src/test/resources/example.csv-spec index 79ed8e54b2b..a7964cec8d2 100644 --- a/sql/jdbc/src/test/resources/example.csv-spec +++ b/sql/jdbc/src/test/resources/example.csv-spec @@ -4,7 +4,7 @@ name // ES SQL query -SELECT COUNT(*) FROM "emp.emp"; +SELECT COUNT(*) FROM "emp"; // // expected result in CSV format diff --git a/sql/jdbc/src/test/resources/example.sql-spec b/sql/jdbc/src/test/resources/example.sql-spec index cc15826f5bc..8408dc58b1a 100644 --- a/sql/jdbc/src/test/resources/example.sql-spec +++ b/sql/jdbc/src/test/resources/example.sql-spec @@ -3,6 +3,6 @@ // name of the test - translated into 'testName' name // SQL query to be executed against H2 and ES -SELECT COUNT(*) FROM "emp.emp"; +SELECT COUNT(*) FROM "emp"; // repeat the above \ No newline at end of file diff --git a/sql/jdbc/src/test/resources/filter.sql-spec b/sql/jdbc/src/test/resources/filter.sql-spec index d62669a84e8..73b3e4e65a1 100644 --- a/sql/jdbc/src/test/resources/filter.sql-spec +++ b/sql/jdbc/src/test/resources/filter.sql-spec @@ -3,18 +3,18 @@ // whereFieldQuality -SELECT last_name l FROM "test_emp.emp" WHERE emp_no = 10000 LIMIT 5; +SELECT last_name l FROM "test_emp" WHERE emp_no = 10000 LIMIT 5; whereFieldLessThan -SELECT last_name l FROM "test_emp.emp" WHERE emp_no < 10003 ORDER BY emp_no LIMIT 5; +SELECT last_name l FROM "test_emp" WHERE emp_no < 10003 ORDER BY emp_no LIMIT 5; whereFieldAndComparison -SELECT last_name l FROM "test_emp.emp" WHERE emp_no > 10000 AND emp_no < 10005 ORDER BY emp_no LIMIT 5; +SELECT last_name l FROM "test_emp" WHERE emp_no > 10000 AND emp_no < 10005 ORDER BY emp_no LIMIT 5; whereFieldOrComparison -SELECT last_name l FROM "test_emp.emp" WHERE emp_no < 10003 OR emp_no = 10005 ORDER BY emp_no LIMIT 5; +SELECT last_name l FROM "test_emp" WHERE emp_no < 10003 OR emp_no = 10005 ORDER BY emp_no LIMIT 5; whereFieldWithOrder -SELECT last_name l FROM "test_emp.emp" WHERE emp_no < 10003 ORDER BY emp_no; +SELECT last_name l FROM "test_emp" WHERE emp_no < 10003 ORDER BY emp_no; whereFieldWithExactMatchOnString -SELECT last_name l FROM "test_emp.emp" WHERE emp_no < 10003 AND gender = 'M'; +SELECT last_name l FROM "test_emp" WHERE emp_no < 10003 AND gender = 'M'; whereFieldWithLikeMatch -SELECT last_name l FROM "test_emp.emp" WHERE emp_no < 10003 AND last_name LIKE 'K%'; +SELECT last_name l FROM "test_emp" WHERE emp_no < 10003 AND last_name LIKE 'K%'; whereFieldOnMatchWithAndAndOr -SELECT last_name l FROM "test_emp.emp" WHERE emp_no < 10003 AND (gender = 'M' AND NOT FALSE OR last_name LIKE 'K%') ORDER BY emp_no; +SELECT last_name l FROM "test_emp" WHERE emp_no < 10003 AND (gender = 'M' AND NOT FALSE OR last_name LIKE 'K%') ORDER BY emp_no; diff --git a/sql/jdbc/src/test/resources/fulltext.csv-spec b/sql/jdbc/src/test/resources/fulltext.csv-spec index 9a482b49b7a..59d337b47fb 100644 --- a/sql/jdbc/src/test/resources/fulltext.csv-spec +++ b/sql/jdbc/src/test/resources/fulltext.csv-spec @@ -3,28 +3,28 @@ // simpleQueryAllFields -SELECT emp_no, first_name, gender, last_name FROM test_emp.emp WHERE QUERY('Baek fox') LIMIT 3; +SELECT emp_no, first_name, gender, last_name FROM test_emp WHERE QUERY('Baek fox') LIMIT 3; emp_no | first_name | gender | last_name 10080 |Premal |M |Baek ; simpleQueryDedicatedField -SELECT emp_no, first_name, gender, last_name FROM test_emp.emp WHERE QUERY('Man*', 'fields=last_name') LIMIT 5; +SELECT emp_no, first_name, gender, last_name FROM test_emp WHERE QUERY('Man*', 'fields=last_name') LIMIT 5; emp_no | first_name | gender | last_name 10096 |Jayson |M |Mandell ; matchQuery -SELECT emp_no, first_name, gender, last_name FROM test_emp.emp WHERE MATCH(first_name, 'Erez'); +SELECT emp_no, first_name, gender, last_name FROM test_emp WHERE MATCH(first_name, 'Erez'); emp_no | first_name | gender | last_name 10076 |Erez |F |Ritzmann ; multiMatchQuery -SELECT emp_no, first_name, gender, last_name FROM test_emp.emp WHERE MATCH('first_name,last_name', 'Morton', 'type=best_fields;default_operator=OR'); +SELECT emp_no, first_name, gender, last_name FROM test_emp WHERE MATCH('first_name,last_name', 'Morton', 'type=best_fields;default_operator=OR'); emp_no | first_name | gender | last_name 10095 |Hilari |M |Morton diff --git a/sql/jdbc/src/test/resources/math.sql-spec b/sql/jdbc/src/test/resources/math.sql-spec index d518b059740..4304ad404c3 100644 --- a/sql/jdbc/src/test/resources/math.sql-spec +++ b/sql/jdbc/src/test/resources/math.sql-spec @@ -3,73 +3,73 @@ // mathAbs -SELECT ABS(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT ABS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathACos -SELECT ACOS(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT ACOS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathASin -SELECT ASIN(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT ASIN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathATan -SELECT ATAN(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT ATAN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; //mathCbrt -//SELECT CBRT(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +//SELECT CBRT(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathCeil -SELECT CEIL(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT CEIL(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathCos -SELECT COS(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT COS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathCosh -SELECT COSH(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT COSH(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathDegrees -SELECT DEGREES(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT DEGREES(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathFloor -SELECT CAST(FLOOR(emp_no) AS INT) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT CAST(FLOOR(emp_no) AS INT) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathLog -SELECT LOG(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT LOG(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathLog10 -SELECT LOG10(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT LOG10(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathRadians -SELECT RADIANS(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT RADIANS(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathRound -SELECT CAST(ROUND(emp_no) AS INT) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT CAST(ROUND(emp_no) AS INT) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathSin -SELECT SIN(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT SIN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathSinH -SELECT SINH(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT SINH(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathSqrt -SELECT SQRT(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT SQRT(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathTan -SELECT TAN(emp_no) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT TAN(emp_no) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; // // Combined methods // mathAbsOfSin -SELECT ABS(SIN(emp_no)) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT ABS(SIN(emp_no)) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathAbsOfCeilOfSin -SELECT EXP(ABS(CEIL(SIN(DEGREES(emp_no))))) m, first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +SELECT EXP(ABS(CEIL(SIN(DEGREES(emp_no))))) m, first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; mathAbsOfCeilOfSinWithFilter -SELECT EXP(ABS(CEIL(SIN(DEGREES(emp_no))))) m, first_name FROM "test_emp.emp" WHERE EXP(ABS(CEIL(SIN(DEGREES(emp_no))))) < 10 ORDER BY emp_no; +SELECT EXP(ABS(CEIL(SIN(DEGREES(emp_no))))) m, first_name FROM "test_emp" WHERE EXP(ABS(CEIL(SIN(DEGREES(emp_no))))) < 10 ORDER BY emp_no; // // Filter by Scalar // mathAbsFilterAndOrder -SELECT emp_no, ABS(emp_no) m, first_name FROM "test_emp.emp" WHERE ABS(emp_no) < 10010 ORDER BY ABS(emp_no); +SELECT emp_no, ABS(emp_no) m, first_name FROM "test_emp" WHERE ABS(emp_no) < 10010 ORDER BY ABS(emp_no); mathACosFilterAndOrder -SELECT emp_no, ACOS(emp_no) m, first_name FROM "test_emp.emp" WHERE ACOS(emp_no) < 10010 ORDER BY ACOS(emp_no); +SELECT emp_no, ACOS(emp_no) m, first_name FROM "test_emp" WHERE ACOS(emp_no) < 10010 ORDER BY ACOS(emp_no); mathASinFilterAndOrder -SELECT emp_no, ASIN(emp_no) m, first_name FROM "test_emp.emp" WHERE ASIN(emp_no) < 10010 ORDER BY ASIN(emp_no); +SELECT emp_no, ASIN(emp_no) m, first_name FROM "test_emp" WHERE ASIN(emp_no) < 10010 ORDER BY ASIN(emp_no); //mathATanFilterAndOrder -//SELECT emp_no, ATAN(emp_no) m, first_name FROM "test_emp.emp" WHERE ATAN(emp_no) < 10010 ORDER BY ATAN(emp_no); +//SELECT emp_no, ATAN(emp_no) m, first_name FROM "test_emp" WHERE ATAN(emp_no) < 10010 ORDER BY ATAN(emp_no); mathCeilFilterAndOrder -SELECT emp_no, CEIL(emp_no) m, first_name FROM "test_emp.emp" WHERE CEIL(emp_no) < 10010 ORDER BY CEIL(emp_no); +SELECT emp_no, CEIL(emp_no) m, first_name FROM "test_emp" WHERE CEIL(emp_no) < 10010 ORDER BY CEIL(emp_no); //mathCosFilterAndOrder -//SELECT emp_no, COS(emp_no) m, first_name FROM "test_emp.emp" WHERE COS(emp_no) < 10010 ORDER BY COS(emp_no); +//SELECT emp_no, COS(emp_no) m, first_name FROM "test_emp" WHERE COS(emp_no) < 10010 ORDER BY COS(emp_no); //mathCoshFilterAndOrder -//SELECT emp_no, COSH(emp_no) m, first_name FROM "test_emp.emp" WHERE COSH(emp_no) < 10010 ORDER BY COSH(emp_no); +//SELECT emp_no, COSH(emp_no) m, first_name FROM "test_emp" WHERE COSH(emp_no) < 10010 ORDER BY COSH(emp_no); // // constants - added when folding will be supported // //mathConstantPI -//SELECT ABS(emp_no) m, PI(), first_name FROM "test_emp.emp" WHERE emp_no < 10010 ORDER BY emp_no; +//SELECT ABS(emp_no) m, PI(), first_name FROM "test_emp" WHERE emp_no < 10010 ORDER BY emp_no; diff --git a/sql/jdbc/src/test/resources/select.sql-spec b/sql/jdbc/src/test/resources/select.sql-spec index 11f44c3959e..a937f72b0c6 100644 --- a/sql/jdbc/src/test/resources/select.sql-spec +++ b/sql/jdbc/src/test/resources/select.sql-spec @@ -3,36 +3,36 @@ // wildcardWithOrder -SELECT * FROM "test_emp.emp" ORDER BY emp_no; +SELECT * FROM "test_emp" ORDER BY emp_no; column -SELECT last_name FROM "test_emp.emp" ORDER BY emp_no; +SELECT last_name FROM "test_emp" ORDER BY emp_no; columnWithAlias -SELECT last_name AS l FROM "test_emp.emp" ORDER BY emp_no; +SELECT last_name AS l FROM "test_emp" ORDER BY emp_no; columnWithAliasNoAs -SELECT last_name l FROM "test_emp.emp" ORDER BY emp_no; +SELECT last_name l FROM "test_emp" ORDER BY emp_no; multipleColumnsNoAlias -SELECT first_name, last_name FROM "test_emp.emp" ORDER BY emp_no; +SELECT first_name, last_name FROM "test_emp" ORDER BY emp_no; multipleColumnWithAliasWithAndWithoutAs -SELECT first_name f, last_name AS l FROM "test_emp.emp" ORDER BY emp_no; +SELECT first_name f, last_name AS l FROM "test_emp" ORDER BY emp_no; // // SELECT with LIMIT // wildcardWithLimit -SELECT * FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT * FROM "test_emp" ORDER BY emp_no LIMIT 5; wildcardWithOrderWithLimit -SELECT * FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT * FROM "test_emp" ORDER BY emp_no LIMIT 5; columnWithLimit -SELECT last_name FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT last_name FROM "test_emp" ORDER BY emp_no LIMIT 5; columnWithAliasWithLimit -SELECT last_name AS l FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT last_name AS l FROM "test_emp" ORDER BY emp_no LIMIT 5; columnWithAliasNoAsWithLimit -SELECT last_name l FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT last_name l FROM "test_emp" ORDER BY emp_no LIMIT 5; multipleColumnsNoAliasWithLimit -SELECT first_name, last_name FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT first_name, last_name FROM "test_emp" ORDER BY emp_no LIMIT 5; multipleColumnWithAliasWithAndWithoutAsWithLimit -SELECT first_name f, last_name AS l FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT first_name f, last_name AS l FROM "test_emp" ORDER BY emp_no LIMIT 5; // @@ -41,16 +41,16 @@ SELECT first_name f, last_name AS l FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; //castWithLiteralToInt //SELECT CAST(1 AS INT); castOnColumnNumberToVarchar -SELECT CAST(emp_no AS VARCHAR) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT CAST(emp_no AS VARCHAR) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; castOnColumnNumberToLong -SELECT CAST(emp_no AS BIGINT) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT CAST(emp_no AS BIGINT) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; castOnColumnNumberToSmallint -SELECT CAST(emp_no AS SMALLINT) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT CAST(emp_no AS SMALLINT) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; castOnColumnNumberWithAliasToInt -SELECT CAST(emp_no AS INT) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT CAST(emp_no AS INT) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; castOnColumnNumberToReal -SELECT CAST(emp_no AS REAL) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT CAST(emp_no AS REAL) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; castOnColumnNumberToDouble -SELECT CAST(emp_no AS DOUBLE) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; +SELECT CAST(emp_no AS DOUBLE) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; castOnColumnNumberToBoolean -SELECT CAST(emp_no AS BOOL) AS emp_no_cast FROM "test_emp.emp" ORDER BY emp_no LIMIT 5; \ No newline at end of file +SELECT CAST(emp_no AS BOOL) AS emp_no_cast FROM "test_emp" ORDER BY emp_no LIMIT 5; \ No newline at end of file diff --git a/sql/jdbc/src/test/resources/setup_test_emp.sql b/sql/jdbc/src/test/resources/setup_test_emp.sql index 443cb1b963b..4c68a6717fe 100644 --- a/sql/jdbc/src/test/resources/setup_test_emp.sql +++ b/sql/jdbc/src/test/resources/setup_test_emp.sql @@ -1,5 +1,5 @@ -DROP TABLE IF EXISTS "test_emp.emp"; -CREATE TABLE "test_emp.emp" ("birth_date" TIMESTAMP, +DROP TABLE IF EXISTS "test_emp"; +CREATE TABLE "test_emp" ("birth_date" TIMESTAMP, "emp_no" INT, "first_name" VARCHAR(50), "gender" VARCHAR(1), diff --git a/sql/server/src/main/antlr/SqlBase.g4 b/sql/server/src/main/antlr/SqlBase.g4 index 4d6a3d58f63..7ce652fc54f 100644 --- a/sql/server/src/main/antlr/SqlBase.g4 +++ b/sql/server/src/main/antlr/SqlBase.g4 @@ -51,7 +51,7 @@ statement )* ')')? statement #debug - | SHOW TABLES ((FROM | IN) index=identifier)? (LIKE? pattern=STRING)? #showTables + | SHOW TABLES (LIKE? pattern=STRING)? #showTables | SHOW COLUMNS (FROM | IN) tableIdentifier #showColumns | (DESCRIBE | DESC) tableIdentifier #showColumns | SHOW FUNCTIONS (LIKE? pattern=STRING)? #showFunctions @@ -232,8 +232,7 @@ qualifiedName ; tableIdentifier - : index=identifier ('.' type=identifier)? - | '"' uindex=unquoteIdentifier ('.' utype=unquoteIdentifier)? '"' + : index=identifier ; identifier diff --git a/sql/server/src/main/antlr/SqlBase.tokens b/sql/server/src/main/antlr/SqlBase.tokens index bc37071696e..a8a04ee483f 100644 --- a/sql/server/src/main/antlr/SqlBase.tokens +++ b/sql/server/src/main/antlr/SqlBase.tokens @@ -2,204 +2,202 @@ T__0=1 T__1=2 T__2=3 T__3=4 -T__4=5 -SELECT=6 -FROM=7 -AS=8 -ALL=9 -WHEN=10 -THEN=11 -ANY=12 -DISTINCT=13 -WHERE=14 -GROUP=15 -BY=16 -GROUPING=17 -SETS=18 -ORDER=19 -HAVING=20 -LIMIT=21 -OR=22 -AND=23 -IN=24 -NOT=25 -NO=26 -EXISTS=27 -BETWEEN=28 -LIKE=29 -RLIKE=30 -IS=31 -NULL=32 -TRUE=33 -FALSE=34 -LAST=35 -ASC=36 -DESC=37 -FOR=38 -INTEGER=39 -JOIN=40 -CROSS=41 -OUTER=42 -INNER=43 -LEFT=44 -RIGHT=45 -FULL=46 -NATURAL=47 -USING=48 -ON=49 -WITH=50 -TABLE=51 -INTO=52 -DESCRIBE=53 -OPTION=54 -EXPLAIN=55 -ANALYZE=56 -FORMAT=57 -TYPE=58 -TEXT=59 -VERIFY=60 -GRAPHVIZ=61 -LOGICAL=62 -PHYSICAL=63 -SHOW=64 -TABLES=65 -COLUMNS=66 -COLUMN=67 -FUNCTIONS=68 -TO=69 -DEBUG=70 -PLAN=71 -PARSED=72 -ANALYZED=73 -OPTIMIZED=74 -MAPPED=75 -EXECUTABLE=76 -USE=77 -SET=78 -RESET=79 -SESSION=80 -SCHEMAS=81 -EXTRACT=82 -QUERY=83 -MATCH=84 -CAST=85 -EQ=86 -NEQ=87 -LT=88 -LTE=89 -GT=90 -GTE=91 -PLUS=92 -MINUS=93 -ASTERISK=94 -SLASH=95 -PERCENT=96 -CONCAT=97 -STRING=98 -INTEGER_VALUE=99 -DECIMAL_VALUE=100 -IDENTIFIER=101 -DIGIT_IDENTIFIER=102 -QUOTED_IDENTIFIER=103 -BACKQUOTED_IDENTIFIER=104 -SIMPLE_COMMENT=105 -BRACKETED_COMMENT=106 -WS=107 -UNRECOGNIZED=108 -DELIMITER=109 +SELECT=5 +FROM=6 +AS=7 +ALL=8 +WHEN=9 +THEN=10 +ANY=11 +DISTINCT=12 +WHERE=13 +GROUP=14 +BY=15 +GROUPING=16 +SETS=17 +ORDER=18 +HAVING=19 +LIMIT=20 +OR=21 +AND=22 +IN=23 +NOT=24 +NO=25 +EXISTS=26 +BETWEEN=27 +LIKE=28 +RLIKE=29 +IS=30 +NULL=31 +TRUE=32 +FALSE=33 +LAST=34 +ASC=35 +DESC=36 +FOR=37 +INTEGER=38 +JOIN=39 +CROSS=40 +OUTER=41 +INNER=42 +LEFT=43 +RIGHT=44 +FULL=45 +NATURAL=46 +USING=47 +ON=48 +WITH=49 +TABLE=50 +INTO=51 +DESCRIBE=52 +OPTION=53 +EXPLAIN=54 +ANALYZE=55 +FORMAT=56 +TYPE=57 +TEXT=58 +VERIFY=59 +GRAPHVIZ=60 +LOGICAL=61 +PHYSICAL=62 +SHOW=63 +TABLES=64 +COLUMNS=65 +COLUMN=66 +FUNCTIONS=67 +TO=68 +DEBUG=69 +PLAN=70 +PARSED=71 +ANALYZED=72 +OPTIMIZED=73 +MAPPED=74 +EXECUTABLE=75 +USE=76 +SET=77 +RESET=78 +SESSION=79 +SCHEMAS=80 +EXTRACT=81 +QUERY=82 +MATCH=83 +CAST=84 +EQ=85 +NEQ=86 +LT=87 +LTE=88 +GT=89 +GTE=90 +PLUS=91 +MINUS=92 +ASTERISK=93 +SLASH=94 +PERCENT=95 +CONCAT=96 +STRING=97 +INTEGER_VALUE=98 +DECIMAL_VALUE=99 +IDENTIFIER=100 +DIGIT_IDENTIFIER=101 +QUOTED_IDENTIFIER=102 +BACKQUOTED_IDENTIFIER=103 +SIMPLE_COMMENT=104 +BRACKETED_COMMENT=105 +WS=106 +UNRECOGNIZED=107 +DELIMITER=108 '('=1 ')'=2 ','=3 '.'=4 -'"'=5 -'SELECT'=6 -'FROM'=7 -'AS'=8 -'ALL'=9 -'WHEN'=10 -'THEN'=11 -'ANY'=12 -'DISTINCT'=13 -'WHERE'=14 -'GROUP'=15 -'BY'=16 -'GROUPING'=17 -'SETS'=18 -'ORDER'=19 -'HAVING'=20 -'LIMIT'=21 -'OR'=22 -'AND'=23 -'IN'=24 -'NOT'=25 -'NO'=26 -'EXISTS'=27 -'BETWEEN'=28 -'LIKE'=29 -'RLIKE'=30 -'IS'=31 -'NULL'=32 -'TRUE'=33 -'FALSE'=34 -'LAST'=35 -'ASC'=36 -'DESC'=37 -'FOR'=38 -'INTEGER'=39 -'JOIN'=40 -'CROSS'=41 -'OUTER'=42 -'INNER'=43 -'LEFT'=44 -'RIGHT'=45 -'FULL'=46 -'NATURAL'=47 -'USING'=48 -'ON'=49 -'WITH'=50 -'TABLE'=51 -'INTO'=52 -'DESCRIBE'=53 -'OPTION'=54 -'EXPLAIN'=55 -'ANALYZE'=56 -'FORMAT'=57 -'TYPE'=58 -'TEXT'=59 -'VERIFY'=60 -'GRAPHVIZ'=61 -'LOGICAL'=62 -'PHYSICAL'=63 -'SHOW'=64 -'TABLES'=65 -'COLUMNS'=66 -'COLUMN'=67 -'FUNCTIONS'=68 -'TO'=69 -'DEBUG'=70 -'PLAN'=71 -'PARSED'=72 -'ANALYZED'=73 -'OPTIMIZED'=74 -'MAPPED'=75 -'EXECUTABLE'=76 -'USE'=77 -'SET'=78 -'RESET'=79 -'SESSION'=80 -'SCHEMAS'=81 -'EXTRACT'=82 -'QUERY'=83 -'MATCH'=84 -'CAST'=85 -'='=86 -'<'=88 -'<='=89 -'>'=90 -'>='=91 -'+'=92 -'-'=93 -'*'=94 -'/'=95 -'%'=96 -'||'=97 +'SELECT'=5 +'FROM'=6 +'AS'=7 +'ALL'=8 +'WHEN'=9 +'THEN'=10 +'ANY'=11 +'DISTINCT'=12 +'WHERE'=13 +'GROUP'=14 +'BY'=15 +'GROUPING'=16 +'SETS'=17 +'ORDER'=18 +'HAVING'=19 +'LIMIT'=20 +'OR'=21 +'AND'=22 +'IN'=23 +'NOT'=24 +'NO'=25 +'EXISTS'=26 +'BETWEEN'=27 +'LIKE'=28 +'RLIKE'=29 +'IS'=30 +'NULL'=31 +'TRUE'=32 +'FALSE'=33 +'LAST'=34 +'ASC'=35 +'DESC'=36 +'FOR'=37 +'INTEGER'=38 +'JOIN'=39 +'CROSS'=40 +'OUTER'=41 +'INNER'=42 +'LEFT'=43 +'RIGHT'=44 +'FULL'=45 +'NATURAL'=46 +'USING'=47 +'ON'=48 +'WITH'=49 +'TABLE'=50 +'INTO'=51 +'DESCRIBE'=52 +'OPTION'=53 +'EXPLAIN'=54 +'ANALYZE'=55 +'FORMAT'=56 +'TYPE'=57 +'TEXT'=58 +'VERIFY'=59 +'GRAPHVIZ'=60 +'LOGICAL'=61 +'PHYSICAL'=62 +'SHOW'=63 +'TABLES'=64 +'COLUMNS'=65 +'COLUMN'=66 +'FUNCTIONS'=67 +'TO'=68 +'DEBUG'=69 +'PLAN'=70 +'PARSED'=71 +'ANALYZED'=72 +'OPTIMIZED'=73 +'MAPPED'=74 +'EXECUTABLE'=75 +'USE'=76 +'SET'=77 +'RESET'=78 +'SESSION'=79 +'SCHEMAS'=80 +'EXTRACT'=81 +'QUERY'=82 +'MATCH'=83 +'CAST'=84 +'='=85 +'<'=87 +'<='=88 +'>'=89 +'>='=90 +'+'=91 +'-'=92 +'*'=93 +'/'=94 +'%'=95 +'||'=96 diff --git a/sql/server/src/main/antlr/SqlBaseLexer.tokens b/sql/server/src/main/antlr/SqlBaseLexer.tokens index efa291176f7..6397c938231 100644 --- a/sql/server/src/main/antlr/SqlBaseLexer.tokens +++ b/sql/server/src/main/antlr/SqlBaseLexer.tokens @@ -2,203 +2,201 @@ T__0=1 T__1=2 T__2=3 T__3=4 -T__4=5 -SELECT=6 -FROM=7 -AS=8 -ALL=9 -WHEN=10 -THEN=11 -ANY=12 -DISTINCT=13 -WHERE=14 -GROUP=15 -BY=16 -GROUPING=17 -SETS=18 -ORDER=19 -HAVING=20 -LIMIT=21 -OR=22 -AND=23 -IN=24 -NOT=25 -NO=26 -EXISTS=27 -BETWEEN=28 -LIKE=29 -RLIKE=30 -IS=31 -NULL=32 -TRUE=33 -FALSE=34 -LAST=35 -ASC=36 -DESC=37 -FOR=38 -INTEGER=39 -JOIN=40 -CROSS=41 -OUTER=42 -INNER=43 -LEFT=44 -RIGHT=45 -FULL=46 -NATURAL=47 -USING=48 -ON=49 -WITH=50 -TABLE=51 -INTO=52 -DESCRIBE=53 -OPTION=54 -EXPLAIN=55 -ANALYZE=56 -FORMAT=57 -TYPE=58 -TEXT=59 -VERIFY=60 -GRAPHVIZ=61 -LOGICAL=62 -PHYSICAL=63 -SHOW=64 -TABLES=65 -COLUMNS=66 -COLUMN=67 -FUNCTIONS=68 -TO=69 -DEBUG=70 -PLAN=71 -PARSED=72 -ANALYZED=73 -OPTIMIZED=74 -MAPPED=75 -EXECUTABLE=76 -USE=77 -SET=78 -RESET=79 -SESSION=80 -SCHEMAS=81 -EXTRACT=82 -QUERY=83 -MATCH=84 -CAST=85 -EQ=86 -NEQ=87 -LT=88 -LTE=89 -GT=90 -GTE=91 -PLUS=92 -MINUS=93 -ASTERISK=94 -SLASH=95 -PERCENT=96 -CONCAT=97 -STRING=98 -INTEGER_VALUE=99 -DECIMAL_VALUE=100 -IDENTIFIER=101 -DIGIT_IDENTIFIER=102 -QUOTED_IDENTIFIER=103 -BACKQUOTED_IDENTIFIER=104 -SIMPLE_COMMENT=105 -BRACKETED_COMMENT=106 -WS=107 -UNRECOGNIZED=108 +SELECT=5 +FROM=6 +AS=7 +ALL=8 +WHEN=9 +THEN=10 +ANY=11 +DISTINCT=12 +WHERE=13 +GROUP=14 +BY=15 +GROUPING=16 +SETS=17 +ORDER=18 +HAVING=19 +LIMIT=20 +OR=21 +AND=22 +IN=23 +NOT=24 +NO=25 +EXISTS=26 +BETWEEN=27 +LIKE=28 +RLIKE=29 +IS=30 +NULL=31 +TRUE=32 +FALSE=33 +LAST=34 +ASC=35 +DESC=36 +FOR=37 +INTEGER=38 +JOIN=39 +CROSS=40 +OUTER=41 +INNER=42 +LEFT=43 +RIGHT=44 +FULL=45 +NATURAL=46 +USING=47 +ON=48 +WITH=49 +TABLE=50 +INTO=51 +DESCRIBE=52 +OPTION=53 +EXPLAIN=54 +ANALYZE=55 +FORMAT=56 +TYPE=57 +TEXT=58 +VERIFY=59 +GRAPHVIZ=60 +LOGICAL=61 +PHYSICAL=62 +SHOW=63 +TABLES=64 +COLUMNS=65 +COLUMN=66 +FUNCTIONS=67 +TO=68 +DEBUG=69 +PLAN=70 +PARSED=71 +ANALYZED=72 +OPTIMIZED=73 +MAPPED=74 +EXECUTABLE=75 +USE=76 +SET=77 +RESET=78 +SESSION=79 +SCHEMAS=80 +EXTRACT=81 +QUERY=82 +MATCH=83 +CAST=84 +EQ=85 +NEQ=86 +LT=87 +LTE=88 +GT=89 +GTE=90 +PLUS=91 +MINUS=92 +ASTERISK=93 +SLASH=94 +PERCENT=95 +CONCAT=96 +STRING=97 +INTEGER_VALUE=98 +DECIMAL_VALUE=99 +IDENTIFIER=100 +DIGIT_IDENTIFIER=101 +QUOTED_IDENTIFIER=102 +BACKQUOTED_IDENTIFIER=103 +SIMPLE_COMMENT=104 +BRACKETED_COMMENT=105 +WS=106 +UNRECOGNIZED=107 '('=1 ')'=2 ','=3 '.'=4 -'"'=5 -'SELECT'=6 -'FROM'=7 -'AS'=8 -'ALL'=9 -'WHEN'=10 -'THEN'=11 -'ANY'=12 -'DISTINCT'=13 -'WHERE'=14 -'GROUP'=15 -'BY'=16 -'GROUPING'=17 -'SETS'=18 -'ORDER'=19 -'HAVING'=20 -'LIMIT'=21 -'OR'=22 -'AND'=23 -'IN'=24 -'NOT'=25 -'NO'=26 -'EXISTS'=27 -'BETWEEN'=28 -'LIKE'=29 -'RLIKE'=30 -'IS'=31 -'NULL'=32 -'TRUE'=33 -'FALSE'=34 -'LAST'=35 -'ASC'=36 -'DESC'=37 -'FOR'=38 -'INTEGER'=39 -'JOIN'=40 -'CROSS'=41 -'OUTER'=42 -'INNER'=43 -'LEFT'=44 -'RIGHT'=45 -'FULL'=46 -'NATURAL'=47 -'USING'=48 -'ON'=49 -'WITH'=50 -'TABLE'=51 -'INTO'=52 -'DESCRIBE'=53 -'OPTION'=54 -'EXPLAIN'=55 -'ANALYZE'=56 -'FORMAT'=57 -'TYPE'=58 -'TEXT'=59 -'VERIFY'=60 -'GRAPHVIZ'=61 -'LOGICAL'=62 -'PHYSICAL'=63 -'SHOW'=64 -'TABLES'=65 -'COLUMNS'=66 -'COLUMN'=67 -'FUNCTIONS'=68 -'TO'=69 -'DEBUG'=70 -'PLAN'=71 -'PARSED'=72 -'ANALYZED'=73 -'OPTIMIZED'=74 -'MAPPED'=75 -'EXECUTABLE'=76 -'USE'=77 -'SET'=78 -'RESET'=79 -'SESSION'=80 -'SCHEMAS'=81 -'EXTRACT'=82 -'QUERY'=83 -'MATCH'=84 -'CAST'=85 -'='=86 -'<'=88 -'<='=89 -'>'=90 -'>='=91 -'+'=92 -'-'=93 -'*'=94 -'/'=95 -'%'=96 -'||'=97 +'SELECT'=5 +'FROM'=6 +'AS'=7 +'ALL'=8 +'WHEN'=9 +'THEN'=10 +'ANY'=11 +'DISTINCT'=12 +'WHERE'=13 +'GROUP'=14 +'BY'=15 +'GROUPING'=16 +'SETS'=17 +'ORDER'=18 +'HAVING'=19 +'LIMIT'=20 +'OR'=21 +'AND'=22 +'IN'=23 +'NOT'=24 +'NO'=25 +'EXISTS'=26 +'BETWEEN'=27 +'LIKE'=28 +'RLIKE'=29 +'IS'=30 +'NULL'=31 +'TRUE'=32 +'FALSE'=33 +'LAST'=34 +'ASC'=35 +'DESC'=36 +'FOR'=37 +'INTEGER'=38 +'JOIN'=39 +'CROSS'=40 +'OUTER'=41 +'INNER'=42 +'LEFT'=43 +'RIGHT'=44 +'FULL'=45 +'NATURAL'=46 +'USING'=47 +'ON'=48 +'WITH'=49 +'TABLE'=50 +'INTO'=51 +'DESCRIBE'=52 +'OPTION'=53 +'EXPLAIN'=54 +'ANALYZE'=55 +'FORMAT'=56 +'TYPE'=57 +'TEXT'=58 +'VERIFY'=59 +'GRAPHVIZ'=60 +'LOGICAL'=61 +'PHYSICAL'=62 +'SHOW'=63 +'TABLES'=64 +'COLUMNS'=65 +'COLUMN'=66 +'FUNCTIONS'=67 +'TO'=68 +'DEBUG'=69 +'PLAN'=70 +'PARSED'=71 +'ANALYZED'=72 +'OPTIMIZED'=73 +'MAPPED'=74 +'EXECUTABLE'=75 +'USE'=76 +'SET'=77 +'RESET'=78 +'SESSION'=79 +'SCHEMAS'=80 +'EXTRACT'=81 +'QUERY'=82 +'MATCH'=83 +'CAST'=84 +'='=85 +'<'=87 +'<='=88 +'>'=89 +'>='=90 +'+'=91 +'-'=92 +'*'=93 +'/'=94 +'%'=95 +'||'=96 diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/UnknownTypeException.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/InvalidIndexException.java similarity index 61% rename from sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/UnknownTypeException.java rename to sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/InvalidIndexException.java index 606099d21bc..eab23307595 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/UnknownTypeException.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/InvalidIndexException.java @@ -7,9 +7,9 @@ package org.elasticsearch.xpack.sql.analysis; import org.elasticsearch.xpack.sql.tree.Node; -public class UnknownTypeException extends AnalysisException { +public class InvalidIndexException extends AnalysisException { - public UnknownTypeException(String index, String type, Node source) { - super(source, "Cannot resolve type %s in index %s", type, index); + public InvalidIndexException(String index, Node source) { + super(source, "Invalid index %s; contains more than one type", index); } } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/analyzer/Analyzer.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/analyzer/Analyzer.java index 95055041181..ef541988669 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/analyzer/Analyzer.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/analyzer/Analyzer.java @@ -6,9 +6,9 @@ package org.elasticsearch.xpack.sql.analysis.analyzer; import org.elasticsearch.xpack.sql.analysis.AnalysisException; +import org.elasticsearch.xpack.sql.analysis.InvalidIndexException; import org.elasticsearch.xpack.sql.analysis.UnknownFunctionException; import org.elasticsearch.xpack.sql.analysis.UnknownIndexException; -import org.elasticsearch.xpack.sql.analysis.UnknownTypeException; import org.elasticsearch.xpack.sql.analysis.analyzer.Verifier.Failure; import org.elasticsearch.xpack.sql.analysis.catalog.Catalog; import org.elasticsearch.xpack.sql.capabilities.Resolvables; @@ -217,7 +217,7 @@ public class Analyzer extends RuleExecutor { private LogicalPlan substituteCTE(LogicalPlan p, Map subQueries) { if (p instanceof UnresolvedRelation) { UnresolvedRelation ur = (UnresolvedRelation) p; - SubQueryAlias subQueryAlias = subQueries.get(ur.table().type()); + SubQueryAlias subQueryAlias = subQueries.get(ur.table().index()); if (subQueryAlias != null) { if (ur.alias() != null) { return new SubQueryAlias(ur.location(), subQueryAlias, ur.alias()); @@ -245,14 +245,13 @@ public class Analyzer extends RuleExecutor { if (!catalog.indexExists(index)) { throw new UnknownIndexException(index, plan); } - - String type = table.type(); - if (!catalog.typeExists(index, type)) { - throw new UnknownTypeException(index, type, plan); + + if (!catalog.indexIsValid(index)) { + throw new InvalidIndexException(index, plan); } - LogicalPlan catalogTable = new CatalogTable(plan.location(), catalog.getType(index, type)); - SubQueryAlias sa = new SubQueryAlias(plan.location(), catalogTable, type); + LogicalPlan catalogTable = new CatalogTable(plan.location(), catalog.getIndex(index)); + SubQueryAlias sa = new SubQueryAlias(plan.location(), catalogTable, index); if (plan.alias() != null) { sa = new SubQueryAlias(plan.location(), sa, plan.alias()); diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/Catalog.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/Catalog.java index e4ddab03274..f265a34d0cf 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/Catalog.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/Catalog.java @@ -9,21 +9,14 @@ import java.util.List; public interface Catalog { - // NOCOMMIT make sure we need all of these methods.... - - EsIndex getIndex(String index); boolean indexExists(String index); + boolean indexIsValid(String index); + + EsIndex getIndex(String index); + List listIndices(); List listIndices(String pattern); - - EsType getType(String index, String type); - - boolean typeExists(String index, String type); - - List listTypes(String index); - - List listTypes(String index, String pattern); } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsCatalog.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsCatalog.java index 7c975a70433..b7735cb8af4 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsCatalog.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsCatalog.java @@ -9,9 +9,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.cluster.metadata.MetaData; -import org.elasticsearch.common.Strings; import java.util.ArrayList; import java.util.Iterator; @@ -20,8 +18,6 @@ import java.util.function.Supplier; public class EsCatalog implements Catalog { - private static final String WILDCARD = "*"; - private final Supplier clusterState; private IndexNameExpressionResolver indexNameExpressionResolver; @@ -48,8 +44,14 @@ public class EsCatalog implements Catalog { @Override public boolean indexExists(String index) { - MetaData meta = metadata(); - return meta.hasIndex(index); + IndexMetaData idx = metadata().index(index); + return idx != null; + } + + @Override + public boolean indexIsValid(String index) { + IndexMetaData idx = metadata().index(index); + return idx != null && indexHasOnlyOneType(idx); } @Override @@ -68,62 +70,27 @@ public class EsCatalog implements Catalog { String[] indexNames = resolveIndex(pattern); List indices = new ArrayList<>(indexNames.length); for (String indexName : indexNames) { - indices.add(md.index(indexName)); + indices.add(md.index(indexName)); } indexMetadata = indices.iterator(); } - return EsIndex.build(indexMetadata); - } - - @Override - public EsType getType(String index, String type) { - if (!indexExists(index)) { - return EsType.NOT_FOUND; - } - - // NOCOMMIT verify that this works if the index isn't on the node - MappingMetaData mapping = metadata().index(index).mapping(type); - if (mapping == null) { - return EsType.NOT_FOUND; - } - return EsType.build(index, type, mapping); - } - - @Override - public boolean typeExists(String index, String type) { - return indexExists(index) && metadata().index(index).getMappings().containsKey(type); - } - - @Override - public List listTypes(String index) { - return listTypes(index, null); - } - - @Override - public List listTypes(String indexPattern, String pattern) { - if (!Strings.hasText(indexPattern)) { - indexPattern = WILDCARD; - } - - String[] iName = indexNameExpressionResolver.concreteIndexNames(clusterState.get(), IndicesOptions.strictExpandOpenAndForbidClosed(), indexPattern); - - List types = new ArrayList<>(); - - for (String cIndex : iName) { - IndexMetaData imd = metadata().index(cIndex); - - if (Strings.hasText(pattern)) { - types.add(EsType.build(cIndex, pattern, imd.mapping(pattern))); - } - else { - types.addAll(EsType.build(cIndex, imd.getMappings())); + List list = new ArrayList<>(); + // filter unsupported (indices with more than one type) indices + while (indexMetadata.hasNext()) { + IndexMetaData imd = indexMetadata.next(); + if (indexHasOnlyOneType(imd)) { + list.add(EsIndex.build(imd)); } } - return types; + return list; } - + + private boolean indexHasOnlyOneType(IndexMetaData index) { + return index.getMappings().size() <= 1; + } + private String[] resolveIndex(String pattern) { return indexNameExpressionResolver.concreteIndexNames(clusterState.get(), IndicesOptions.strictExpandOpenAndForbidClosed(), pattern); } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsIndex.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsIndex.java index 48ab58e333a..59d0327fe21 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsIndex.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsIndex.java @@ -5,29 +5,36 @@ */ package org.elasticsearch.xpack.sql.analysis.catalog; +import org.elasticsearch.cluster.metadata.IndexMetaData; +import org.elasticsearch.cluster.metadata.MappingMetaData; +import org.elasticsearch.common.collect.ImmutableOpenMap; +import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.xpack.sql.SqlIllegalArgumentException; +import org.elasticsearch.xpack.sql.type.DataType; +import org.elasticsearch.xpack.sql.type.Types; +import org.elasticsearch.xpack.sql.util.StringUtils; + import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Iterator; import java.util.List; - -import org.elasticsearch.cluster.metadata.IndexMetaData; -import org.elasticsearch.common.settings.Settings; +import java.util.Map; import static java.util.Collections.emptyList; +import static java.util.Collections.emptyMap; public class EsIndex { - public static final EsIndex NOT_FOUND = new EsIndex("", emptyList(), emptyList(), Settings.EMPTY); + public static final EsIndex NOT_FOUND = new EsIndex(StringUtils.EMPTY, emptyMap(), emptyList(), Settings.EMPTY); private final String name; - private final List types; + private final Map mapping; private final List aliases; private final Settings settings; - public EsIndex(String name, List types, List aliases, Settings settings) { + public EsIndex(String name, Map mapping, List aliases, Settings settings) { this.name = name; - this.types = types; + this.mapping = mapping; this.aliases = aliases; this.settings = settings; } @@ -36,17 +43,14 @@ public class EsIndex { return name; } - - public List types() { - return types; + public Map mapping() { + return mapping; } - public List aliases() { return aliases; } - public Settings settings() { return settings; } @@ -57,14 +61,25 @@ public class EsIndex { } List list = new ArrayList<>(); while (metadata.hasNext()) { - list.add(build(metadata.next())); + build(metadata.next()); } return list; } static EsIndex build(IndexMetaData metadata) { - List types = Arrays.asList(metadata.getMappings().keys().toArray(String.class)); + ImmutableOpenMap mappings = metadata.getMappings(); + if (mappings.size() > 1) { + throw new SqlIllegalArgumentException("Cannot use index [%s] as it contains multiple types %s", metadata.getIndex().getName(), Arrays.toString(mappings.keys().toArray())); + } + MappingMetaData mm = mappings.isEmpty() ? null : mappings.valuesIt().next(); + Map mapping = mm != null ? Types.fromEs(mm.sourceAsMap()) : emptyMap(); + List aliases = Arrays.asList(metadata.getAliases().keys().toArray(String.class)); - return new EsIndex(metadata.getIndex().getName(), types, aliases, metadata.getSettings()); + return new EsIndex(metadata.getIndex().getName(), mapping, aliases, metadata.getSettings()); + } + + @Override + public String toString() { + return name; } } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsType.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsType.java deleted file mode 100644 index 475c6101f56..00000000000 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/EsType.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -package org.elasticsearch.xpack.sql.analysis.catalog; - -import com.carrotsearch.hppc.cursors.ObjectObjectCursor; - -import org.elasticsearch.cluster.metadata.MappingMetaData; -import org.elasticsearch.common.collect.ImmutableOpenMap; -import org.elasticsearch.xpack.sql.type.DataType; -import org.elasticsearch.xpack.sql.type.Types; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class EsType { - - public static final EsType NOT_FOUND = new EsType("", "", Collections.emptyMap()); - - private final String index; - private final String name; - private final Map mapping; - - public EsType(String index, String name, Map mapping) { - this.index = index; - this.name = name; - this.mapping = mapping; - } - - public String index() { - return index; - } - - public String name() { - return name; - } - - public Map mapping() { - return mapping; - } - - static EsType build(String index, String type, MappingMetaData metaData) { - Map asMap = metaData.sourceAsMap(); - - Map mapping = Types.fromEs(asMap); - return new EsType(index, type, mapping); - } - - static Collection build(String index, ImmutableOpenMap mapping) { - List tps = new ArrayList<>(); - - for (ObjectObjectCursor entry : mapping) { - tps.add(build(index, entry.key, entry.value)); - } - - return tps; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("index="); - sb.append(index); - sb.append(",type="); - sb.append(name); - return sb.toString(); - } -} \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/InMemoryCatalog.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/InMemoryCatalog.java deleted file mode 100644 index 602eab3e296..00000000000 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/analysis/catalog/InMemoryCatalog.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -package org.elasticsearch.xpack.sql.analysis.catalog; - -import org.elasticsearch.xpack.sql.util.StringUtils; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static java.util.Collections.emptyList; -import static java.util.stream.Collectors.toList; - -public abstract class InMemoryCatalog implements Catalog { - - protected final Map indices = new LinkedHashMap<>(); - protected final Map> types = new LinkedHashMap<>(); - - { - List idxs = indices(); - for (EsIndex esIndex : idxs) { - indices.put(esIndex.name(), esIndex); - types.put(esIndex.name(), new LinkedHashMap<>()); - } - - List tps = types(); - for (EsType esType : tps) { - Map idxTypes = types.get(esType.index()); - idxTypes.put(esType.name(), esType); - } - } - - @Override - public EsIndex getIndex(String index) { - EsIndex idx = indices.get(index); - return (idx == null ? EsIndex.NOT_FOUND : idx); - } - - @Override - public boolean indexExists(String index) { - return indices.containsKey(index); - } - - @Override - public List listIndices() { - return new ArrayList<>(indices.values()); - } - - @Override - public List listIndices(String pattern) { - Pattern p = StringUtils.likeRegex(pattern); - return indices.entrySet().stream() - .filter(e -> p.matcher(e.getKey()).matches()) - .map(Map.Entry::getValue) - .collect(Collectors.toList()); - } - - @Override - public EsType getType(String index, String type) { - Map typs = types.get(index); - if (typs == null) { - return EsType.NOT_FOUND; - } - EsType esType = typs.get(type); - return (esType == null ? EsType.NOT_FOUND : esType); - } - - @Override - public boolean typeExists(String index, String type) { - Map typs = types.get(index); - return (typs != null && typs.containsKey(type)); - } - - @Override - public List listTypes(String index) { - Map typs = types.get(index); - return typs != null ? new ArrayList<>(typs.values()) : emptyList(); - } - - @Override - public List listTypes(String index, String pattern) { - Map typs = types.get(index); - if (typs == null) { - return emptyList(); - } - - Pattern p = StringUtils.likeRegex(pattern); - return typs.entrySet().stream() - .filter(e -> p.matcher(e.getKey()).matches()) - .map(Map.Entry::getValue) - .collect(toList()); - } - - public void clear() { - indices.clear(); - types.clear(); - } - - protected abstract List indices(); - - protected abstract List types(); -} \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/execution/search/Scroller.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/execution/search/Scroller.java index aa1f7759163..ded41681b85 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/execution/search/Scroller.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/execution/search/Scroller.java @@ -64,13 +64,13 @@ public class Scroller { this.size = size; } - public void scroll(Schema schema, QueryContainer query, String index, String type, ActionListener listener) { + public void scroll(Schema schema, QueryContainer query, String index, ActionListener listener) { // prepare the request SearchSourceBuilder sourceBuilder = SourceGenerator.sourceBuilder(query); - log.trace("About to execute query {}", sourceBuilder); + log.trace("About to execute query {} on {}", sourceBuilder, index); - SearchRequest search = client.prepareSearch(index).setTypes(type).setSource(sourceBuilder).request(); + SearchRequest search = client.prepareSearch(index).setSource(sourceBuilder).request(); search.scroll(keepAlive).source().timeout(timeout); // set the size only if it hasn't been specified (aggs only queries set the size to 0) @@ -280,7 +280,7 @@ public class Scroller { // is all the content already retrieved? if (Boolean.TRUE.equals(response.isTerminatedEarly()) || response.getHits().getTotalHits() == hits.length // or maybe the limit has been reached - || docsRead >= limit) { + || (docsRead >= limit && limit > -1)) { // if so, clear the scroll clearScroll(scrollId); // and remove it to indicate no more data is expected diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/expression/function/AbstractFunctionRegistry.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/expression/function/AbstractFunctionRegistry.java index 4f9f462c92e..69738f91d1b 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/expression/function/AbstractFunctionRegistry.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/expression/function/AbstractFunctionRegistry.java @@ -155,7 +155,7 @@ abstract class AbstractFunctionRegistry implements FunctionRegistry { if (timezoneAware) { args.add(settings.timeZone()); } - } + } return (Function) info.ctr.newInstance(args.toArray()); } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { throw new SqlIllegalArgumentException(ex, "Cannot create instance of function %s", ur.name()); diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/CommandBuilder.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/CommandBuilder.java index 0a54a77b5d5..919210a2e5e 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/CommandBuilder.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/CommandBuilder.java @@ -108,7 +108,7 @@ abstract class CommandBuilder extends LogicalPlanBuilder { @Override public Object visitShowTables(ShowTablesContext ctx) { - return new ShowTables(source(ctx), visitIdentifier(ctx.index), text(ctx.pattern)); + return new ShowTables(source(ctx), text(ctx.pattern)); } @Override @@ -120,10 +120,7 @@ abstract class CommandBuilder extends LogicalPlanBuilder { @Override public Object visitShowColumns(ShowColumnsContext ctx) { TableIdentifier identifier = visitTableIdentifier(ctx.tableIdentifier()); - if (!identifier.hasType()) { - throw new ParsingException(identifier.location(), "Target type needs to be specified"); - } - return new ShowColumns(source(ctx), identifier.index(), identifier.type()); + return new ShowColumns(source(ctx), identifier.index()); } @Override diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java index eb03c8de07c..344cc6dabf5 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/ExpressionBuilder.java @@ -133,7 +133,7 @@ abstract class ExpressionBuilder extends IdentifierBuilder { } else if (ctx.table != null) { TableIdentifier table = visitTableIdentifier(ctx.table); - qualifier = table.index() + "." + table.type(); + qualifier = table.index(); } return new UnresolvedAttribute(source(ctx), visitIdentifier(ctx.name), qualifier); } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/IdentifierBuilder.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/IdentifierBuilder.java index 89d4e3f2131..5f506b5cd0f 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/IdentifierBuilder.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/IdentifierBuilder.java @@ -5,8 +5,6 @@ */ package org.elasticsearch.xpack.sql.parser; -import java.util.Locale; - import org.elasticsearch.common.Strings; import org.elasticsearch.xpack.sql.parser.SqlBaseParser.IdentifierContext; import org.elasticsearch.xpack.sql.parser.SqlBaseParser.QualifiedNameContext; @@ -14,28 +12,20 @@ import org.elasticsearch.xpack.sql.parser.SqlBaseParser.TableIdentifierContext; import org.elasticsearch.xpack.sql.plan.TableIdentifier; import org.elasticsearch.xpack.sql.tree.Location; +import java.util.Locale; + import static java.lang.String.format; abstract class IdentifierBuilder extends AbstractBuilder { @Override public TableIdentifier visitTableIdentifier(TableIdentifierContext ctx) { - String index = null; - String type = null; - - index = text(ctx.uindex); - type = text(ctx.utype); + String index = text(ctx.index); - if (index == null) { - index = text(ctx.index); - type = text(ctx.type); - } - Location source = source(ctx); validateIndex(index, source); - validateType(type, source); - return new TableIdentifier(source, index, type); + return new TableIdentifier(source, index); } // see https://github.com/elastic/elasticsearch/issues/6736 @@ -51,10 +41,6 @@ abstract class IdentifierBuilder extends AbstractBuilder { } } - private static void validateType(String type, Location source) { - // no-op - } - @Override public String visitIdentifier(IdentifierContext ctx) { return ctx == null ? null : ctx.quoteIdentifier() != null ? text(ctx.quoteIdentifier()) : text(ctx.unquoteIdentifier()); diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/LogicalPlanBuilder.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/LogicalPlanBuilder.java index 5fbb48cd6ba..473e087e211 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/LogicalPlanBuilder.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/LogicalPlanBuilder.java @@ -195,9 +195,6 @@ abstract class LogicalPlanBuilder extends ExpressionBuilder { public LogicalPlan visitTableName(TableNameContext ctx) { String alias = visitQualifiedName(ctx.qualifiedName()); TableIdentifier tableIdentifier = visitTableIdentifier(ctx.tableIdentifier()); - if (!tableIdentifier.hasType()) { - throw new ParsingException(source(ctx), "Index type is required"); - } return new UnresolvedRelation(source(ctx), tableIdentifier, alias); } } \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseLexer.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseLexer.java index 7083314bc70..51cf7a0ebb1 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseLexer.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseLexer.java @@ -22,30 +22,30 @@ class SqlBaseLexer extends Lexer { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, SELECT=6, FROM=7, AS=8, ALL=9, - WHEN=10, THEN=11, ANY=12, DISTINCT=13, WHERE=14, GROUP=15, BY=16, GROUPING=17, - SETS=18, ORDER=19, HAVING=20, LIMIT=21, OR=22, AND=23, IN=24, NOT=25, - NO=26, EXISTS=27, BETWEEN=28, LIKE=29, RLIKE=30, IS=31, NULL=32, TRUE=33, - FALSE=34, LAST=35, ASC=36, DESC=37, FOR=38, INTEGER=39, JOIN=40, CROSS=41, - OUTER=42, INNER=43, LEFT=44, RIGHT=45, FULL=46, NATURAL=47, USING=48, - ON=49, WITH=50, TABLE=51, INTO=52, DESCRIBE=53, OPTION=54, EXPLAIN=55, - ANALYZE=56, FORMAT=57, TYPE=58, TEXT=59, VERIFY=60, GRAPHVIZ=61, LOGICAL=62, - PHYSICAL=63, SHOW=64, TABLES=65, COLUMNS=66, COLUMN=67, FUNCTIONS=68, - TO=69, DEBUG=70, PLAN=71, PARSED=72, ANALYZED=73, OPTIMIZED=74, MAPPED=75, - EXECUTABLE=76, USE=77, SET=78, RESET=79, SESSION=80, SCHEMAS=81, EXTRACT=82, - QUERY=83, MATCH=84, CAST=85, EQ=86, NEQ=87, LT=88, LTE=89, GT=90, GTE=91, - PLUS=92, MINUS=93, ASTERISK=94, SLASH=95, PERCENT=96, CONCAT=97, STRING=98, - INTEGER_VALUE=99, DECIMAL_VALUE=100, IDENTIFIER=101, DIGIT_IDENTIFIER=102, - QUOTED_IDENTIFIER=103, BACKQUOTED_IDENTIFIER=104, SIMPLE_COMMENT=105, - BRACKETED_COMMENT=106, WS=107, UNRECOGNIZED=108; + T__0=1, T__1=2, T__2=3, T__3=4, SELECT=5, FROM=6, AS=7, ALL=8, WHEN=9, + THEN=10, ANY=11, DISTINCT=12, WHERE=13, GROUP=14, BY=15, GROUPING=16, + SETS=17, ORDER=18, HAVING=19, LIMIT=20, OR=21, AND=22, IN=23, NOT=24, + NO=25, EXISTS=26, BETWEEN=27, LIKE=28, RLIKE=29, IS=30, NULL=31, TRUE=32, + FALSE=33, LAST=34, ASC=35, DESC=36, FOR=37, INTEGER=38, JOIN=39, CROSS=40, + OUTER=41, INNER=42, LEFT=43, RIGHT=44, FULL=45, NATURAL=46, USING=47, + ON=48, WITH=49, TABLE=50, INTO=51, DESCRIBE=52, OPTION=53, EXPLAIN=54, + ANALYZE=55, FORMAT=56, TYPE=57, TEXT=58, VERIFY=59, GRAPHVIZ=60, LOGICAL=61, + PHYSICAL=62, SHOW=63, TABLES=64, COLUMNS=65, COLUMN=66, FUNCTIONS=67, + TO=68, DEBUG=69, PLAN=70, PARSED=71, ANALYZED=72, OPTIMIZED=73, MAPPED=74, + EXECUTABLE=75, USE=76, SET=77, RESET=78, SESSION=79, SCHEMAS=80, EXTRACT=81, + QUERY=82, MATCH=83, CAST=84, EQ=85, NEQ=86, LT=87, LTE=88, GT=89, GTE=90, + PLUS=91, MINUS=92, ASTERISK=93, SLASH=94, PERCENT=95, CONCAT=96, STRING=97, + INTEGER_VALUE=98, DECIMAL_VALUE=99, IDENTIFIER=100, DIGIT_IDENTIFIER=101, + QUOTED_IDENTIFIER=102, BACKQUOTED_IDENTIFIER=103, SIMPLE_COMMENT=104, + BRACKETED_COMMENT=105, WS=106, UNRECOGNIZED=107; public static String[] modeNames = { "DEFAULT_MODE" }; public static final String[] ruleNames = { - "T__0", "T__1", "T__2", "T__3", "T__4", "SELECT", "FROM", "AS", "ALL", - "WHEN", "THEN", "ANY", "DISTINCT", "WHERE", "GROUP", "BY", "GROUPING", - "SETS", "ORDER", "HAVING", "LIMIT", "OR", "AND", "IN", "NOT", "NO", "EXISTS", + "T__0", "T__1", "T__2", "T__3", "SELECT", "FROM", "AS", "ALL", "WHEN", + "THEN", "ANY", "DISTINCT", "WHERE", "GROUP", "BY", "GROUPING", "SETS", + "ORDER", "HAVING", "LIMIT", "OR", "AND", "IN", "NOT", "NO", "EXISTS", "BETWEEN", "LIKE", "RLIKE", "IS", "NULL", "TRUE", "FALSE", "LAST", "ASC", "DESC", "FOR", "INTEGER", "JOIN", "CROSS", "OUTER", "INNER", "LEFT", "RIGHT", "FULL", "NATURAL", "USING", "ON", "WITH", "TABLE", "INTO", "DESCRIBE", @@ -61,10 +61,10 @@ class SqlBaseLexer extends Lexer { }; private static final String[] _LITERAL_NAMES = { - null, "'('", "')'", "','", "'.'", "'\"'", "'SELECT'", "'FROM'", "'AS'", - "'ALL'", "'WHEN'", "'THEN'", "'ANY'", "'DISTINCT'", "'WHERE'", "'GROUP'", - "'BY'", "'GROUPING'", "'SETS'", "'ORDER'", "'HAVING'", "'LIMIT'", "'OR'", - "'AND'", "'IN'", "'NOT'", "'NO'", "'EXISTS'", "'BETWEEN'", "'LIKE'", "'RLIKE'", + null, "'('", "')'", "','", "'.'", "'SELECT'", "'FROM'", "'AS'", "'ALL'", + "'WHEN'", "'THEN'", "'ANY'", "'DISTINCT'", "'WHERE'", "'GROUP'", "'BY'", + "'GROUPING'", "'SETS'", "'ORDER'", "'HAVING'", "'LIMIT'", "'OR'", "'AND'", + "'IN'", "'NOT'", "'NO'", "'EXISTS'", "'BETWEEN'", "'LIKE'", "'RLIKE'", "'IS'", "'NULL'", "'TRUE'", "'FALSE'", "'LAST'", "'ASC'", "'DESC'", "'FOR'", "'INTEGER'", "'JOIN'", "'CROSS'", "'OUTER'", "'INNER'", "'LEFT'", "'RIGHT'", "'FULL'", "'NATURAL'", "'USING'", "'ON'", "'WITH'", "'TABLE'", "'INTO'", @@ -77,11 +77,11 @@ class SqlBaseLexer extends Lexer { "'-'", "'*'", "'/'", "'%'", "'||'" }; private static final String[] _SYMBOLIC_NAMES = { - null, null, null, null, null, null, "SELECT", "FROM", "AS", "ALL", "WHEN", - "THEN", "ANY", "DISTINCT", "WHERE", "GROUP", "BY", "GROUPING", "SETS", - "ORDER", "HAVING", "LIMIT", "OR", "AND", "IN", "NOT", "NO", "EXISTS", - "BETWEEN", "LIKE", "RLIKE", "IS", "NULL", "TRUE", "FALSE", "LAST", "ASC", - "DESC", "FOR", "INTEGER", "JOIN", "CROSS", "OUTER", "INNER", "LEFT", "RIGHT", + null, null, null, null, null, "SELECT", "FROM", "AS", "ALL", "WHEN", "THEN", + "ANY", "DISTINCT", "WHERE", "GROUP", "BY", "GROUPING", "SETS", "ORDER", + "HAVING", "LIMIT", "OR", "AND", "IN", "NOT", "NO", "EXISTS", "BETWEEN", + "LIKE", "RLIKE", "IS", "NULL", "TRUE", "FALSE", "LAST", "ASC", "DESC", + "FOR", "INTEGER", "JOIN", "CROSS", "OUTER", "INNER", "LEFT", "RIGHT", "FULL", "NATURAL", "USING", "ON", "WITH", "TABLE", "INTO", "DESCRIBE", "OPTION", "EXPLAIN", "ANALYZE", "FORMAT", "TYPE", "TEXT", "VERIFY", "GRAPHVIZ", "LOGICAL", "PHYSICAL", "SHOW", "TABLES", "COLUMNS", "COLUMN", "FUNCTIONS", @@ -147,7 +147,7 @@ class SqlBaseLexer extends Lexer { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2n\u038a\b\1\4\2\t"+ + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2m\u0386\b\1\4\2\t"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -159,298 +159,297 @@ class SqlBaseLexer extends Lexer { "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ - "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3"+ - "\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\n\3\n"+ - "\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r"+ - "\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17"+ - "\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\22\3\22\3\22\3\22"+ - "\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24"+ - "\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26"+ - "\3\26\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\32\3\32\3\32"+ - "\3\32\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35"+ - "\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37\3\37"+ - "\3\37\3\37\3 \3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#"+ - "\3#\3$\3$\3$\3$\3$\3%\3%\3%\3%\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3(\3(\3"+ - "(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3"+ - ",\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3\60"+ - "\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\61\3\62"+ - "\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\64\3\65"+ - "\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\66\3\67"+ - "\3\67\3\67\3\67\3\67\3\67\3\67\38\38\38\38\38\38\38\38\39\39\39\39\39"+ - "\39\39\39\3:\3:\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3=\3=\3="+ - "\3=\3=\3=\3=\3>\3>\3>\3>\3>\3>\3>\3>\3>\3?\3?\3?\3?\3?\3?\3?\3?\3@\3@"+ - "\3@\3@\3@\3@\3@\3@\3@\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3B\3C\3C\3C\3C"+ - "\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3E\3E\3E\3E\3E\3E\3E\3E\3E\3E\3F\3F"+ - "\3F\3G\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3I\3I\3J\3J\3J\3J"+ - "\3J\3J\3J\3J\3J\3K\3K\3K\3K\3K\3K\3K\3K\3K\3K\3L\3L\3L\3L\3L\3L\3L\3M"+ - "\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3N\3N\3N\3N\3O\3O\3O\3O\3P\3P\3P\3P\3P"+ - "\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3R\3R\3R\3R\3S\3S\3S\3S\3S\3S"+ - "\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3U\3V\3V\3V\3V\3V\3W\3W\3X\3X"+ - "\3X\3X\3X\3X\3X\5X\u02d7\nX\3Y\3Y\3Z\3Z\3Z\3[\3[\3\\\3\\\3\\\3]\3]\3^"+ - "\3^\3_\3_\3`\3`\3a\3a\3b\3b\3b\3c\3c\3c\3c\7c\u02f4\nc\fc\16c\u02f7\13"+ - "c\3c\3c\3d\6d\u02fc\nd\rd\16d\u02fd\3e\6e\u0301\ne\re\16e\u0302\3e\3e"+ - "\7e\u0307\ne\fe\16e\u030a\13e\3e\3e\6e\u030e\ne\re\16e\u030f\3e\6e\u0313"+ - "\ne\re\16e\u0314\3e\3e\7e\u0319\ne\fe\16e\u031c\13e\5e\u031e\ne\3e\3e"+ - "\3e\3e\6e\u0324\ne\re\16e\u0325\3e\3e\5e\u032a\ne\3f\3f\5f\u032e\nf\3"+ - "f\3f\3f\7f\u0333\nf\ff\16f\u0336\13f\3g\3g\3g\3g\6g\u033c\ng\rg\16g\u033d"+ - "\3h\3h\3h\7h\u0343\nh\fh\16h\u0346\13h\3h\3h\3i\3i\3i\3i\7i\u034e\ni\f"+ - "i\16i\u0351\13i\3i\3i\3j\3j\5j\u0357\nj\3j\6j\u035a\nj\rj\16j\u035b\3"+ - "k\3k\3l\3l\3m\3m\3m\3m\7m\u0366\nm\fm\16m\u0369\13m\3m\5m\u036c\nm\3m"+ - "\5m\u036f\nm\3m\3m\3n\3n\3n\3n\3n\7n\u0378\nn\fn\16n\u037b\13n\3n\3n\3"+ - "n\3n\3n\3o\6o\u0383\no\ro\16o\u0384\3o\3o\3p\3p\3\u0379\2q\3\3\5\4\7\5"+ - "\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23"+ - "%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G"+ - "%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{"+ - "?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091"+ - "J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5"+ - "T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9"+ - "^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cd"+ - "h\u00cfi\u00d1j\u00d3\2\u00d5\2\u00d7\2\u00d9k\u00dbl\u00ddm\u00dfn\3"+ - "\2\13\3\2))\5\2<\3\2\2\2\u0170\u0171\7K\2\2\u0171"+ - "\u0172\7U\2\2\u0172@\3\2\2\2\u0173\u0174\7P\2\2\u0174\u0175\7W\2\2\u0175"+ - "\u0176\7N\2\2\u0176\u0177\7N\2\2\u0177B\3\2\2\2\u0178\u0179\7V\2\2\u0179"+ - "\u017a\7T\2\2\u017a\u017b\7W\2\2\u017b\u017c\7G\2\2\u017cD\3\2\2\2\u017d"+ - "\u017e\7H\2\2\u017e\u017f\7C\2\2\u017f\u0180\7N\2\2\u0180\u0181\7U\2\2"+ - "\u0181\u0182\7G\2\2\u0182F\3\2\2\2\u0183\u0184\7N\2\2\u0184\u0185\7C\2"+ - "\2\u0185\u0186\7U\2\2\u0186\u0187\7V\2\2\u0187H\3\2\2\2\u0188\u0189\7"+ - "C\2\2\u0189\u018a\7U\2\2\u018a\u018b\7E\2\2\u018bJ\3\2\2\2\u018c\u018d"+ - "\7F\2\2\u018d\u018e\7G\2\2\u018e\u018f\7U\2\2\u018f\u0190\7E\2\2\u0190"+ - "L\3\2\2\2\u0191\u0192\7H\2\2\u0192\u0193\7Q\2\2\u0193\u0194\7T\2\2\u0194"+ - "N\3\2\2\2\u0195\u0196\7K\2\2\u0196\u0197\7P\2\2\u0197\u0198\7V\2\2\u0198"+ - "\u0199\7G\2\2\u0199\u019a\7I\2\2\u019a\u019b\7G\2\2\u019b\u019c\7T\2\2"+ - "\u019cP\3\2\2\2\u019d\u019e\7L\2\2\u019e\u019f\7Q\2\2\u019f\u01a0\7K\2"+ - "\2\u01a0\u01a1\7P\2\2\u01a1R\3\2\2\2\u01a2\u01a3\7E\2\2\u01a3\u01a4\7"+ - "T\2\2\u01a4\u01a5\7Q\2\2\u01a5\u01a6\7U\2\2\u01a6\u01a7\7U\2\2\u01a7T"+ - "\3\2\2\2\u01a8\u01a9\7Q\2\2\u01a9\u01aa\7W\2\2\u01aa\u01ab\7V\2\2\u01ab"+ - "\u01ac\7G\2\2\u01ac\u01ad\7T\2\2\u01adV\3\2\2\2\u01ae\u01af\7K\2\2\u01af"+ - "\u01b0\7P\2\2\u01b0\u01b1\7P\2\2\u01b1\u01b2\7G\2\2\u01b2\u01b3\7T\2\2"+ - "\u01b3X\3\2\2\2\u01b4\u01b5\7N\2\2\u01b5\u01b6\7G\2\2\u01b6\u01b7\7H\2"+ - "\2\u01b7\u01b8\7V\2\2\u01b8Z\3\2\2\2\u01b9\u01ba\7T\2\2\u01ba\u01bb\7"+ - "K\2\2\u01bb\u01bc\7I\2\2\u01bc\u01bd\7J\2\2\u01bd\u01be\7V\2\2\u01be\\"+ - "\3\2\2\2\u01bf\u01c0\7H\2\2\u01c0\u01c1\7W\2\2\u01c1\u01c2\7N\2\2\u01c2"+ - "\u01c3\7N\2\2\u01c3^\3\2\2\2\u01c4\u01c5\7P\2\2\u01c5\u01c6\7C\2\2\u01c6"+ - "\u01c7\7V\2\2\u01c7\u01c8\7W\2\2\u01c8\u01c9\7T\2\2\u01c9\u01ca\7C\2\2"+ - "\u01ca\u01cb\7N\2\2\u01cb`\3\2\2\2\u01cc\u01cd\7W\2\2\u01cd\u01ce\7U\2"+ - "\2\u01ce\u01cf\7K\2\2\u01cf\u01d0\7P\2\2\u01d0\u01d1\7I\2\2\u01d1b\3\2"+ - "\2\2\u01d2\u01d3\7Q\2\2\u01d3\u01d4\7P\2\2\u01d4d\3\2\2\2\u01d5\u01d6"+ - "\7Y\2\2\u01d6\u01d7\7K\2\2\u01d7\u01d8\7V\2\2\u01d8\u01d9\7J\2\2\u01d9"+ - "f\3\2\2\2\u01da\u01db\7V\2\2\u01db\u01dc\7C\2\2\u01dc\u01dd\7D\2\2\u01dd"+ - "\u01de\7N\2\2\u01de\u01df\7G\2\2\u01dfh\3\2\2\2\u01e0\u01e1\7K\2\2\u01e1"+ - "\u01e2\7P\2\2\u01e2\u01e3\7V\2\2\u01e3\u01e4\7Q\2\2\u01e4j\3\2\2\2\u01e5"+ - "\u01e6\7F\2\2\u01e6\u01e7\7G\2\2\u01e7\u01e8\7U\2\2\u01e8\u01e9\7E\2\2"+ - "\u01e9\u01ea\7T\2\2\u01ea\u01eb\7K\2\2\u01eb\u01ec\7D\2\2\u01ec\u01ed"+ - "\7G\2\2\u01edl\3\2\2\2\u01ee\u01ef\7Q\2\2\u01ef\u01f0\7R\2\2\u01f0\u01f1"+ - "\7V\2\2\u01f1\u01f2\7K\2\2\u01f2\u01f3\7Q\2\2\u01f3\u01f4\7P\2\2\u01f4"+ - "n\3\2\2\2\u01f5\u01f6\7G\2\2\u01f6\u01f7\7Z\2\2\u01f7\u01f8\7R\2\2\u01f8"+ - "\u01f9\7N\2\2\u01f9\u01fa\7C\2\2\u01fa\u01fb\7K\2\2\u01fb\u01fc\7P\2\2"+ - "\u01fcp\3\2\2\2\u01fd\u01fe\7C\2\2\u01fe\u01ff\7P\2\2\u01ff\u0200\7C\2"+ - "\2\u0200\u0201\7N\2\2\u0201\u0202\7[\2\2\u0202\u0203\7\\\2\2\u0203\u0204"+ - "\7G\2\2\u0204r\3\2\2\2\u0205\u0206\7H\2\2\u0206\u0207\7Q\2\2\u0207\u0208"+ - "\7T\2\2\u0208\u0209\7O\2\2\u0209\u020a\7C\2\2\u020a\u020b\7V\2\2\u020b"+ - "t\3\2\2\2\u020c\u020d\7V\2\2\u020d\u020e\7[\2\2\u020e\u020f\7R\2\2\u020f"+ - "\u0210\7G\2\2\u0210v\3\2\2\2\u0211\u0212\7V\2\2\u0212\u0213\7G\2\2\u0213"+ - "\u0214\7Z\2\2\u0214\u0215\7V\2\2\u0215x\3\2\2\2\u0216\u0217\7X\2\2\u0217"+ - "\u0218\7G\2\2\u0218\u0219\7T\2\2\u0219\u021a\7K\2\2\u021a\u021b\7H\2\2"+ - "\u021b\u021c\7[\2\2\u021cz\3\2\2\2\u021d\u021e\7I\2\2\u021e\u021f\7T\2"+ - "\2\u021f\u0220\7C\2\2\u0220\u0221\7R\2\2\u0221\u0222\7J\2\2\u0222\u0223"+ - "\7X\2\2\u0223\u0224\7K\2\2\u0224\u0225\7\\\2\2\u0225|\3\2\2\2\u0226\u0227"+ - "\7N\2\2\u0227\u0228\7Q\2\2\u0228\u0229\7I\2\2\u0229\u022a\7K\2\2\u022a"+ - "\u022b\7E\2\2\u022b\u022c\7C\2\2\u022c\u022d\7N\2\2\u022d~\3\2\2\2\u022e"+ - "\u022f\7R\2\2\u022f\u0230\7J\2\2\u0230\u0231\7[\2\2\u0231\u0232\7U\2\2"+ - "\u0232\u0233\7K\2\2\u0233\u0234\7E\2\2\u0234\u0235\7C\2\2\u0235\u0236"+ - "\7N\2\2\u0236\u0080\3\2\2\2\u0237\u0238\7U\2\2\u0238\u0239\7J\2\2\u0239"+ - "\u023a\7Q\2\2\u023a\u023b\7Y\2\2\u023b\u0082\3\2\2\2\u023c\u023d\7V\2"+ - "\2\u023d\u023e\7C\2\2\u023e\u023f\7D\2\2\u023f\u0240\7N\2\2\u0240\u0241"+ - "\7G\2\2\u0241\u0242\7U\2\2\u0242\u0084\3\2\2\2\u0243\u0244\7E\2\2\u0244"+ - "\u0245\7Q\2\2\u0245\u0246\7N\2\2\u0246\u0247\7W\2\2\u0247\u0248\7O\2\2"+ - "\u0248\u0249\7P\2\2\u0249\u024a\7U\2\2\u024a\u0086\3\2\2\2\u024b\u024c"+ - "\7E\2\2\u024c\u024d\7Q\2\2\u024d\u024e\7N\2\2\u024e\u024f\7W\2\2\u024f"+ - "\u0250\7O\2\2\u0250\u0251\7P\2\2\u0251\u0088\3\2\2\2\u0252\u0253\7H\2"+ - "\2\u0253\u0254\7W\2\2\u0254\u0255\7P\2\2\u0255\u0256\7E\2\2\u0256\u0257"+ - "\7V\2\2\u0257\u0258\7K\2\2\u0258\u0259\7Q\2\2\u0259\u025a\7P\2\2\u025a"+ - "\u025b\7U\2\2\u025b\u008a\3\2\2\2\u025c\u025d\7V\2\2\u025d\u025e\7Q\2"+ - "\2\u025e\u008c\3\2\2\2\u025f\u0260\7F\2\2\u0260\u0261\7G\2\2\u0261\u0262"+ - "\7D\2\2\u0262\u0263\7W\2\2\u0263\u0264\7I\2\2\u0264\u008e\3\2\2\2\u0265"+ - "\u0266\7R\2\2\u0266\u0267\7N\2\2\u0267\u0268\7C\2\2\u0268\u0269\7P\2\2"+ - "\u0269\u0090\3\2\2\2\u026a\u026b\7R\2\2\u026b\u026c\7C\2\2\u026c\u026d"+ - "\7T\2\2\u026d\u026e\7U\2\2\u026e\u026f\7G\2\2\u026f\u0270\7F\2\2\u0270"+ - "\u0092\3\2\2\2\u0271\u0272\7C\2\2\u0272\u0273\7P\2\2\u0273\u0274\7C\2"+ - "\2\u0274\u0275\7N\2\2\u0275\u0276\7[\2\2\u0276\u0277\7\\\2\2\u0277\u0278"+ - "\7G\2\2\u0278\u0279\7F\2\2\u0279\u0094\3\2\2\2\u027a\u027b\7Q\2\2\u027b"+ - "\u027c\7R\2\2\u027c\u027d\7V\2\2\u027d\u027e\7K\2\2\u027e\u027f\7O\2\2"+ - "\u027f\u0280\7K\2\2\u0280\u0281\7\\\2\2\u0281\u0282\7G\2\2\u0282\u0283"+ - "\7F\2\2\u0283\u0096\3\2\2\2\u0284\u0285\7O\2\2\u0285\u0286\7C\2\2\u0286"+ - "\u0287\7R\2\2\u0287\u0288\7R\2\2\u0288\u0289\7G\2\2\u0289\u028a\7F\2\2"+ - "\u028a\u0098\3\2\2\2\u028b\u028c\7G\2\2\u028c\u028d\7Z\2\2\u028d\u028e"+ - "\7G\2\2\u028e\u028f\7E\2\2\u028f\u0290\7W\2\2\u0290\u0291\7V\2\2\u0291"+ - "\u0292\7C\2\2\u0292\u0293\7D\2\2\u0293\u0294\7N\2\2\u0294\u0295\7G\2\2"+ - "\u0295\u009a\3\2\2\2\u0296\u0297\7W\2\2\u0297\u0298\7U\2\2\u0298\u0299"+ - "\7G\2\2\u0299\u009c\3\2\2\2\u029a\u029b\7U\2\2\u029b\u029c\7G\2\2\u029c"+ - "\u029d\7V\2\2\u029d\u009e\3\2\2\2\u029e\u029f\7T\2\2\u029f\u02a0\7G\2"+ - "\2\u02a0\u02a1\7U\2\2\u02a1\u02a2\7G\2\2\u02a2\u02a3\7V\2\2\u02a3\u00a0"+ - "\3\2\2\2\u02a4\u02a5\7U\2\2\u02a5\u02a6\7G\2\2\u02a6\u02a7\7U\2\2\u02a7"+ - "\u02a8\7U\2\2\u02a8\u02a9\7K\2\2\u02a9\u02aa\7Q\2\2\u02aa\u02ab\7P\2\2"+ - "\u02ab\u00a2\3\2\2\2\u02ac\u02ad\7U\2\2\u02ad\u02ae\7E\2\2\u02ae\u02af"+ - "\7J\2\2\u02af\u02b0\7G\2\2\u02b0\u02b1\7O\2\2\u02b1\u02b2\7C\2\2\u02b2"+ - "\u02b3\7U\2\2\u02b3\u00a4\3\2\2\2\u02b4\u02b5\7G\2\2\u02b5\u02b6\7Z\2"+ - "\2\u02b6\u02b7\7V\2\2\u02b7\u02b8\7T\2\2\u02b8\u02b9\7C\2\2\u02b9\u02ba"+ - "\7E\2\2\u02ba\u02bb\7V\2\2\u02bb\u00a6\3\2\2\2\u02bc\u02bd\7S\2\2\u02bd"+ - "\u02be\7W\2\2\u02be\u02bf\7G\2\2\u02bf\u02c0\7T\2\2\u02c0\u02c1\7[\2\2"+ - "\u02c1\u00a8\3\2\2\2\u02c2\u02c3\7O\2\2\u02c3\u02c4\7C\2\2\u02c4\u02c5"+ - "\7V\2\2\u02c5\u02c6\7E\2\2\u02c6\u02c7\7J\2\2\u02c7\u00aa\3\2\2\2\u02c8"+ - "\u02c9\7E\2\2\u02c9\u02ca\7C\2\2\u02ca\u02cb\7U\2\2\u02cb\u02cc\7V\2\2"+ - "\u02cc\u00ac\3\2\2\2\u02cd\u02ce\7?\2\2\u02ce\u00ae\3\2\2\2\u02cf\u02d0"+ - "\7>\2\2\u02d0\u02d7\7@\2\2\u02d1\u02d2\7#\2\2\u02d2\u02d7\7?\2\2\u02d3"+ - "\u02d4\7>\2\2\u02d4\u02d5\7?\2\2\u02d5\u02d7\7@\2\2\u02d6\u02cf\3\2\2"+ - "\2\u02d6\u02d1\3\2\2\2\u02d6\u02d3\3\2\2\2\u02d7\u00b0\3\2\2\2\u02d8\u02d9"+ - "\7>\2\2\u02d9\u00b2\3\2\2\2\u02da\u02db\7>\2\2\u02db\u02dc\7?\2\2\u02dc"+ - "\u00b4\3\2\2\2\u02dd\u02de\7@\2\2\u02de\u00b6\3\2\2\2\u02df\u02e0\7@\2"+ - "\2\u02e0\u02e1\7?\2\2\u02e1\u00b8\3\2\2\2\u02e2\u02e3\7-\2\2\u02e3\u00ba"+ - "\3\2\2\2\u02e4\u02e5\7/\2\2\u02e5\u00bc\3\2\2\2\u02e6\u02e7\7,\2\2\u02e7"+ - "\u00be\3\2\2\2\u02e8\u02e9\7\61\2\2\u02e9\u00c0\3\2\2\2\u02ea\u02eb\7"+ - "\'\2\2\u02eb\u00c2\3\2\2\2\u02ec\u02ed\7~\2\2\u02ed\u02ee\7~\2\2\u02ee"+ - "\u00c4\3\2\2\2\u02ef\u02f5\7)\2\2\u02f0\u02f4\n\2\2\2\u02f1\u02f2\7)\2"+ - "\2\u02f2\u02f4\7)\2\2\u02f3\u02f0\3\2\2\2\u02f3\u02f1\3\2\2\2\u02f4\u02f7"+ - "\3\2\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6\u02f8\3\2\2\2\u02f7"+ - "\u02f5\3\2\2\2\u02f8\u02f9\7)\2\2\u02f9\u00c6\3\2\2\2\u02fa\u02fc\5\u00d5"+ - "k\2\u02fb\u02fa\3\2\2\2\u02fc\u02fd\3\2\2\2\u02fd\u02fb\3\2\2\2\u02fd"+ - "\u02fe\3\2\2\2\u02fe\u00c8\3\2\2\2\u02ff\u0301\5\u00d5k\2\u0300\u02ff"+ - "\3\2\2\2\u0301\u0302\3\2\2\2\u0302\u0300\3\2\2\2\u0302\u0303\3\2\2\2\u0303"+ - "\u0304\3\2\2\2\u0304\u0308\7\60\2\2\u0305\u0307\5\u00d5k\2\u0306\u0305"+ - "\3\2\2\2\u0307\u030a\3\2\2\2\u0308\u0306\3\2\2\2\u0308\u0309\3\2\2\2\u0309"+ - "\u032a\3\2\2\2\u030a\u0308\3\2\2\2\u030b\u030d\7\60\2\2\u030c\u030e\5"+ - "\u00d5k\2\u030d\u030c\3\2\2\2\u030e\u030f\3\2\2\2\u030f\u030d\3\2\2\2"+ - "\u030f\u0310\3\2\2\2\u0310\u032a\3\2\2\2\u0311\u0313\5\u00d5k\2\u0312"+ - "\u0311\3\2\2\2\u0313\u0314\3\2\2\2\u0314\u0312\3\2\2\2\u0314\u0315\3\2"+ - "\2\2\u0315\u031d\3\2\2\2\u0316\u031a\7\60\2\2\u0317\u0319\5\u00d5k\2\u0318"+ - "\u0317\3\2\2\2\u0319\u031c\3\2\2\2\u031a\u0318\3\2\2\2\u031a\u031b\3\2"+ - "\2\2\u031b\u031e\3\2\2\2\u031c\u031a\3\2\2\2\u031d\u0316\3\2\2\2\u031d"+ - "\u031e\3\2\2\2\u031e\u031f\3\2\2\2\u031f\u0320\5\u00d3j\2\u0320\u032a"+ - "\3\2\2\2\u0321\u0323\7\60\2\2\u0322\u0324\5\u00d5k\2\u0323\u0322\3\2\2"+ - "\2\u0324\u0325\3\2\2\2\u0325\u0323\3\2\2\2\u0325\u0326\3\2\2\2\u0326\u0327"+ - "\3\2\2\2\u0327\u0328\5\u00d3j\2\u0328\u032a\3\2\2\2\u0329\u0300\3\2\2"+ - "\2\u0329\u030b\3\2\2\2\u0329\u0312\3\2\2\2\u0329\u0321\3\2\2\2\u032a\u00ca"+ - "\3\2\2\2\u032b\u032e\5\u00d7l\2\u032c\u032e\7a\2\2\u032d\u032b\3\2\2\2"+ - "\u032d\u032c\3\2\2\2\u032e\u0334\3\2\2\2\u032f\u0333\5\u00d7l\2\u0330"+ - "\u0333\5\u00d5k\2\u0331\u0333\t\3\2\2\u0332\u032f\3\2\2\2\u0332\u0330"+ - "\3\2\2\2\u0332\u0331\3\2\2\2\u0333\u0336\3\2\2\2\u0334\u0332\3\2\2\2\u0334"+ - "\u0335\3\2\2\2\u0335\u00cc\3\2\2\2\u0336\u0334\3\2\2\2\u0337\u033b\5\u00d5"+ - "k\2\u0338\u033c\5\u00d7l\2\u0339\u033c\5\u00d5k\2\u033a\u033c\t\3\2\2"+ - "\u033b\u0338\3\2\2\2\u033b\u0339\3\2\2\2\u033b\u033a\3\2\2\2\u033c\u033d"+ - "\3\2\2\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u00ce\3\2\2\2\u033f"+ - "\u0344\7$\2\2\u0340\u0343\n\4\2\2\u0341\u0343\7$\2\2\u0342\u0340\3\2\2"+ - "\2\u0342\u0341\3\2\2\2\u0343\u0346\3\2\2\2\u0344\u0342\3\2\2\2\u0344\u0345"+ - "\3\2\2\2\u0345\u0347\3\2\2\2\u0346\u0344\3\2\2\2\u0347\u0348\7$\2\2\u0348"+ - "\u00d0\3\2\2\2\u0349\u034f\7b\2\2\u034a\u034e\n\5\2\2\u034b\u034c\7b\2"+ - "\2\u034c\u034e\7b\2\2\u034d\u034a\3\2\2\2\u034d\u034b\3\2\2\2\u034e\u0351"+ - "\3\2\2\2\u034f\u034d\3\2\2\2\u034f\u0350\3\2\2\2\u0350\u0352\3\2\2\2\u0351"+ - "\u034f\3\2\2\2\u0352\u0353\7b\2\2\u0353\u00d2\3\2\2\2\u0354\u0356\7G\2"+ - "\2\u0355\u0357\t\6\2\2\u0356\u0355\3\2\2\2\u0356\u0357\3\2\2\2\u0357\u0359"+ - "\3\2\2\2\u0358\u035a\5\u00d5k\2\u0359\u0358\3\2\2\2\u035a\u035b\3\2\2"+ - "\2\u035b\u0359\3\2\2\2\u035b\u035c\3\2\2\2\u035c\u00d4\3\2\2\2\u035d\u035e"+ - "\t\7\2\2\u035e\u00d6\3\2\2\2\u035f\u0360\t\b\2\2\u0360\u00d8\3\2\2\2\u0361"+ - "\u0362\7/\2\2\u0362\u0363\7/\2\2\u0363\u0367\3\2\2\2\u0364\u0366\n\t\2"+ - "\2\u0365\u0364\3\2\2\2\u0366\u0369\3\2\2\2\u0367\u0365\3\2\2\2\u0367\u0368"+ - "\3\2\2\2\u0368\u036b\3\2\2\2\u0369\u0367\3\2\2\2\u036a\u036c\7\17\2\2"+ - "\u036b\u036a\3\2\2\2\u036b\u036c\3\2\2\2\u036c\u036e\3\2\2\2\u036d\u036f"+ - "\7\f\2\2\u036e\u036d\3\2\2\2\u036e\u036f\3\2\2\2\u036f\u0370\3\2\2\2\u0370"+ - "\u0371\bm\2\2\u0371\u00da\3\2\2\2\u0372\u0373\7\61\2\2\u0373\u0374\7,"+ - "\2\2\u0374\u0379\3\2\2\2\u0375\u0378\5\u00dbn\2\u0376\u0378\13\2\2\2\u0377"+ - "\u0375\3\2\2\2\u0377\u0376\3\2\2\2\u0378\u037b\3\2\2\2\u0379\u037a\3\2"+ - "\2\2\u0379\u0377\3\2\2\2\u037a\u037c\3\2\2\2\u037b\u0379\3\2\2\2\u037c"+ - "\u037d\7,\2\2\u037d\u037e\7\61\2\2\u037e\u037f\3\2\2\2\u037f\u0380\bn"+ - "\2\2\u0380\u00dc\3\2\2\2\u0381\u0383\t\n\2\2\u0382\u0381\3\2\2\2\u0383"+ - "\u0384\3\2\2\2\u0384\u0382\3\2\2\2\u0384\u0385\3\2\2\2\u0385\u0386\3\2"+ - "\2\2\u0386\u0387\bo\2\2\u0387\u00de\3\2\2\2\u0388\u0389\13\2\2\2\u0389"+ - "\u00e0\3\2\2\2 \2\u02d6\u02f3\u02f5\u02fd\u0302\u0308\u030f\u0314\u031a"+ - "\u031d\u0325\u0329\u032d\u0332\u0334\u033b\u033d\u0342\u0344\u034d\u034f"+ - "\u0356\u035b\u0367\u036b\u036e\u0377\u0379\u0384\3\2\3\2"; + "k\4l\tl\4m\tm\4n\tn\4o\to\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\6"+ + "\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\n\3"+ + "\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3"+ + "\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3"+ + "\17\3\17\3\17\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3"+ + "\21\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3"+ + "\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3"+ + "\27\3\27\3\27\3\27\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3"+ + "\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3"+ + "\34\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3"+ + "\37\3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#"+ + "\3#\3$\3$\3$\3$\3%\3%\3%\3%\3%\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'"+ + "\3\'\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3"+ + "+\3+\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3"+ + "/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\62\3\62\3\62\3"+ + "\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\65\3"+ + "\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\66\3"+ + "\66\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\38\38\38\38\38\38\38\38\3"+ + "9\39\39\39\39\39\39\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3<\3"+ + "<\3=\3=\3=\3=\3=\3=\3=\3=\3=\3>\3>\3>\3>\3>\3>\3>\3>\3?\3?\3?\3?\3?\3"+ + "?\3?\3?\3?\3@\3@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3B\3B\3"+ + "B\3C\3C\3C\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3D\3D\3D\3E\3E\3E\3F\3F\3"+ + "F\3F\3F\3F\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3I\3I\3"+ + "I\3I\3J\3J\3J\3J\3J\3J\3J\3J\3J\3J\3K\3K\3K\3K\3K\3K\3K\3L\3L\3L\3L\3"+ + "L\3L\3L\3L\3L\3L\3L\3M\3M\3M\3M\3N\3N\3N\3N\3O\3O\3O\3O\3O\3O\3P\3P\3"+ + "P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3R\3R\3R\3R\3S\3"+ + "S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3V\3V\3W\3W\3W\3W\3W\3"+ + "W\3W\5W\u02d3\nW\3X\3X\3Y\3Y\3Y\3Z\3Z\3[\3[\3[\3\\\3\\\3]\3]\3^\3^\3_"+ + "\3_\3`\3`\3a\3a\3a\3b\3b\3b\3b\7b\u02f0\nb\fb\16b\u02f3\13b\3b\3b\3c\6"+ + "c\u02f8\nc\rc\16c\u02f9\3d\6d\u02fd\nd\rd\16d\u02fe\3d\3d\7d\u0303\nd"+ + "\fd\16d\u0306\13d\3d\3d\6d\u030a\nd\rd\16d\u030b\3d\6d\u030f\nd\rd\16"+ + "d\u0310\3d\3d\7d\u0315\nd\fd\16d\u0318\13d\5d\u031a\nd\3d\3d\3d\3d\6d"+ + "\u0320\nd\rd\16d\u0321\3d\3d\5d\u0326\nd\3e\3e\5e\u032a\ne\3e\3e\3e\7"+ + "e\u032f\ne\fe\16e\u0332\13e\3f\3f\3f\3f\6f\u0338\nf\rf\16f\u0339\3g\3"+ + "g\3g\7g\u033f\ng\fg\16g\u0342\13g\3g\3g\3h\3h\3h\3h\7h\u034a\nh\fh\16"+ + "h\u034d\13h\3h\3h\3i\3i\5i\u0353\ni\3i\6i\u0356\ni\ri\16i\u0357\3j\3j"+ + "\3k\3k\3l\3l\3l\3l\7l\u0362\nl\fl\16l\u0365\13l\3l\5l\u0368\nl\3l\5l\u036b"+ + "\nl\3l\3l\3m\3m\3m\3m\3m\7m\u0374\nm\fm\16m\u0377\13m\3m\3m\3m\3m\3m\3"+ + "n\6n\u037f\nn\rn\16n\u0380\3n\3n\3o\3o\3\u0375\2p\3\3\5\4\7\5\t\6\13\7"+ + "\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25"+ + ")\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O"+ + ")Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177A\u0081"+ + "B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093K\u0095"+ + "L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9"+ + "V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd"+ + "`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1"+ + "\2\u00d3\2\u00d5\2\u00d7j\u00d9k\u00dbl\u00ddm\3\2\13\3\2))\5\2<\3\2\2\2\u016f\u0170\7P\2\2\u0170\u0171\7W\2\2\u0171"+ + "\u0172\7N\2\2\u0172\u0173\7N\2\2\u0173@\3\2\2\2\u0174\u0175\7V\2\2\u0175"+ + "\u0176\7T\2\2\u0176\u0177\7W\2\2\u0177\u0178\7G\2\2\u0178B\3\2\2\2\u0179"+ + "\u017a\7H\2\2\u017a\u017b\7C\2\2\u017b\u017c\7N\2\2\u017c\u017d\7U\2\2"+ + "\u017d\u017e\7G\2\2\u017eD\3\2\2\2\u017f\u0180\7N\2\2\u0180\u0181\7C\2"+ + "\2\u0181\u0182\7U\2\2\u0182\u0183\7V\2\2\u0183F\3\2\2\2\u0184\u0185\7"+ + "C\2\2\u0185\u0186\7U\2\2\u0186\u0187\7E\2\2\u0187H\3\2\2\2\u0188\u0189"+ + "\7F\2\2\u0189\u018a\7G\2\2\u018a\u018b\7U\2\2\u018b\u018c\7E\2\2\u018c"+ + "J\3\2\2\2\u018d\u018e\7H\2\2\u018e\u018f\7Q\2\2\u018f\u0190\7T\2\2\u0190"+ + "L\3\2\2\2\u0191\u0192\7K\2\2\u0192\u0193\7P\2\2\u0193\u0194\7V\2\2\u0194"+ + "\u0195\7G\2\2\u0195\u0196\7I\2\2\u0196\u0197\7G\2\2\u0197\u0198\7T\2\2"+ + "\u0198N\3\2\2\2\u0199\u019a\7L\2\2\u019a\u019b\7Q\2\2\u019b\u019c\7K\2"+ + "\2\u019c\u019d\7P\2\2\u019dP\3\2\2\2\u019e\u019f\7E\2\2\u019f\u01a0\7"+ + "T\2\2\u01a0\u01a1\7Q\2\2\u01a1\u01a2\7U\2\2\u01a2\u01a3\7U\2\2\u01a3R"+ + "\3\2\2\2\u01a4\u01a5\7Q\2\2\u01a5\u01a6\7W\2\2\u01a6\u01a7\7V\2\2\u01a7"+ + "\u01a8\7G\2\2\u01a8\u01a9\7T\2\2\u01a9T\3\2\2\2\u01aa\u01ab\7K\2\2\u01ab"+ + "\u01ac\7P\2\2\u01ac\u01ad\7P\2\2\u01ad\u01ae\7G\2\2\u01ae\u01af\7T\2\2"+ + "\u01afV\3\2\2\2\u01b0\u01b1\7N\2\2\u01b1\u01b2\7G\2\2\u01b2\u01b3\7H\2"+ + "\2\u01b3\u01b4\7V\2\2\u01b4X\3\2\2\2\u01b5\u01b6\7T\2\2\u01b6\u01b7\7"+ + "K\2\2\u01b7\u01b8\7I\2\2\u01b8\u01b9\7J\2\2\u01b9\u01ba\7V\2\2\u01baZ"+ + "\3\2\2\2\u01bb\u01bc\7H\2\2\u01bc\u01bd\7W\2\2\u01bd\u01be\7N\2\2\u01be"+ + "\u01bf\7N\2\2\u01bf\\\3\2\2\2\u01c0\u01c1\7P\2\2\u01c1\u01c2\7C\2\2\u01c2"+ + "\u01c3\7V\2\2\u01c3\u01c4\7W\2\2\u01c4\u01c5\7T\2\2\u01c5\u01c6\7C\2\2"+ + "\u01c6\u01c7\7N\2\2\u01c7^\3\2\2\2\u01c8\u01c9\7W\2\2\u01c9\u01ca\7U\2"+ + "\2\u01ca\u01cb\7K\2\2\u01cb\u01cc\7P\2\2\u01cc\u01cd\7I\2\2\u01cd`\3\2"+ + "\2\2\u01ce\u01cf\7Q\2\2\u01cf\u01d0\7P\2\2\u01d0b\3\2\2\2\u01d1\u01d2"+ + "\7Y\2\2\u01d2\u01d3\7K\2\2\u01d3\u01d4\7V\2\2\u01d4\u01d5\7J\2\2\u01d5"+ + "d\3\2\2\2\u01d6\u01d7\7V\2\2\u01d7\u01d8\7C\2\2\u01d8\u01d9\7D\2\2\u01d9"+ + "\u01da\7N\2\2\u01da\u01db\7G\2\2\u01dbf\3\2\2\2\u01dc\u01dd\7K\2\2\u01dd"+ + "\u01de\7P\2\2\u01de\u01df\7V\2\2\u01df\u01e0\7Q\2\2\u01e0h\3\2\2\2\u01e1"+ + "\u01e2\7F\2\2\u01e2\u01e3\7G\2\2\u01e3\u01e4\7U\2\2\u01e4\u01e5\7E\2\2"+ + "\u01e5\u01e6\7T\2\2\u01e6\u01e7\7K\2\2\u01e7\u01e8\7D\2\2\u01e8\u01e9"+ + "\7G\2\2\u01e9j\3\2\2\2\u01ea\u01eb\7Q\2\2\u01eb\u01ec\7R\2\2\u01ec\u01ed"+ + "\7V\2\2\u01ed\u01ee\7K\2\2\u01ee\u01ef\7Q\2\2\u01ef\u01f0\7P\2\2\u01f0"+ + "l\3\2\2\2\u01f1\u01f2\7G\2\2\u01f2\u01f3\7Z\2\2\u01f3\u01f4\7R\2\2\u01f4"+ + "\u01f5\7N\2\2\u01f5\u01f6\7C\2\2\u01f6\u01f7\7K\2\2\u01f7\u01f8\7P\2\2"+ + "\u01f8n\3\2\2\2\u01f9\u01fa\7C\2\2\u01fa\u01fb\7P\2\2\u01fb\u01fc\7C\2"+ + "\2\u01fc\u01fd\7N\2\2\u01fd\u01fe\7[\2\2\u01fe\u01ff\7\\\2\2\u01ff\u0200"+ + "\7G\2\2\u0200p\3\2\2\2\u0201\u0202\7H\2\2\u0202\u0203\7Q\2\2\u0203\u0204"+ + "\7T\2\2\u0204\u0205\7O\2\2\u0205\u0206\7C\2\2\u0206\u0207\7V\2\2\u0207"+ + "r\3\2\2\2\u0208\u0209\7V\2\2\u0209\u020a\7[\2\2\u020a\u020b\7R\2\2\u020b"+ + "\u020c\7G\2\2\u020ct\3\2\2\2\u020d\u020e\7V\2\2\u020e\u020f\7G\2\2\u020f"+ + "\u0210\7Z\2\2\u0210\u0211\7V\2\2\u0211v\3\2\2\2\u0212\u0213\7X\2\2\u0213"+ + "\u0214\7G\2\2\u0214\u0215\7T\2\2\u0215\u0216\7K\2\2\u0216\u0217\7H\2\2"+ + "\u0217\u0218\7[\2\2\u0218x\3\2\2\2\u0219\u021a\7I\2\2\u021a\u021b\7T\2"+ + "\2\u021b\u021c\7C\2\2\u021c\u021d\7R\2\2\u021d\u021e\7J\2\2\u021e\u021f"+ + "\7X\2\2\u021f\u0220\7K\2\2\u0220\u0221\7\\\2\2\u0221z\3\2\2\2\u0222\u0223"+ + "\7N\2\2\u0223\u0224\7Q\2\2\u0224\u0225\7I\2\2\u0225\u0226\7K\2\2\u0226"+ + "\u0227\7E\2\2\u0227\u0228\7C\2\2\u0228\u0229\7N\2\2\u0229|\3\2\2\2\u022a"+ + "\u022b\7R\2\2\u022b\u022c\7J\2\2\u022c\u022d\7[\2\2\u022d\u022e\7U\2\2"+ + "\u022e\u022f\7K\2\2\u022f\u0230\7E\2\2\u0230\u0231\7C\2\2\u0231\u0232"+ + "\7N\2\2\u0232~\3\2\2\2\u0233\u0234\7U\2\2\u0234\u0235\7J\2\2\u0235\u0236"+ + "\7Q\2\2\u0236\u0237\7Y\2\2\u0237\u0080\3\2\2\2\u0238\u0239\7V\2\2\u0239"+ + "\u023a\7C\2\2\u023a\u023b\7D\2\2\u023b\u023c\7N\2\2\u023c\u023d\7G\2\2"+ + "\u023d\u023e\7U\2\2\u023e\u0082\3\2\2\2\u023f\u0240\7E\2\2\u0240\u0241"+ + "\7Q\2\2\u0241\u0242\7N\2\2\u0242\u0243\7W\2\2\u0243\u0244\7O\2\2\u0244"+ + "\u0245\7P\2\2\u0245\u0246\7U\2\2\u0246\u0084\3\2\2\2\u0247\u0248\7E\2"+ + "\2\u0248\u0249\7Q\2\2\u0249\u024a\7N\2\2\u024a\u024b\7W\2\2\u024b\u024c"+ + "\7O\2\2\u024c\u024d\7P\2\2\u024d\u0086\3\2\2\2\u024e\u024f\7H\2\2\u024f"+ + "\u0250\7W\2\2\u0250\u0251\7P\2\2\u0251\u0252\7E\2\2\u0252\u0253\7V\2\2"+ + "\u0253\u0254\7K\2\2\u0254\u0255\7Q\2\2\u0255\u0256\7P\2\2\u0256\u0257"+ + "\7U\2\2\u0257\u0088\3\2\2\2\u0258\u0259\7V\2\2\u0259\u025a\7Q\2\2\u025a"+ + "\u008a\3\2\2\2\u025b\u025c\7F\2\2\u025c\u025d\7G\2\2\u025d\u025e\7D\2"+ + "\2\u025e\u025f\7W\2\2\u025f\u0260\7I\2\2\u0260\u008c\3\2\2\2\u0261\u0262"+ + "\7R\2\2\u0262\u0263\7N\2\2\u0263\u0264\7C\2\2\u0264\u0265\7P\2\2\u0265"+ + "\u008e\3\2\2\2\u0266\u0267\7R\2\2\u0267\u0268\7C\2\2\u0268\u0269\7T\2"+ + "\2\u0269\u026a\7U\2\2\u026a\u026b\7G\2\2\u026b\u026c\7F\2\2\u026c\u0090"+ + "\3\2\2\2\u026d\u026e\7C\2\2\u026e\u026f\7P\2\2\u026f\u0270\7C\2\2\u0270"+ + "\u0271\7N\2\2\u0271\u0272\7[\2\2\u0272\u0273\7\\\2\2\u0273\u0274\7G\2"+ + "\2\u0274\u0275\7F\2\2\u0275\u0092\3\2\2\2\u0276\u0277\7Q\2\2\u0277\u0278"+ + "\7R\2\2\u0278\u0279\7V\2\2\u0279\u027a\7K\2\2\u027a\u027b\7O\2\2\u027b"+ + "\u027c\7K\2\2\u027c\u027d\7\\\2\2\u027d\u027e\7G\2\2\u027e\u027f\7F\2"+ + "\2\u027f\u0094\3\2\2\2\u0280\u0281\7O\2\2\u0281\u0282\7C\2\2\u0282\u0283"+ + "\7R\2\2\u0283\u0284\7R\2\2\u0284\u0285\7G\2\2\u0285\u0286\7F\2\2\u0286"+ + "\u0096\3\2\2\2\u0287\u0288\7G\2\2\u0288\u0289\7Z\2\2\u0289\u028a\7G\2"+ + "\2\u028a\u028b\7E\2\2\u028b\u028c\7W\2\2\u028c\u028d\7V\2\2\u028d\u028e"+ + "\7C\2\2\u028e\u028f\7D\2\2\u028f\u0290\7N\2\2\u0290\u0291\7G\2\2\u0291"+ + "\u0098\3\2\2\2\u0292\u0293\7W\2\2\u0293\u0294\7U\2\2\u0294\u0295\7G\2"+ + "\2\u0295\u009a\3\2\2\2\u0296\u0297\7U\2\2\u0297\u0298\7G\2\2\u0298\u0299"+ + "\7V\2\2\u0299\u009c\3\2\2\2\u029a\u029b\7T\2\2\u029b\u029c\7G\2\2\u029c"+ + "\u029d\7U\2\2\u029d\u029e\7G\2\2\u029e\u029f\7V\2\2\u029f\u009e\3\2\2"+ + "\2\u02a0\u02a1\7U\2\2\u02a1\u02a2\7G\2\2\u02a2\u02a3\7U\2\2\u02a3\u02a4"+ + "\7U\2\2\u02a4\u02a5\7K\2\2\u02a5\u02a6\7Q\2\2\u02a6\u02a7\7P\2\2\u02a7"+ + "\u00a0\3\2\2\2\u02a8\u02a9\7U\2\2\u02a9\u02aa\7E\2\2\u02aa\u02ab\7J\2"+ + "\2\u02ab\u02ac\7G\2\2\u02ac\u02ad\7O\2\2\u02ad\u02ae\7C\2\2\u02ae\u02af"+ + "\7U\2\2\u02af\u00a2\3\2\2\2\u02b0\u02b1\7G\2\2\u02b1\u02b2\7Z\2\2\u02b2"+ + "\u02b3\7V\2\2\u02b3\u02b4\7T\2\2\u02b4\u02b5\7C\2\2\u02b5\u02b6\7E\2\2"+ + "\u02b6\u02b7\7V\2\2\u02b7\u00a4\3\2\2\2\u02b8\u02b9\7S\2\2\u02b9\u02ba"+ + "\7W\2\2\u02ba\u02bb\7G\2\2\u02bb\u02bc\7T\2\2\u02bc\u02bd\7[\2\2\u02bd"+ + "\u00a6\3\2\2\2\u02be\u02bf\7O\2\2\u02bf\u02c0\7C\2\2\u02c0\u02c1\7V\2"+ + "\2\u02c1\u02c2\7E\2\2\u02c2\u02c3\7J\2\2\u02c3\u00a8\3\2\2\2\u02c4\u02c5"+ + "\7E\2\2\u02c5\u02c6\7C\2\2\u02c6\u02c7\7U\2\2\u02c7\u02c8\7V\2\2\u02c8"+ + "\u00aa\3\2\2\2\u02c9\u02ca\7?\2\2\u02ca\u00ac\3\2\2\2\u02cb\u02cc\7>\2"+ + "\2\u02cc\u02d3\7@\2\2\u02cd\u02ce\7#\2\2\u02ce\u02d3\7?\2\2\u02cf\u02d0"+ + "\7>\2\2\u02d0\u02d1\7?\2\2\u02d1\u02d3\7@\2\2\u02d2\u02cb\3\2\2\2\u02d2"+ + "\u02cd\3\2\2\2\u02d2\u02cf\3\2\2\2\u02d3\u00ae\3\2\2\2\u02d4\u02d5\7>"+ + "\2\2\u02d5\u00b0\3\2\2\2\u02d6\u02d7\7>\2\2\u02d7\u02d8\7?\2\2\u02d8\u00b2"+ + "\3\2\2\2\u02d9\u02da\7@\2\2\u02da\u00b4\3\2\2\2\u02db\u02dc\7@\2\2\u02dc"+ + "\u02dd\7?\2\2\u02dd\u00b6\3\2\2\2\u02de\u02df\7-\2\2\u02df\u00b8\3\2\2"+ + "\2\u02e0\u02e1\7/\2\2\u02e1\u00ba\3\2\2\2\u02e2\u02e3\7,\2\2\u02e3\u00bc"+ + "\3\2\2\2\u02e4\u02e5\7\61\2\2\u02e5\u00be\3\2\2\2\u02e6\u02e7\7\'\2\2"+ + "\u02e7\u00c0\3\2\2\2\u02e8\u02e9\7~\2\2\u02e9\u02ea\7~\2\2\u02ea\u00c2"+ + "\3\2\2\2\u02eb\u02f1\7)\2\2\u02ec\u02f0\n\2\2\2\u02ed\u02ee\7)\2\2\u02ee"+ + "\u02f0\7)\2\2\u02ef\u02ec\3\2\2\2\u02ef\u02ed\3\2\2\2\u02f0\u02f3\3\2"+ + "\2\2\u02f1\u02ef\3\2\2\2\u02f1\u02f2\3\2\2\2\u02f2\u02f4\3\2\2\2\u02f3"+ + "\u02f1\3\2\2\2\u02f4\u02f5\7)\2\2\u02f5\u00c4\3\2\2\2\u02f6\u02f8\5\u00d3"+ + "j\2\u02f7\u02f6\3\2\2\2\u02f8\u02f9\3\2\2\2\u02f9\u02f7\3\2\2\2\u02f9"+ + "\u02fa\3\2\2\2\u02fa\u00c6\3\2\2\2\u02fb\u02fd\5\u00d3j\2\u02fc\u02fb"+ + "\3\2\2\2\u02fd\u02fe\3\2\2\2\u02fe\u02fc\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff"+ + "\u0300\3\2\2\2\u0300\u0304\7\60\2\2\u0301\u0303\5\u00d3j\2\u0302\u0301"+ + "\3\2\2\2\u0303\u0306\3\2\2\2\u0304\u0302\3\2\2\2\u0304\u0305\3\2\2\2\u0305"+ + "\u0326\3\2\2\2\u0306\u0304\3\2\2\2\u0307\u0309\7\60\2\2\u0308\u030a\5"+ + "\u00d3j\2\u0309\u0308\3\2\2\2\u030a\u030b\3\2\2\2\u030b\u0309\3\2\2\2"+ + "\u030b\u030c\3\2\2\2\u030c\u0326\3\2\2\2\u030d\u030f\5\u00d3j\2\u030e"+ + "\u030d\3\2\2\2\u030f\u0310\3\2\2\2\u0310\u030e\3\2\2\2\u0310\u0311\3\2"+ + "\2\2\u0311\u0319\3\2\2\2\u0312\u0316\7\60\2\2\u0313\u0315\5\u00d3j\2\u0314"+ + "\u0313\3\2\2\2\u0315\u0318\3\2\2\2\u0316\u0314\3\2\2\2\u0316\u0317\3\2"+ + "\2\2\u0317\u031a\3\2\2\2\u0318\u0316\3\2\2\2\u0319\u0312\3\2\2\2\u0319"+ + "\u031a\3\2\2\2\u031a\u031b\3\2\2\2\u031b\u031c\5\u00d1i\2\u031c\u0326"+ + "\3\2\2\2\u031d\u031f\7\60\2\2\u031e\u0320\5\u00d3j\2\u031f\u031e\3\2\2"+ + "\2\u0320\u0321\3\2\2\2\u0321\u031f\3\2\2\2\u0321\u0322\3\2\2\2\u0322\u0323"+ + "\3\2\2\2\u0323\u0324\5\u00d1i\2\u0324\u0326\3\2\2\2\u0325\u02fc\3\2\2"+ + "\2\u0325\u0307\3\2\2\2\u0325\u030e\3\2\2\2\u0325\u031d\3\2\2\2\u0326\u00c8"+ + "\3\2\2\2\u0327\u032a\5\u00d5k\2\u0328\u032a\7a\2\2\u0329\u0327\3\2\2\2"+ + "\u0329\u0328\3\2\2\2\u032a\u0330\3\2\2\2\u032b\u032f\5\u00d5k\2\u032c"+ + "\u032f\5\u00d3j\2\u032d\u032f\t\3\2\2\u032e\u032b\3\2\2\2\u032e\u032c"+ + "\3\2\2\2\u032e\u032d\3\2\2\2\u032f\u0332\3\2\2\2\u0330\u032e\3\2\2\2\u0330"+ + "\u0331\3\2\2\2\u0331\u00ca\3\2\2\2\u0332\u0330\3\2\2\2\u0333\u0337\5\u00d3"+ + "j\2\u0334\u0338\5\u00d5k\2\u0335\u0338\5\u00d3j\2\u0336\u0338\t\3\2\2"+ + "\u0337\u0334\3\2\2\2\u0337\u0335\3\2\2\2\u0337\u0336\3\2\2\2\u0338\u0339"+ + "\3\2\2\2\u0339\u0337\3\2\2\2\u0339\u033a\3\2\2\2\u033a\u00cc\3\2\2\2\u033b"+ + "\u0340\7$\2\2\u033c\u033f\n\4\2\2\u033d\u033f\7$\2\2\u033e\u033c\3\2\2"+ + "\2\u033e\u033d\3\2\2\2\u033f\u0342\3\2\2\2\u0340\u033e\3\2\2\2\u0340\u0341"+ + "\3\2\2\2\u0341\u0343\3\2\2\2\u0342\u0340\3\2\2\2\u0343\u0344\7$\2\2\u0344"+ + "\u00ce\3\2\2\2\u0345\u034b\7b\2\2\u0346\u034a\n\5\2\2\u0347\u0348\7b\2"+ + "\2\u0348\u034a\7b\2\2\u0349\u0346\3\2\2\2\u0349\u0347\3\2\2\2\u034a\u034d"+ + "\3\2\2\2\u034b\u0349\3\2\2\2\u034b\u034c\3\2\2\2\u034c\u034e\3\2\2\2\u034d"+ + "\u034b\3\2\2\2\u034e\u034f\7b\2\2\u034f\u00d0\3\2\2\2\u0350\u0352\7G\2"+ + "\2\u0351\u0353\t\6\2\2\u0352\u0351\3\2\2\2\u0352\u0353\3\2\2\2\u0353\u0355"+ + "\3\2\2\2\u0354\u0356\5\u00d3j\2\u0355\u0354\3\2\2\2\u0356\u0357\3\2\2"+ + "\2\u0357\u0355\3\2\2\2\u0357\u0358\3\2\2\2\u0358\u00d2\3\2\2\2\u0359\u035a"+ + "\t\7\2\2\u035a\u00d4\3\2\2\2\u035b\u035c\t\b\2\2\u035c\u00d6\3\2\2\2\u035d"+ + "\u035e\7/\2\2\u035e\u035f\7/\2\2\u035f\u0363\3\2\2\2\u0360\u0362\n\t\2"+ + "\2\u0361\u0360\3\2\2\2\u0362\u0365\3\2\2\2\u0363\u0361\3\2\2\2\u0363\u0364"+ + "\3\2\2\2\u0364\u0367\3\2\2\2\u0365\u0363\3\2\2\2\u0366\u0368\7\17\2\2"+ + "\u0367\u0366\3\2\2\2\u0367\u0368\3\2\2\2\u0368\u036a\3\2\2\2\u0369\u036b"+ + "\7\f\2\2\u036a\u0369\3\2\2\2\u036a\u036b\3\2\2\2\u036b\u036c\3\2\2\2\u036c"+ + "\u036d\bl\2\2\u036d\u00d8\3\2\2\2\u036e\u036f\7\61\2\2\u036f\u0370\7,"+ + "\2\2\u0370\u0375\3\2\2\2\u0371\u0374\5\u00d9m\2\u0372\u0374\13\2\2\2\u0373"+ + "\u0371\3\2\2\2\u0373\u0372\3\2\2\2\u0374\u0377\3\2\2\2\u0375\u0376\3\2"+ + "\2\2\u0375\u0373\3\2\2\2\u0376\u0378\3\2\2\2\u0377\u0375\3\2\2\2\u0378"+ + "\u0379\7,\2\2\u0379\u037a\7\61\2\2\u037a\u037b\3\2\2\2\u037b\u037c\bm"+ + "\2\2\u037c\u00da\3\2\2\2\u037d\u037f\t\n\2\2\u037e\u037d\3\2\2\2\u037f"+ + "\u0380\3\2\2\2\u0380\u037e\3\2\2\2\u0380\u0381\3\2\2\2\u0381\u0382\3\2"+ + "\2\2\u0382\u0383\bn\2\2\u0383\u00dc\3\2\2\2\u0384\u0385\13\2\2\2\u0385"+ + "\u00de\3\2\2\2 \2\u02d2\u02ef\u02f1\u02f9\u02fe\u0304\u030b\u0310\u0316"+ + "\u0319\u0321\u0325\u0329\u032e\u0330\u0337\u0339\u033e\u0340\u0349\u034b"+ + "\u0352\u0357\u0363\u0367\u036a\u0373\u0375\u0380\3\2\3\2"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java index 43c820d96e1..74e69636da7 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/parser/SqlBaseParser.java @@ -22,22 +22,22 @@ class SqlBaseParser extends Parser { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, SELECT=6, FROM=7, AS=8, ALL=9, - WHEN=10, THEN=11, ANY=12, DISTINCT=13, WHERE=14, GROUP=15, BY=16, GROUPING=17, - SETS=18, ORDER=19, HAVING=20, LIMIT=21, OR=22, AND=23, IN=24, NOT=25, - NO=26, EXISTS=27, BETWEEN=28, LIKE=29, RLIKE=30, IS=31, NULL=32, TRUE=33, - FALSE=34, LAST=35, ASC=36, DESC=37, FOR=38, INTEGER=39, JOIN=40, CROSS=41, - OUTER=42, INNER=43, LEFT=44, RIGHT=45, FULL=46, NATURAL=47, USING=48, - ON=49, WITH=50, TABLE=51, INTO=52, DESCRIBE=53, OPTION=54, EXPLAIN=55, - ANALYZE=56, FORMAT=57, TYPE=58, TEXT=59, VERIFY=60, GRAPHVIZ=61, LOGICAL=62, - PHYSICAL=63, SHOW=64, TABLES=65, COLUMNS=66, COLUMN=67, FUNCTIONS=68, - TO=69, DEBUG=70, PLAN=71, PARSED=72, ANALYZED=73, OPTIMIZED=74, MAPPED=75, - EXECUTABLE=76, USE=77, SET=78, RESET=79, SESSION=80, SCHEMAS=81, EXTRACT=82, - QUERY=83, MATCH=84, CAST=85, EQ=86, NEQ=87, LT=88, LTE=89, GT=90, GTE=91, - PLUS=92, MINUS=93, ASTERISK=94, SLASH=95, PERCENT=96, CONCAT=97, STRING=98, - INTEGER_VALUE=99, DECIMAL_VALUE=100, IDENTIFIER=101, DIGIT_IDENTIFIER=102, - QUOTED_IDENTIFIER=103, BACKQUOTED_IDENTIFIER=104, SIMPLE_COMMENT=105, - BRACKETED_COMMENT=106, WS=107, UNRECOGNIZED=108, DELIMITER=109; + T__0=1, T__1=2, T__2=3, T__3=4, SELECT=5, FROM=6, AS=7, ALL=8, WHEN=9, + THEN=10, ANY=11, DISTINCT=12, WHERE=13, GROUP=14, BY=15, GROUPING=16, + SETS=17, ORDER=18, HAVING=19, LIMIT=20, OR=21, AND=22, IN=23, NOT=24, + NO=25, EXISTS=26, BETWEEN=27, LIKE=28, RLIKE=29, IS=30, NULL=31, TRUE=32, + FALSE=33, LAST=34, ASC=35, DESC=36, FOR=37, INTEGER=38, JOIN=39, CROSS=40, + OUTER=41, INNER=42, LEFT=43, RIGHT=44, FULL=45, NATURAL=46, USING=47, + ON=48, WITH=49, TABLE=50, INTO=51, DESCRIBE=52, OPTION=53, EXPLAIN=54, + ANALYZE=55, FORMAT=56, TYPE=57, TEXT=58, VERIFY=59, GRAPHVIZ=60, LOGICAL=61, + PHYSICAL=62, SHOW=63, TABLES=64, COLUMNS=65, COLUMN=66, FUNCTIONS=67, + TO=68, DEBUG=69, PLAN=70, PARSED=71, ANALYZED=72, OPTIMIZED=73, MAPPED=74, + EXECUTABLE=75, USE=76, SET=77, RESET=78, SESSION=79, SCHEMAS=80, EXTRACT=81, + QUERY=82, MATCH=83, CAST=84, EQ=85, NEQ=86, LT=87, LTE=88, GT=89, GTE=90, + PLUS=91, MINUS=92, ASTERISK=93, SLASH=94, PERCENT=95, CONCAT=96, STRING=97, + INTEGER_VALUE=98, DECIMAL_VALUE=99, IDENTIFIER=100, DIGIT_IDENTIFIER=101, + QUOTED_IDENTIFIER=102, BACKQUOTED_IDENTIFIER=103, SIMPLE_COMMENT=104, + BRACKETED_COMMENT=105, WS=106, UNRECOGNIZED=107, DELIMITER=108; public static final int RULE_singleStatement = 0, RULE_singleExpression = 1, RULE_statement = 2, RULE_query = 3, RULE_queryNoWith = 4, RULE_queryTerm = 5, RULE_orderBy = 6, @@ -64,10 +64,10 @@ class SqlBaseParser extends Parser { }; private static final String[] _LITERAL_NAMES = { - null, "'('", "')'", "','", "'.'", "'\"'", "'SELECT'", "'FROM'", "'AS'", - "'ALL'", "'WHEN'", "'THEN'", "'ANY'", "'DISTINCT'", "'WHERE'", "'GROUP'", - "'BY'", "'GROUPING'", "'SETS'", "'ORDER'", "'HAVING'", "'LIMIT'", "'OR'", - "'AND'", "'IN'", "'NOT'", "'NO'", "'EXISTS'", "'BETWEEN'", "'LIKE'", "'RLIKE'", + null, "'('", "')'", "','", "'.'", "'SELECT'", "'FROM'", "'AS'", "'ALL'", + "'WHEN'", "'THEN'", "'ANY'", "'DISTINCT'", "'WHERE'", "'GROUP'", "'BY'", + "'GROUPING'", "'SETS'", "'ORDER'", "'HAVING'", "'LIMIT'", "'OR'", "'AND'", + "'IN'", "'NOT'", "'NO'", "'EXISTS'", "'BETWEEN'", "'LIKE'", "'RLIKE'", "'IS'", "'NULL'", "'TRUE'", "'FALSE'", "'LAST'", "'ASC'", "'DESC'", "'FOR'", "'INTEGER'", "'JOIN'", "'CROSS'", "'OUTER'", "'INNER'", "'LEFT'", "'RIGHT'", "'FULL'", "'NATURAL'", "'USING'", "'ON'", "'WITH'", "'TABLE'", "'INTO'", @@ -80,11 +80,11 @@ class SqlBaseParser extends Parser { "'-'", "'*'", "'/'", "'%'", "'||'" }; private static final String[] _SYMBOLIC_NAMES = { - null, null, null, null, null, null, "SELECT", "FROM", "AS", "ALL", "WHEN", - "THEN", "ANY", "DISTINCT", "WHERE", "GROUP", "BY", "GROUPING", "SETS", - "ORDER", "HAVING", "LIMIT", "OR", "AND", "IN", "NOT", "NO", "EXISTS", - "BETWEEN", "LIKE", "RLIKE", "IS", "NULL", "TRUE", "FALSE", "LAST", "ASC", - "DESC", "FOR", "INTEGER", "JOIN", "CROSS", "OUTER", "INNER", "LEFT", "RIGHT", + null, null, null, null, null, "SELECT", "FROM", "AS", "ALL", "WHEN", "THEN", + "ANY", "DISTINCT", "WHERE", "GROUP", "BY", "GROUPING", "SETS", "ORDER", + "HAVING", "LIMIT", "OR", "AND", "IN", "NOT", "NO", "EXISTS", "BETWEEN", + "LIKE", "RLIKE", "IS", "NULL", "TRUE", "FALSE", "LAST", "ASC", "DESC", + "FOR", "INTEGER", "JOIN", "CROSS", "OUTER", "INNER", "LEFT", "RIGHT", "FULL", "NATURAL", "USING", "ON", "WITH", "TABLE", "INTO", "DESCRIBE", "OPTION", "EXPLAIN", "ANALYZE", "FORMAT", "TYPE", "TEXT", "VERIFY", "GRAPHVIZ", "LOGICAL", "PHYSICAL", "SHOW", "TABLES", "COLUMNS", "COLUMN", "FUNCTIONS", @@ -488,15 +488,9 @@ class SqlBaseParser extends Parser { } } public static class ShowTablesContext extends StatementContext { - public IdentifierContext index; public Token pattern; public TerminalNode SHOW() { return getToken(SqlBaseParser.SHOW, 0); } public TerminalNode TABLES() { return getToken(SqlBaseParser.TABLES, 0); } - public TerminalNode FROM() { return getToken(SqlBaseParser.FROM, 0); } - public TerminalNode IN() { return getToken(SqlBaseParser.IN, 0); } - public IdentifierContext identifier() { - return getRuleContext(IdentifierContext.class,0); - } public TerminalNode STRING() { return getToken(SqlBaseParser.STRING, 0); } public TerminalNode LIKE() { return getToken(SqlBaseParser.LIKE, 0); } public ShowTablesContext(StatementContext ctx) { copyFrom(ctx); } @@ -563,8 +557,8 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 4, RULE_statement); int _la; try { - setState(177); - switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + setState(173); + switch ( getInterpreter().adaptivePredict(_input,17,_ctx) ) { case 1: _localctx = new StatementDefaultContext(_localctx); enterOuterAlt(_localctx, 1); @@ -588,7 +582,7 @@ class SqlBaseParser extends Parser { setState(95); _errHandler.sync(this); _la = _input.LA(1); - while (((((_la - 57)) & ~0x3f) == 0 && ((1L << (_la - 57)) & ((1L << (FORMAT - 57)) | (1L << (VERIFY - 57)) | (1L << (PLAN - 57)))) != 0)) { + while (((((_la - 56)) & ~0x3f) == 0 && ((1L << (_la - 56)) & ((1L << (FORMAT - 56)) | (1L << (VERIFY - 56)) | (1L << (PLAN - 56)))) != 0)) { { setState(93); switch (_input.LA(1)) { @@ -599,7 +593,7 @@ class SqlBaseParser extends Parser { setState(88); ((ExplainContext)_localctx).type = _input.LT(1); _la = _input.LA(1); - if ( !(_la==ALL || ((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (PARSED - 72)) | (1L << (ANALYZED - 72)) | (1L << (OPTIMIZED - 72)) | (1L << (MAPPED - 72)) | (1L << (EXECUTABLE - 72)))) != 0)) ) { + if ( !(_la==ALL || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (PARSED - 71)) | (1L << (ANALYZED - 71)) | (1L << (OPTIMIZED - 71)) | (1L << (MAPPED - 71)) | (1L << (EXECUTABLE - 71)))) != 0)) ) { ((ExplainContext)_localctx).type = (Token)_errHandler.recoverInline(this); } else { consume(); @@ -717,36 +711,20 @@ class SqlBaseParser extends Parser { match(SHOW); setState(118); match(TABLES); - setState(121); - _la = _input.LA(1); - if (_la==FROM || _la==IN) { - { - setState(119); - _la = _input.LA(1); - if ( !(_la==FROM || _la==IN) ) { - _errHandler.recoverInline(this); - } else { - consume(); - } - setState(120); - ((ShowTablesContext)_localctx).index = identifier(); - } - } - - setState(127); + setState(123); _la = _input.LA(1); if (_la==LIKE || _la==STRING) { { - setState(124); + setState(120); _la = _input.LA(1); if (_la==LIKE) { { - setState(123); + setState(119); match(LIKE); } } - setState(126); + setState(122); ((ShowTablesContext)_localctx).pattern = match(STRING); } } @@ -757,18 +735,18 @@ class SqlBaseParser extends Parser { _localctx = new ShowColumnsContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(129); + setState(125); match(SHOW); - setState(130); + setState(126); match(COLUMNS); - setState(131); + setState(127); _la = _input.LA(1); if ( !(_la==FROM || _la==IN) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(132); + setState(128); tableIdentifier(); } break; @@ -776,14 +754,14 @@ class SqlBaseParser extends Parser { _localctx = new ShowColumnsContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(133); + setState(129); _la = _input.LA(1); if ( !(_la==DESC || _la==DESCRIBE) ) { _errHandler.recoverInline(this); } else { consume(); } - setState(134); + setState(130); tableIdentifier(); } break; @@ -791,24 +769,24 @@ class SqlBaseParser extends Parser { _localctx = new ShowFunctionsContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(135); + setState(131); match(SHOW); - setState(136); + setState(132); match(FUNCTIONS); - setState(141); + setState(137); _la = _input.LA(1); if (_la==LIKE || _la==STRING) { { - setState(138); + setState(134); _la = _input.LA(1); if (_la==LIKE) { { - setState(137); + setState(133); match(LIKE); } } - setState(140); + setState(136); ((ShowFunctionsContext)_localctx).pattern = match(STRING); } } @@ -819,9 +797,9 @@ class SqlBaseParser extends Parser { _localctx = new ShowSchemasContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(143); + setState(139); match(SHOW); - setState(144); + setState(140); match(SCHEMAS); } break; @@ -829,11 +807,11 @@ class SqlBaseParser extends Parser { _localctx = new ShowSessionContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(145); + setState(141); match(SHOW); - setState(146); + setState(142); match(SESSION); - setState(153); + setState(149); switch (_input.LA(1)) { case EXPLAIN: case ANALYZE: @@ -854,7 +832,7 @@ class SqlBaseParser extends Parser { case QUOTED_IDENTIFIER: case BACKQUOTED_IDENTIFIER: { - setState(147); + setState(143); ((ShowSessionContext)_localctx).key = identifier(); } break; @@ -862,23 +840,23 @@ class SqlBaseParser extends Parser { case STRING: { { - setState(149); + setState(145); _la = _input.LA(1); if (_la==LIKE) { { - setState(148); + setState(144); match(LIKE); } } - setState(151); + setState(147); ((ShowSessionContext)_localctx).pattern = match(STRING); } } break; case ALL: { - setState(152); + setState(148); match(ALL); } break; @@ -891,29 +869,29 @@ class SqlBaseParser extends Parser { _localctx = new SessionSetContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(155); + setState(151); match(SET); - setState(157); + setState(153); _la = _input.LA(1); if (_la==SESSION) { { - setState(156); + setState(152); match(SESSION); } } - setState(159); + setState(155); ((SessionSetContext)_localctx).key = identifier(); - setState(161); + setState(157); _la = _input.LA(1); if (_la==EQ) { { - setState(160); + setState(156); match(EQ); } } - setState(163); + setState(159); ((SessionSetContext)_localctx).value = constant(); } break; @@ -921,18 +899,18 @@ class SqlBaseParser extends Parser { _localctx = new SessionResetContext(_localctx); enterOuterAlt(_localctx, 11); { - setState(165); + setState(161); match(RESET); - setState(167); + setState(163); _la = _input.LA(1); if (_la==SESSION) { { - setState(166); + setState(162); match(SESSION); } } - setState(175); + setState(171); switch (_input.LA(1)) { case EXPLAIN: case ANALYZE: @@ -953,7 +931,7 @@ class SqlBaseParser extends Parser { case QUOTED_IDENTIFIER: case BACKQUOTED_IDENTIFIER: { - setState(169); + setState(165); ((SessionResetContext)_localctx).key = identifier(); } break; @@ -961,23 +939,23 @@ class SqlBaseParser extends Parser { case STRING: { { - setState(171); + setState(167); _la = _input.LA(1); if (_la==LIKE) { { - setState(170); + setState(166); match(LIKE); } } - setState(173); + setState(169); ((SessionResetContext)_localctx).pattern = match(STRING); } } break; case ALL: { - setState(174); + setState(170); match(ALL); } break; @@ -1036,34 +1014,34 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(188); + setState(184); _la = _input.LA(1); if (_la==WITH) { { - setState(179); + setState(175); match(WITH); - setState(180); + setState(176); namedQuery(); - setState(185); + setState(181); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(181); + setState(177); match(T__2); - setState(182); + setState(178); namedQuery(); } } - setState(187); + setState(183); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(190); + setState(186); queryNoWith(); } } @@ -1120,44 +1098,44 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(192); + setState(188); queryTerm(); - setState(203); + setState(199); _la = _input.LA(1); if (_la==ORDER) { { - setState(193); + setState(189); match(ORDER); - setState(194); + setState(190); match(BY); - setState(195); + setState(191); orderBy(); - setState(200); + setState(196); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(196); + setState(192); match(T__2); - setState(197); + setState(193); orderBy(); } } - setState(202); + setState(198); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(207); + setState(203); _la = _input.LA(1); if (_la==LIMIT) { { - setState(205); + setState(201); match(LIMIT); - setState(206); + setState(202); ((QueryNoWithContext)_localctx).limit = _input.LT(1); _la = _input.LA(1); if ( !(_la==ALL || _la==INTEGER_VALUE) ) { @@ -1235,13 +1213,13 @@ class SqlBaseParser extends Parser { QueryTermContext _localctx = new QueryTermContext(_ctx, getState()); enterRule(_localctx, 10, RULE_queryTerm); try { - setState(214); + setState(210); switch (_input.LA(1)) { case SELECT: _localctx = new QueryPrimaryDefaultContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(209); + setState(205); querySpecification(); } break; @@ -1249,11 +1227,11 @@ class SqlBaseParser extends Parser { _localctx = new SubqueryContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(210); + setState(206); match(T__0); - setState(211); + setState(207); queryNoWith(); - setState(212); + setState(208); match(T__1); } break; @@ -1305,13 +1283,13 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(216); + setState(212); expression(); - setState(218); + setState(214); _la = _input.LA(1); if (_la==ASC || _la==DESC) { { - setState(217); + setState(213); ((OrderByContext)_localctx).ordering = _input.LT(1); _la = _input.LA(1); if ( !(_la==ASC || _la==DESC) ) { @@ -1390,75 +1368,75 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(220); + setState(216); match(SELECT); - setState(222); + setState(218); _la = _input.LA(1); if (_la==ALL || _la==DISTINCT) { { - setState(221); + setState(217); setQuantifier(); } } - setState(224); + setState(220); selectItem(); - setState(229); + setState(225); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(225); + setState(221); match(T__2); - setState(226); + setState(222); selectItem(); } } - setState(231); + setState(227); _errHandler.sync(this); _la = _input.LA(1); } - setState(233); + setState(229); _la = _input.LA(1); if (_la==FROM) { { - setState(232); + setState(228); fromClause(); } } - setState(237); + setState(233); _la = _input.LA(1); if (_la==WHERE) { { - setState(235); + setState(231); match(WHERE); - setState(236); + setState(232); ((QuerySpecificationContext)_localctx).where = booleanExpression(0); } } + setState(238); + _la = _input.LA(1); + if (_la==GROUP) { + { + setState(235); + match(GROUP); + setState(236); + match(BY); + setState(237); + groupBy(); + } + } + setState(242); _la = _input.LA(1); - if (_la==GROUP) { - { - setState(239); - match(GROUP); - setState(240); - match(BY); - setState(241); - groupBy(); - } - } - - setState(246); - _la = _input.LA(1); if (_la==HAVING) { { - setState(244); + setState(240); match(HAVING); - setState(245); + setState(241); ((QuerySpecificationContext)_localctx).having = booleanExpression(0); } } @@ -1510,23 +1488,23 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(248); + setState(244); match(FROM); - setState(249); + setState(245); relation(); - setState(254); + setState(250); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(250); + setState(246); match(T__2); - setState(251); + setState(247); relation(); } } - setState(256); + setState(252); _errHandler.sync(this); _la = _input.LA(1); } @@ -1579,30 +1557,30 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(258); + setState(254); _la = _input.LA(1); if (_la==ALL || _la==DISTINCT) { { - setState(257); + setState(253); setQuantifier(); } } - setState(260); + setState(256); groupingElement(); - setState(265); + setState(261); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(261); + setState(257); match(T__2); - setState(262); + setState(258); groupingElement(); } } - setState(267); + setState(263); _errHandler.sync(this); _la = _input.LA(1); } @@ -1657,7 +1635,7 @@ class SqlBaseParser extends Parser { _localctx = new SingleGroupingSetContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(268); + setState(264); groupingExpressions(); } } @@ -1703,46 +1681,46 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 22, RULE_groupingExpressions); int _la; try { - setState(283); - switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + setState(279); + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(270); + setState(266); match(T__0); - setState(279); + setState(275); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__4) | (1L << NOT) | (1L << EXISTS) | (1L << NULL) | (1L << TRUE) | (1L << FALSE) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (EXTRACT - 64)) | (1L << (QUERY - 64)) | (1L << (MATCH - 64)) | (1L << (CAST - 64)) | (1L << (PLUS - 64)) | (1L << (MINUS - 64)) | (1L << (ASTERISK - 64)) | (1L << (STRING - 64)) | (1L << (INTEGER_VALUE - 64)) | (1L << (DECIMAL_VALUE - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << NOT) | (1L << EXISTS) | (1L << NULL) | (1L << TRUE) | (1L << FALSE) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL) | (1L << SHOW))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (EXTRACT - 64)) | (1L << (QUERY - 64)) | (1L << (MATCH - 64)) | (1L << (CAST - 64)) | (1L << (PLUS - 64)) | (1L << (MINUS - 64)) | (1L << (ASTERISK - 64)) | (1L << (STRING - 64)) | (1L << (INTEGER_VALUE - 64)) | (1L << (DECIMAL_VALUE - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { { - setState(271); + setState(267); expression(); - setState(276); + setState(272); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(272); + setState(268); match(T__2); - setState(273); + setState(269); expression(); } } - setState(278); + setState(274); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(281); + setState(277); match(T__1); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(282); + setState(278); expression(); } break; @@ -1793,15 +1771,15 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(285); + setState(281); ((NamedQueryContext)_localctx).name = identifier(); - setState(286); + setState(282); match(AS); - setState(287); + setState(283); match(T__0); - setState(288); + setState(284); queryNoWith(); - setState(289); + setState(285); match(T__1); } } @@ -1845,7 +1823,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(291); + setState(287); _la = _input.LA(1); if ( !(_la==ALL || _la==DISTINCT) ) { _errHandler.recoverInline(this); @@ -1908,22 +1886,22 @@ class SqlBaseParser extends Parser { _localctx = new SelectExpressionContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(293); + setState(289); expression(); - setState(298); + setState(294); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL) | (1L << SHOW))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { { - setState(295); + setState(291); _la = _input.LA(1); if (_la==AS) { { - setState(294); + setState(290); match(AS); } } - setState(297); + setState(293); identifier(); } } @@ -1977,19 +1955,19 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(300); + setState(296); relationPrimary(); - setState(304); + setState(300); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << JOIN) | (1L << INNER) | (1L << LEFT) | (1L << RIGHT) | (1L << FULL) | (1L << NATURAL))) != 0)) { { { - setState(301); + setState(297); joinRelation(); } } - setState(306); + setState(302); _errHandler.sync(this); _la = _input.LA(1); } @@ -2043,7 +2021,7 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 32, RULE_joinRelation); int _la; try { - setState(318); + setState(314); switch (_input.LA(1)) { case JOIN: case INNER: @@ -2053,18 +2031,18 @@ class SqlBaseParser extends Parser { enterOuterAlt(_localctx, 1); { { - setState(307); + setState(303); joinType(); } - setState(308); + setState(304); match(JOIN); - setState(309); + setState(305); ((JoinRelationContext)_localctx).right = relationPrimary(); - setState(311); + setState(307); _la = _input.LA(1); if (_la==USING || _la==ON) { { - setState(310); + setState(306); joinCriteria(); } } @@ -2074,13 +2052,13 @@ class SqlBaseParser extends Parser { case NATURAL: enterOuterAlt(_localctx, 2); { - setState(313); + setState(309); match(NATURAL); - setState(314); + setState(310); joinType(); - setState(315); + setState(311); match(JOIN); - setState(316); + setState(312); ((JoinRelationContext)_localctx).right = relationPrimary(); } break; @@ -2129,17 +2107,17 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 34, RULE_joinType); int _la; try { - setState(335); + setState(331); switch (_input.LA(1)) { case JOIN: case INNER: enterOuterAlt(_localctx, 1); { - setState(321); + setState(317); _la = _input.LA(1); if (_la==INNER) { { - setState(320); + setState(316); match(INNER); } } @@ -2149,8 +2127,24 @@ class SqlBaseParser extends Parser { case LEFT: enterOuterAlt(_localctx, 2); { - setState(323); + setState(319); match(LEFT); + setState(321); + _la = _input.LA(1); + if (_la==OUTER) { + { + setState(320); + match(OUTER); + } + } + + } + break; + case RIGHT: + enterOuterAlt(_localctx, 3); + { + setState(323); + match(RIGHT); setState(325); _la = _input.LA(1); if (_la==OUTER) { @@ -2162,11 +2156,11 @@ class SqlBaseParser extends Parser { } break; - case RIGHT: - enterOuterAlt(_localctx, 3); + case FULL: + enterOuterAlt(_localctx, 4); { setState(327); - match(RIGHT); + match(FULL); setState(329); _la = _input.LA(1); if (_la==OUTER) { @@ -2176,22 +2170,6 @@ class SqlBaseParser extends Parser { } } - } - break; - case FULL: - enterOuterAlt(_localctx, 4); - { - setState(331); - match(FULL); - setState(333); - _la = _input.LA(1); - if (_la==OUTER) { - { - setState(332); - match(OUTER); - } - } - } break; default: @@ -2245,43 +2223,43 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 36, RULE_joinCriteria); int _la; try { - setState(351); + setState(347); switch (_input.LA(1)) { case ON: enterOuterAlt(_localctx, 1); { - setState(337); + setState(333); match(ON); - setState(338); + setState(334); booleanExpression(0); } break; case USING: enterOuterAlt(_localctx, 2); { - setState(339); + setState(335); match(USING); - setState(340); + setState(336); match(T__0); - setState(341); + setState(337); identifier(); - setState(346); + setState(342); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(342); + setState(338); match(T__2); - setState(343); + setState(339); identifier(); } } - setState(348); + setState(344); _errHandler.sync(this); _la = _input.LA(1); } - setState(349); + setState(345); match(T__1); } break; @@ -2386,28 +2364,28 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 38, RULE_relationPrimary); int _la; try { - setState(378); - switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) { + setState(374); + switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) { case 1: _localctx = new TableNameContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(353); + setState(349); tableIdentifier(); - setState(358); + setState(354); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL) | (1L << SHOW))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { { - setState(355); + setState(351); _la = _input.LA(1); if (_la==AS) { { - setState(354); + setState(350); match(AS); } } - setState(357); + setState(353); qualifiedName(); } } @@ -2418,26 +2396,26 @@ class SqlBaseParser extends Parser { _localctx = new AliasedQueryContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(360); + setState(356); match(T__0); - setState(361); + setState(357); queryNoWith(); - setState(362); + setState(358); match(T__1); - setState(367); + setState(363); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL) | (1L << SHOW))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { { - setState(364); + setState(360); _la = _input.LA(1); if (_la==AS) { { - setState(363); + setState(359); match(AS); } } - setState(366); + setState(362); qualifiedName(); } } @@ -2448,26 +2426,26 @@ class SqlBaseParser extends Parser { _localctx = new AliasedRelationContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(369); + setState(365); match(T__0); - setState(370); + setState(366); relation(); - setState(371); + setState(367); match(T__1); - setState(376); + setState(372); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << AS) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL) | (1L << SHOW))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { { - setState(373); + setState(369); _la = _input.LA(1); if (_la==AS) { { - setState(372); + setState(368); match(AS); } } - setState(375); + setState(371); qualifiedName(); } } @@ -2516,7 +2494,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(380); + setState(376); booleanExpression(0); } } @@ -2719,17 +2697,17 @@ class SqlBaseParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(429); - switch ( getInterpreter().adaptivePredict(_input,60,_ctx) ) { + setState(425); + switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { case 1: { _localctx = new LogicalNotContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(383); + setState(379); match(NOT); - setState(384); + setState(380); booleanExpression(7); } break; @@ -2738,7 +2716,7 @@ class SqlBaseParser extends Parser { _localctx = new BooleanDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(385); + setState(381); predicated(); } break; @@ -2747,13 +2725,13 @@ class SqlBaseParser extends Parser { _localctx = new ExistsContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(386); + setState(382); match(EXISTS); - setState(387); + setState(383); match(T__0); - setState(388); + setState(384); query(); - setState(389); + setState(385); match(T__1); } break; @@ -2762,29 +2740,29 @@ class SqlBaseParser extends Parser { _localctx = new StringQueryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(391); + setState(387); match(QUERY); - setState(392); + setState(388); match(T__0); - setState(393); + setState(389); ((StringQueryContext)_localctx).queryString = match(STRING); - setState(398); + setState(394); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(394); + setState(390); match(T__2); - setState(395); + setState(391); ((StringQueryContext)_localctx).options = match(STRING); } } - setState(400); + setState(396); _errHandler.sync(this); _la = _input.LA(1); } - setState(401); + setState(397); match(T__1); } break; @@ -2793,33 +2771,33 @@ class SqlBaseParser extends Parser { _localctx = new MatchQueryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(402); + setState(398); match(MATCH); - setState(403); + setState(399); match(T__0); - setState(404); + setState(400); ((MatchQueryContext)_localctx).singleField = qualifiedName(); - setState(405); + setState(401); match(T__2); - setState(406); + setState(402); ((MatchQueryContext)_localctx).queryString = match(STRING); - setState(411); + setState(407); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(407); + setState(403); match(T__2); - setState(408); + setState(404); ((MatchQueryContext)_localctx).options = match(STRING); } } - setState(413); + setState(409); _errHandler.sync(this); _la = _input.LA(1); } - setState(414); + setState(410); match(T__1); } break; @@ -2828,58 +2806,58 @@ class SqlBaseParser extends Parser { _localctx = new MultiMatchQueryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(416); + setState(412); match(MATCH); - setState(417); + setState(413); match(T__0); - setState(418); + setState(414); ((MultiMatchQueryContext)_localctx).multiFields = match(STRING); - setState(419); + setState(415); match(T__2); - setState(420); + setState(416); ((MultiMatchQueryContext)_localctx).queryString = match(STRING); - setState(425); + setState(421); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(421); + setState(417); match(T__2); - setState(422); + setState(418); ((MultiMatchQueryContext)_localctx).options = match(STRING); } } - setState(427); + setState(423); _errHandler.sync(this); _la = _input.LA(1); } - setState(428); + setState(424); match(T__1); } break; } _ctx.stop = _input.LT(-1); - setState(439); + setState(435); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,62,_ctx); + _alt = getInterpreter().adaptivePredict(_input,61,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(437); - switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { + setState(433); + switch ( getInterpreter().adaptivePredict(_input,60,_ctx) ) { case 1: { _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(431); + setState(427); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(432); + setState(428); ((LogicalBinaryContext)_localctx).operator = match(AND); - setState(433); + setState(429); ((LogicalBinaryContext)_localctx).right = booleanExpression(7); } break; @@ -2888,20 +2866,20 @@ class SqlBaseParser extends Parser { _localctx = new LogicalBinaryContext(new BooleanExpressionContext(_parentctx, _parentState)); ((LogicalBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_booleanExpression); - setState(434); + setState(430); if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); - setState(435); + setState(431); ((LogicalBinaryContext)_localctx).operator = match(OR); - setState(436); + setState(432); ((LogicalBinaryContext)_localctx).right = booleanExpression(6); } break; } } } - setState(441); + setState(437); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,62,_ctx); + _alt = getInterpreter().adaptivePredict(_input,61,_ctx); } } } @@ -2948,13 +2926,13 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(442); + setState(438); valueExpression(0); - setState(444); - switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + setState(440); + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { case 1: { - setState(443); + setState(439); predicate(); } break; @@ -3024,103 +3002,103 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 46, RULE_predicate); int _la; try { - setState(487); - switch ( getInterpreter().adaptivePredict(_input,70,_ctx) ) { + setState(483); + switch ( getInterpreter().adaptivePredict(_input,69,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { - setState(447); + setState(443); _la = _input.LA(1); if (_la==NOT) { { - setState(446); + setState(442); match(NOT); } } - setState(449); + setState(445); ((PredicateContext)_localctx).kind = match(BETWEEN); - setState(450); + setState(446); ((PredicateContext)_localctx).lower = valueExpression(0); - setState(451); + setState(447); match(AND); - setState(452); + setState(448); ((PredicateContext)_localctx).upper = valueExpression(0); } break; case 2: enterOuterAlt(_localctx, 2); { - setState(455); + setState(451); _la = _input.LA(1); if (_la==NOT) { { - setState(454); + setState(450); match(NOT); } } - setState(457); + setState(453); ((PredicateContext)_localctx).kind = match(IN); - setState(458); + setState(454); match(T__0); - setState(459); + setState(455); expression(); - setState(464); + setState(460); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(460); + setState(456); match(T__2); - setState(461); + setState(457); expression(); } } - setState(466); + setState(462); _errHandler.sync(this); _la = _input.LA(1); } - setState(467); + setState(463); match(T__1); } break; case 3: enterOuterAlt(_localctx, 3); { - setState(470); + setState(466); _la = _input.LA(1); if (_la==NOT) { { - setState(469); + setState(465); match(NOT); } } - setState(472); + setState(468); ((PredicateContext)_localctx).kind = match(IN); - setState(473); + setState(469); match(T__0); - setState(474); + setState(470); query(); - setState(475); + setState(471); match(T__1); } break; case 4: enterOuterAlt(_localctx, 4); { - setState(478); + setState(474); _la = _input.LA(1); if (_la==NOT) { { - setState(477); + setState(473); match(NOT); } } - setState(480); + setState(476); ((PredicateContext)_localctx).kind = _input.LT(1); _la = _input.LA(1); if ( !(_la==LIKE || _la==RLIKE) ) { @@ -3128,25 +3106,25 @@ class SqlBaseParser extends Parser { } else { consume(); } - setState(481); + setState(477); ((PredicateContext)_localctx).pattern = valueExpression(0); } break; case 5: enterOuterAlt(_localctx, 5); { - setState(482); + setState(478); match(IS); - setState(484); + setState(480); _la = _input.LA(1); if (_la==NOT) { { - setState(483); + setState(479); match(NOT); } } - setState(486); + setState(482); ((PredicateContext)_localctx).kind = match(NULL); } break; @@ -3289,7 +3267,7 @@ class SqlBaseParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(493); + setState(489); switch (_input.LA(1)) { case PLUS: case MINUS: @@ -3298,7 +3276,7 @@ class SqlBaseParser extends Parser { _ctx = _localctx; _prevctx = _localctx; - setState(490); + setState(486); ((ArithmeticUnaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -3306,12 +3284,11 @@ class SqlBaseParser extends Parser { } else { consume(); } - setState(491); + setState(487); valueExpression(4); } break; case T__0: - case T__4: case NULL: case TRUE: case FALSE: @@ -3343,7 +3320,7 @@ class SqlBaseParser extends Parser { _localctx = new ValueExpressionDefaultContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(492); + setState(488); primaryExpression(); } break; @@ -3351,32 +3328,32 @@ class SqlBaseParser extends Parser { throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(507); + setState(503); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,73,_ctx); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(505); - switch ( getInterpreter().adaptivePredict(_input,72,_ctx) ) { + setState(501); + switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { case 1: { _localctx = new ArithmeticBinaryContext(new ValueExpressionContext(_parentctx, _parentState)); ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); - setState(495); + setState(491); if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); - setState(496); + setState(492); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); - if ( !(((((_la - 94)) & ~0x3f) == 0 && ((1L << (_la - 94)) & ((1L << (ASTERISK - 94)) | (1L << (SLASH - 94)) | (1L << (PERCENT - 94)))) != 0)) ) { + if ( !(((((_la - 93)) & ~0x3f) == 0 && ((1L << (_la - 93)) & ((1L << (ASTERISK - 93)) | (1L << (SLASH - 93)) | (1L << (PERCENT - 93)))) != 0)) ) { ((ArithmeticBinaryContext)_localctx).operator = (Token)_errHandler.recoverInline(this); } else { consume(); } - setState(497); + setState(493); ((ArithmeticBinaryContext)_localctx).right = valueExpression(4); } break; @@ -3385,9 +3362,9 @@ class SqlBaseParser extends Parser { _localctx = new ArithmeticBinaryContext(new ValueExpressionContext(_parentctx, _parentState)); ((ArithmeticBinaryContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); - setState(498); + setState(494); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); - setState(499); + setState(495); ((ArithmeticBinaryContext)_localctx).operator = _input.LT(1); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { @@ -3395,7 +3372,7 @@ class SqlBaseParser extends Parser { } else { consume(); } - setState(500); + setState(496); ((ArithmeticBinaryContext)_localctx).right = valueExpression(3); } break; @@ -3404,20 +3381,20 @@ class SqlBaseParser extends Parser { _localctx = new ComparisonContext(new ValueExpressionContext(_parentctx, _parentState)); ((ComparisonContext)_localctx).left = _prevctx; pushNewRecursionContext(_localctx, _startState, RULE_valueExpression); - setState(501); + setState(497); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); - setState(502); + setState(498); comparisonOperator(); - setState(503); + setState(499); ((ComparisonContext)_localctx).right = valueExpression(2); } break; } } } - setState(509); + setState(505); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,73,_ctx); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); } } } @@ -3647,13 +3624,13 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 50, RULE_primaryExpression); int _la; try { - setState(562); - switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + setState(558); + switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { case 1: _localctx = new ConstantDefaultContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(510); + setState(506); constant(); } break; @@ -3661,7 +3638,7 @@ class SqlBaseParser extends Parser { _localctx = new StarContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(511); + setState(507); match(ASTERISK); } break; @@ -3669,18 +3646,18 @@ class SqlBaseParser extends Parser { _localctx = new StarContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(515); + setState(511); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if (((((_la - 54)) & ~0x3f) == 0 && ((1L << (_la - 54)) & ((1L << (EXPLAIN - 54)) | (1L << (ANALYZE - 54)) | (1L << (FORMAT - 54)) | (1L << (TYPE - 54)) | (1L << (TEXT - 54)) | (1L << (VERIFY - 54)) | (1L << (GRAPHVIZ - 54)) | (1L << (LOGICAL - 54)) | (1L << (PHYSICAL - 54)) | (1L << (SHOW - 54)) | (1L << (TABLES - 54)) | (1L << (COLUMNS - 54)) | (1L << (COLUMN - 54)) | (1L << (FUNCTIONS - 54)) | (1L << (IDENTIFIER - 54)) | (1L << (DIGIT_IDENTIFIER - 54)) | (1L << (QUOTED_IDENTIFIER - 54)) | (1L << (BACKQUOTED_IDENTIFIER - 54)))) != 0)) { { - setState(512); + setState(508); ((StarContext)_localctx).qualifier = columnExpression(); - setState(513); + setState(509); match(T__3); } } - setState(517); + setState(513); match(ASTERISK); } break; @@ -3688,45 +3665,45 @@ class SqlBaseParser extends Parser { _localctx = new FunctionCallContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(518); + setState(514); identifier(); - setState(519); + setState(515); match(T__0); - setState(531); + setState(527); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__4) | (1L << ALL) | (1L << DISTINCT) | (1L << NOT) | (1L << EXISTS) | (1L << NULL) | (1L << TRUE) | (1L << FALSE) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (SHOW - 64)) | (1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (EXTRACT - 64)) | (1L << (QUERY - 64)) | (1L << (MATCH - 64)) | (1L << (CAST - 64)) | (1L << (PLUS - 64)) | (1L << (MINUS - 64)) | (1L << (ASTERISK - 64)) | (1L << (STRING - 64)) | (1L << (INTEGER_VALUE - 64)) | (1L << (DECIMAL_VALUE - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << ALL) | (1L << DISTINCT) | (1L << NOT) | (1L << EXISTS) | (1L << NULL) | (1L << TRUE) | (1L << FALSE) | (1L << EXPLAIN) | (1L << ANALYZE) | (1L << FORMAT) | (1L << TYPE) | (1L << TEXT) | (1L << VERIFY) | (1L << GRAPHVIZ) | (1L << LOGICAL) | (1L << PHYSICAL) | (1L << SHOW))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (TABLES - 64)) | (1L << (COLUMNS - 64)) | (1L << (COLUMN - 64)) | (1L << (FUNCTIONS - 64)) | (1L << (EXTRACT - 64)) | (1L << (QUERY - 64)) | (1L << (MATCH - 64)) | (1L << (CAST - 64)) | (1L << (PLUS - 64)) | (1L << (MINUS - 64)) | (1L << (ASTERISK - 64)) | (1L << (STRING - 64)) | (1L << (INTEGER_VALUE - 64)) | (1L << (DECIMAL_VALUE - 64)) | (1L << (IDENTIFIER - 64)) | (1L << (DIGIT_IDENTIFIER - 64)) | (1L << (QUOTED_IDENTIFIER - 64)) | (1L << (BACKQUOTED_IDENTIFIER - 64)))) != 0)) { { - setState(521); + setState(517); _la = _input.LA(1); if (_la==ALL || _la==DISTINCT) { { - setState(520); + setState(516); setQuantifier(); } } - setState(523); + setState(519); expression(); - setState(528); + setState(524); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { - setState(524); + setState(520); match(T__2); - setState(525); + setState(521); expression(); } } - setState(530); + setState(526); _errHandler.sync(this); _la = _input.LA(1); } } } - setState(533); + setState(529); match(T__1); } break; @@ -3734,11 +3711,11 @@ class SqlBaseParser extends Parser { _localctx = new SubqueryExpressionContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(535); + setState(531); match(T__0); - setState(536); + setState(532); query(); - setState(537); + setState(533); match(T__1); } break; @@ -3746,7 +3723,7 @@ class SqlBaseParser extends Parser { _localctx = new ColumnReferenceContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(539); + setState(535); columnExpression(); } break; @@ -3754,11 +3731,11 @@ class SqlBaseParser extends Parser { _localctx = new DereferenceContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(540); + setState(536); ((DereferenceContext)_localctx).base = columnExpression(); - setState(541); + setState(537); match(T__3); - setState(542); + setState(538); ((DereferenceContext)_localctx).fieldName = identifier(); } break; @@ -3766,11 +3743,11 @@ class SqlBaseParser extends Parser { _localctx = new ParenthesizedExpressionContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(544); + setState(540); match(T__0); - setState(545); + setState(541); expression(); - setState(546); + setState(542); match(T__1); } break; @@ -3778,17 +3755,17 @@ class SqlBaseParser extends Parser { _localctx = new CastContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(548); + setState(544); match(CAST); - setState(549); + setState(545); match(T__0); - setState(550); + setState(546); expression(); - setState(551); + setState(547); match(AS); - setState(552); + setState(548); dataType(); - setState(553); + setState(549); match(T__1); } break; @@ -3796,17 +3773,17 @@ class SqlBaseParser extends Parser { _localctx = new ExtractContext(_localctx); enterOuterAlt(_localctx, 10); { - setState(555); + setState(551); match(EXTRACT); - setState(556); + setState(552); match(T__0); - setState(557); + setState(553); ((ExtractContext)_localctx).field = identifier(); - setState(558); + setState(554); match(FROM); - setState(559); + setState(555); valueExpression(0); - setState(560); + setState(556); match(T__1); } break; @@ -3861,31 +3838,31 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(570); - switch ( getInterpreter().adaptivePredict(_input,80,_ctx) ) { + setState(566); + switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { case 1: { - setState(566); - switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { + setState(562); + switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { case 1: { - setState(564); + setState(560); ((ColumnExpressionContext)_localctx).alias = identifier(); } break; case 2: { - setState(565); + setState(561); ((ColumnExpressionContext)_localctx).table = tableIdentifier(); } break; } - setState(568); + setState(564); match(T__3); } break; } - setState(572); + setState(568); ((ColumnExpressionContext)_localctx).name = identifier(); } } @@ -4012,13 +3989,13 @@ class SqlBaseParser extends Parser { enterRule(_localctx, 54, RULE_constant); try { int _alt; - setState(585); + setState(581); switch (_input.LA(1)) { case NULL: _localctx = new NullLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(574); + setState(570); match(NULL); } break; @@ -4043,9 +4020,9 @@ class SqlBaseParser extends Parser { _localctx = new TypeConstructorContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(575); + setState(571); identifier(); - setState(576); + setState(572); match(STRING); } break; @@ -4054,7 +4031,7 @@ class SqlBaseParser extends Parser { _localctx = new NumericLiteralContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(578); + setState(574); number(); } break; @@ -4063,7 +4040,7 @@ class SqlBaseParser extends Parser { _localctx = new BooleanLiteralContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(579); + setState(575); booleanValue(); } break; @@ -4071,7 +4048,7 @@ class SqlBaseParser extends Parser { _localctx = new StringLiteralContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(581); + setState(577); _errHandler.sync(this); _alt = 1; do { @@ -4079,7 +4056,7 @@ class SqlBaseParser extends Parser { case 1: { { - setState(580); + setState(576); match(STRING); } } @@ -4087,9 +4064,9 @@ class SqlBaseParser extends Parser { default: throw new NoViableAltException(this); } - setState(583); + setState(579); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,81,_ctx); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; @@ -4141,9 +4118,9 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(587); + setState(583); _la = _input.LA(1); - if ( !(((((_la - 86)) & ~0x3f) == 0 && ((1L << (_la - 86)) & ((1L << (EQ - 86)) | (1L << (NEQ - 86)) | (1L << (LT - 86)) | (1L << (LTE - 86)) | (1L << (GT - 86)) | (1L << (GTE - 86)))) != 0)) ) { + if ( !(((((_la - 85)) & ~0x3f) == 0 && ((1L << (_la - 85)) & ((1L << (EQ - 85)) | (1L << (NEQ - 85)) | (1L << (LT - 85)) | (1L << (LTE - 85)) | (1L << (GT - 85)) | (1L << (GTE - 85)))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); @@ -4190,7 +4167,7 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(589); + setState(585); _la = _input.LA(1); if ( !(_la==TRUE || _la==FALSE) ) { _errHandler.recoverInline(this); @@ -4248,7 +4225,7 @@ class SqlBaseParser extends Parser { _localctx = new PrimitiveDataTypeContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(591); + setState(587); identifier(); } } @@ -4299,13 +4276,13 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(593); + setState(589); match(WHEN); - setState(594); + setState(590); ((WhenClauseContext)_localctx).condition = expression(); - setState(595); + setState(591); match(THEN); - setState(596); + setState(592); ((WhenClauseContext)_localctx).result = expression(); } } @@ -4353,21 +4330,21 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(598); + setState(594); identifier(); - setState(603); + setState(599); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__3) { { { - setState(599); + setState(595); match(T__3); - setState(600); + setState(596); identifier(); } } - setState(605); + setState(601); _errHandler.sync(this); _la = _input.LA(1); } @@ -4386,20 +4363,8 @@ class SqlBaseParser extends Parser { public static class TableIdentifierContext extends ParserRuleContext { public IdentifierContext index; - public IdentifierContext type; - public UnquoteIdentifierContext uindex; - public UnquoteIdentifierContext utype; - public List identifier() { - return getRuleContexts(IdentifierContext.class); - } - public IdentifierContext identifier(int i) { - return getRuleContext(IdentifierContext.class,i); - } - public List unquoteIdentifier() { - return getRuleContexts(UnquoteIdentifierContext.class); - } - public UnquoteIdentifierContext unquoteIdentifier(int i) { - return getRuleContext(UnquoteIdentifierContext.class,i); + public IdentifierContext identifier() { + return getRuleContext(IdentifierContext.class,0); } public TableIdentifierContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); @@ -4423,69 +4388,11 @@ class SqlBaseParser extends Parser { public final TableIdentifierContext tableIdentifier() throws RecognitionException { TableIdentifierContext _localctx = new TableIdentifierContext(_ctx, getState()); enterRule(_localctx, 66, RULE_tableIdentifier); - int _la; try { - setState(619); - switch (_input.LA(1)) { - case EXPLAIN: - case ANALYZE: - case FORMAT: - case TYPE: - case TEXT: - case VERIFY: - case GRAPHVIZ: - case LOGICAL: - case PHYSICAL: - case SHOW: - case TABLES: - case COLUMNS: - case COLUMN: - case FUNCTIONS: - case IDENTIFIER: - case DIGIT_IDENTIFIER: - case QUOTED_IDENTIFIER: - case BACKQUOTED_IDENTIFIER: - enterOuterAlt(_localctx, 1); - { - setState(606); - ((TableIdentifierContext)_localctx).index = identifier(); - setState(609); - switch ( getInterpreter().adaptivePredict(_input,84,_ctx) ) { - case 1: - { - setState(607); - match(T__3); - setState(608); - ((TableIdentifierContext)_localctx).type = identifier(); - } - break; - } - } - break; - case T__4: - enterOuterAlt(_localctx, 2); - { - setState(611); - match(T__4); - setState(612); - ((TableIdentifierContext)_localctx).uindex = unquoteIdentifier(); - setState(615); - _la = _input.LA(1); - if (_la==T__3) { - { - setState(613); - match(T__3); - setState(614); - ((TableIdentifierContext)_localctx).utype = unquoteIdentifier(); - } - } - - setState(617); - match(T__4); - } - break; - default: - throw new NoViableAltException(this); + enterOuterAlt(_localctx, 1); + { + setState(602); + ((TableIdentifierContext)_localctx).index = identifier(); } } catch (RecognitionException re) { @@ -4529,13 +4436,13 @@ class SqlBaseParser extends Parser { IdentifierContext _localctx = new IdentifierContext(_ctx, getState()); enterRule(_localctx, 68, RULE_identifier); try { - setState(623); + setState(606); switch (_input.LA(1)) { case QUOTED_IDENTIFIER: case BACKQUOTED_IDENTIFIER: enterOuterAlt(_localctx, 1); { - setState(621); + setState(604); quoteIdentifier(); } break; @@ -4557,7 +4464,7 @@ class SqlBaseParser extends Parser { case DIGIT_IDENTIFIER: enterOuterAlt(_localctx, 2); { - setState(622); + setState(605); unquoteIdentifier(); } break; @@ -4626,13 +4533,13 @@ class SqlBaseParser extends Parser { QuoteIdentifierContext _localctx = new QuoteIdentifierContext(_ctx, getState()); enterRule(_localctx, 70, RULE_quoteIdentifier); try { - setState(627); + setState(610); switch (_input.LA(1)) { case QUOTED_IDENTIFIER: _localctx = new QuotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(625); + setState(608); match(QUOTED_IDENTIFIER); } break; @@ -4640,7 +4547,7 @@ class SqlBaseParser extends Parser { _localctx = new BackQuotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(626); + setState(609); match(BACKQUOTED_IDENTIFIER); } break; @@ -4712,13 +4619,13 @@ class SqlBaseParser extends Parser { UnquoteIdentifierContext _localctx = new UnquoteIdentifierContext(_ctx, getState()); enterRule(_localctx, 72, RULE_unquoteIdentifier); try { - setState(632); + setState(615); switch (_input.LA(1)) { case IDENTIFIER: _localctx = new UnquotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(629); + setState(612); match(IDENTIFIER); } break; @@ -4739,7 +4646,7 @@ class SqlBaseParser extends Parser { _localctx = new UnquotedIdentifierContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(630); + setState(613); nonReserved(); } break; @@ -4747,7 +4654,7 @@ class SqlBaseParser extends Parser { _localctx = new DigitIdentifierContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(631); + setState(614); match(DIGIT_IDENTIFIER); } break; @@ -4816,13 +4723,13 @@ class SqlBaseParser extends Parser { NumberContext _localctx = new NumberContext(_ctx, getState()); enterRule(_localctx, 74, RULE_number); try { - setState(636); + setState(619); switch (_input.LA(1)) { case DECIMAL_VALUE: _localctx = new DecimalLiteralContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(634); + setState(617); match(DECIMAL_VALUE); } break; @@ -4830,7 +4737,7 @@ class SqlBaseParser extends Parser { _localctx = new IntegerLiteralContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(635); + setState(618); match(INTEGER_VALUE); } break; @@ -4890,9 +4797,9 @@ class SqlBaseParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(638); + setState(621); _la = _input.LA(1); - if ( !(((((_la - 55)) & ~0x3f) == 0 && ((1L << (_la - 55)) & ((1L << (EXPLAIN - 55)) | (1L << (ANALYZE - 55)) | (1L << (FORMAT - 55)) | (1L << (TYPE - 55)) | (1L << (TEXT - 55)) | (1L << (VERIFY - 55)) | (1L << (GRAPHVIZ - 55)) | (1L << (LOGICAL - 55)) | (1L << (PHYSICAL - 55)) | (1L << (SHOW - 55)) | (1L << (TABLES - 55)) | (1L << (COLUMNS - 55)) | (1L << (COLUMN - 55)) | (1L << (FUNCTIONS - 55)))) != 0)) ) { + if ( !(((((_la - 54)) & ~0x3f) == 0 && ((1L << (_la - 54)) & ((1L << (EXPLAIN - 54)) | (1L << (ANALYZE - 54)) | (1L << (FORMAT - 54)) | (1L << (TYPE - 54)) | (1L << (TEXT - 54)) | (1L << (VERIFY - 54)) | (1L << (GRAPHVIZ - 54)) | (1L << (LOGICAL - 54)) | (1L << (PHYSICAL - 54)) | (1L << (SHOW - 54)) | (1L << (TABLES - 54)) | (1L << (COLUMNS - 54)) | (1L << (COLUMN - 54)) | (1L << (FUNCTIONS - 54)))) != 0)) ) { _errHandler.recoverInline(this); } else { consume(); @@ -4941,7 +4848,7 @@ class SqlBaseParser extends Parser { } public static final String _serializedATN = - "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3o\u0283\4\2\t\2\4"+ + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3n\u0272\4\2\t\2\4"+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -4949,252 +4856,245 @@ class SqlBaseParser extends Parser { "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\3\2\3\2\3\2\3\3\3\3"+ "\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\7\4`\n\4\f\4\16\4c\13\4\3\4\5"+ "\4f\n\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\7\4o\n\4\f\4\16\4r\13\4\3\4\5\4u\n"+ - "\4\3\4\3\4\3\4\3\4\3\4\5\4|\n\4\3\4\5\4\177\n\4\3\4\5\4\u0082\n\4\3\4"+ - "\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4\u008d\n\4\3\4\5\4\u0090\n\4\3\4\3"+ - "\4\3\4\3\4\3\4\3\4\5\4\u0098\n\4\3\4\3\4\5\4\u009c\n\4\3\4\3\4\5\4\u00a0"+ - "\n\4\3\4\3\4\5\4\u00a4\n\4\3\4\3\4\3\4\3\4\5\4\u00aa\n\4\3\4\3\4\5\4\u00ae"+ - "\n\4\3\4\3\4\5\4\u00b2\n\4\5\4\u00b4\n\4\3\5\3\5\3\5\3\5\7\5\u00ba\n\5"+ - "\f\5\16\5\u00bd\13\5\5\5\u00bf\n\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6"+ - "\u00c9\n\6\f\6\16\6\u00cc\13\6\5\6\u00ce\n\6\3\6\3\6\5\6\u00d2\n\6\3\7"+ - "\3\7\3\7\3\7\3\7\5\7\u00d9\n\7\3\b\3\b\5\b\u00dd\n\b\3\t\3\t\5\t\u00e1"+ - "\n\t\3\t\3\t\3\t\7\t\u00e6\n\t\f\t\16\t\u00e9\13\t\3\t\5\t\u00ec\n\t\3"+ - "\t\3\t\5\t\u00f0\n\t\3\t\3\t\3\t\5\t\u00f5\n\t\3\t\3\t\5\t\u00f9\n\t\3"+ - "\n\3\n\3\n\3\n\7\n\u00ff\n\n\f\n\16\n\u0102\13\n\3\13\5\13\u0105\n\13"+ - "\3\13\3\13\3\13\7\13\u010a\n\13\f\13\16\13\u010d\13\13\3\f\3\f\3\r\3\r"+ - "\3\r\3\r\7\r\u0115\n\r\f\r\16\r\u0118\13\r\5\r\u011a\n\r\3\r\3\r\5\r\u011e"+ - "\n\r\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\20\3\20\5\20\u012a\n\20"+ - "\3\20\5\20\u012d\n\20\3\21\3\21\7\21\u0131\n\21\f\21\16\21\u0134\13\21"+ - "\3\22\3\22\3\22\3\22\5\22\u013a\n\22\3\22\3\22\3\22\3\22\3\22\5\22\u0141"+ - "\n\22\3\23\5\23\u0144\n\23\3\23\3\23\5\23\u0148\n\23\3\23\3\23\5\23\u014c"+ - "\n\23\3\23\3\23\5\23\u0150\n\23\5\23\u0152\n\23\3\24\3\24\3\24\3\24\3"+ - "\24\3\24\3\24\7\24\u015b\n\24\f\24\16\24\u015e\13\24\3\24\3\24\5\24\u0162"+ - "\n\24\3\25\3\25\5\25\u0166\n\25\3\25\5\25\u0169\n\25\3\25\3\25\3\25\3"+ - "\25\5\25\u016f\n\25\3\25\5\25\u0172\n\25\3\25\3\25\3\25\3\25\5\25\u0178"+ - "\n\25\3\25\5\25\u017b\n\25\5\25\u017d\n\25\3\26\3\26\3\27\3\27\3\27\3"+ - "\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u018f\n\27"+ - "\f\27\16\27\u0192\13\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u019c"+ - "\n\27\f\27\16\27\u019f\13\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3"+ - "\27\7\27\u01aa\n\27\f\27\16\27\u01ad\13\27\3\27\5\27\u01b0\n\27\3\27\3"+ - "\27\3\27\3\27\3\27\3\27\7\27\u01b8\n\27\f\27\16\27\u01bb\13\27\3\30\3"+ - "\30\5\30\u01bf\n\30\3\31\5\31\u01c2\n\31\3\31\3\31\3\31\3\31\3\31\3\31"+ - "\5\31\u01ca\n\31\3\31\3\31\3\31\3\31\3\31\7\31\u01d1\n\31\f\31\16\31\u01d4"+ - "\13\31\3\31\3\31\3\31\5\31\u01d9\n\31\3\31\3\31\3\31\3\31\3\31\3\31\5"+ - "\31\u01e1\n\31\3\31\3\31\3\31\3\31\5\31\u01e7\n\31\3\31\5\31\u01ea\n\31"+ - "\3\32\3\32\3\32\3\32\5\32\u01f0\n\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32"+ - "\3\32\3\32\3\32\7\32\u01fc\n\32\f\32\16\32\u01ff\13\32\3\33\3\33\3\33"+ - "\3\33\3\33\5\33\u0206\n\33\3\33\3\33\3\33\3\33\5\33\u020c\n\33\3\33\3"+ - "\33\3\33\7\33\u0211\n\33\f\33\16\33\u0214\13\33\5\33\u0216\n\33\3\33\3"+ + "\4\3\4\3\4\3\4\3\4\5\4{\n\4\3\4\5\4~\n\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3"+ + "\4\3\4\5\4\u0089\n\4\3\4\5\4\u008c\n\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4\u0094"+ + "\n\4\3\4\3\4\5\4\u0098\n\4\3\4\3\4\5\4\u009c\n\4\3\4\3\4\5\4\u00a0\n\4"+ + "\3\4\3\4\3\4\3\4\5\4\u00a6\n\4\3\4\3\4\5\4\u00aa\n\4\3\4\3\4\5\4\u00ae"+ + "\n\4\5\4\u00b0\n\4\3\5\3\5\3\5\3\5\7\5\u00b6\n\5\f\5\16\5\u00b9\13\5\5"+ + "\5\u00bb\n\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6\u00c5\n\6\f\6\16\6\u00c8"+ + "\13\6\5\6\u00ca\n\6\3\6\3\6\5\6\u00ce\n\6\3\7\3\7\3\7\3\7\3\7\5\7\u00d5"+ + "\n\7\3\b\3\b\5\b\u00d9\n\b\3\t\3\t\5\t\u00dd\n\t\3\t\3\t\3\t\7\t\u00e2"+ + "\n\t\f\t\16\t\u00e5\13\t\3\t\5\t\u00e8\n\t\3\t\3\t\5\t\u00ec\n\t\3\t\3"+ + "\t\3\t\5\t\u00f1\n\t\3\t\3\t\5\t\u00f5\n\t\3\n\3\n\3\n\3\n\7\n\u00fb\n"+ + "\n\f\n\16\n\u00fe\13\n\3\13\5\13\u0101\n\13\3\13\3\13\3\13\7\13\u0106"+ + "\n\13\f\13\16\13\u0109\13\13\3\f\3\f\3\r\3\r\3\r\3\r\7\r\u0111\n\r\f\r"+ + "\16\r\u0114\13\r\5\r\u0116\n\r\3\r\3\r\5\r\u011a\n\r\3\16\3\16\3\16\3"+ + "\16\3\16\3\16\3\17\3\17\3\20\3\20\5\20\u0126\n\20\3\20\5\20\u0129\n\20"+ + "\3\21\3\21\7\21\u012d\n\21\f\21\16\21\u0130\13\21\3\22\3\22\3\22\3\22"+ + "\5\22\u0136\n\22\3\22\3\22\3\22\3\22\3\22\5\22\u013d\n\22\3\23\5\23\u0140"+ + "\n\23\3\23\3\23\5\23\u0144\n\23\3\23\3\23\5\23\u0148\n\23\3\23\3\23\5"+ + "\23\u014c\n\23\5\23\u014e\n\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\7\24"+ + "\u0157\n\24\f\24\16\24\u015a\13\24\3\24\3\24\5\24\u015e\n\24\3\25\3\25"+ + "\5\25\u0162\n\25\3\25\5\25\u0165\n\25\3\25\3\25\3\25\3\25\5\25\u016b\n"+ + "\25\3\25\5\25\u016e\n\25\3\25\3\25\3\25\3\25\5\25\u0174\n\25\3\25\5\25"+ + "\u0177\n\25\5\25\u0179\n\25\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3"+ + "\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u018b\n\27\f\27\16\27\u018e"+ + "\13\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u0198\n\27\f\27\16"+ + "\27\u019b\13\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\7\27\u01a6"+ + "\n\27\f\27\16\27\u01a9\13\27\3\27\5\27\u01ac\n\27\3\27\3\27\3\27\3\27"+ + "\3\27\3\27\7\27\u01b4\n\27\f\27\16\27\u01b7\13\27\3\30\3\30\5\30\u01bb"+ + "\n\30\3\31\5\31\u01be\n\31\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u01c6\n"+ + "\31\3\31\3\31\3\31\3\31\3\31\7\31\u01cd\n\31\f\31\16\31\u01d0\13\31\3"+ + "\31\3\31\3\31\5\31\u01d5\n\31\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u01dd"+ + "\n\31\3\31\3\31\3\31\3\31\5\31\u01e3\n\31\3\31\5\31\u01e6\n\31\3\32\3"+ + "\32\3\32\3\32\5\32\u01ec\n\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32"+ + "\3\32\3\32\7\32\u01f8\n\32\f\32\16\32\u01fb\13\32\3\33\3\33\3\33\3\33"+ + "\3\33\5\33\u0202\n\33\3\33\3\33\3\33\3\33\5\33\u0208\n\33\3\33\3\33\3"+ + "\33\7\33\u020d\n\33\f\33\16\33\u0210\13\33\5\33\u0212\n\33\3\33\3\33\3"+ "\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3"+ - "\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\5"+ - "\33\u0235\n\33\3\34\3\34\5\34\u0239\n\34\3\34\3\34\5\34\u023d\n\34\3\34"+ - "\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\6\35\u0248\n\35\r\35\16\35\u0249"+ - "\5\35\u024c\n\35\3\36\3\36\3\37\3\37\3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3\""+ - "\7\"\u025c\n\"\f\"\16\"\u025f\13\"\3#\3#\3#\5#\u0264\n#\3#\3#\3#\3#\5"+ - "#\u026a\n#\3#\3#\5#\u026e\n#\3$\3$\5$\u0272\n$\3%\3%\5%\u0276\n%\3&\3"+ - "&\3&\5&\u027b\n&\3\'\3\'\5\'\u027f\n\'\3(\3(\3(\2\4,\62)\2\4\6\b\n\f\16"+ - "\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLN\2\20\4\2\13"+ - "\13JN\4\2==??\3\2KL\4\2\t\t\32\32\4\2\'\'\67\67\4\2\13\13ee\3\2&\'\4\2"+ - "\13\13\17\17\3\2\37 \3\2^_\3\2`b\3\2X]\3\2#$\3\29F\u02d9\2P\3\2\2\2\4"+ - "S\3\2\2\2\6\u00b3\3\2\2\2\b\u00be\3\2\2\2\n\u00c2\3\2\2\2\f\u00d8\3\2"+ - "\2\2\16\u00da\3\2\2\2\20\u00de\3\2\2\2\22\u00fa\3\2\2\2\24\u0104\3\2\2"+ - "\2\26\u010e\3\2\2\2\30\u011d\3\2\2\2\32\u011f\3\2\2\2\34\u0125\3\2\2\2"+ - "\36\u0127\3\2\2\2 \u012e\3\2\2\2\"\u0140\3\2\2\2$\u0151\3\2\2\2&\u0161"+ - "\3\2\2\2(\u017c\3\2\2\2*\u017e\3\2\2\2,\u01af\3\2\2\2.\u01bc\3\2\2\2\60"+ - "\u01e9\3\2\2\2\62\u01ef\3\2\2\2\64\u0234\3\2\2\2\66\u023c\3\2\2\28\u024b"+ - "\3\2\2\2:\u024d\3\2\2\2<\u024f\3\2\2\2>\u0251\3\2\2\2@\u0253\3\2\2\2B"+ - "\u0258\3\2\2\2D\u026d\3\2\2\2F\u0271\3\2\2\2H\u0275\3\2\2\2J\u027a\3\2"+ - "\2\2L\u027e\3\2\2\2N\u0280\3\2\2\2PQ\5\6\4\2QR\7\2\2\3R\3\3\2\2\2ST\5"+ - "*\26\2TU\7\2\2\3U\5\3\2\2\2V\u00b4\5\b\5\2We\79\2\2Xa\7\3\2\2YZ\7I\2\2"+ - "Z`\t\2\2\2[\\\7;\2\2\\`\t\3\2\2]^\7>\2\2^`\5<\37\2_Y\3\2\2\2_[\3\2\2\2"+ - "_]\3\2\2\2`c\3\2\2\2a_\3\2\2\2ab\3\2\2\2bd\3\2\2\2ca\3\2\2\2df\7\4\2\2"+ - "eX\3\2\2\2ef\3\2\2\2fg\3\2\2\2g\u00b4\5\6\4\2ht\7H\2\2ip\7\3\2\2jk\7I"+ - "\2\2ko\t\4\2\2lm\7;\2\2mo\t\3\2\2nj\3\2\2\2nl\3\2\2\2or\3\2\2\2pn\3\2"+ - "\2\2pq\3\2\2\2qs\3\2\2\2rp\3\2\2\2su\7\4\2\2ti\3\2\2\2tu\3\2\2\2uv\3\2"+ - "\2\2v\u00b4\5\6\4\2wx\7B\2\2x{\7C\2\2yz\t\5\2\2z|\5F$\2{y\3\2\2\2{|\3"+ - "\2\2\2|\u0081\3\2\2\2}\177\7\37\2\2~}\3\2\2\2~\177\3\2\2\2\177\u0080\3"+ - "\2\2\2\u0080\u0082\7d\2\2\u0081~\3\2\2\2\u0081\u0082\3\2\2\2\u0082\u00b4"+ - "\3\2\2\2\u0083\u0084\7B\2\2\u0084\u0085\7D\2\2\u0085\u0086\t\5\2\2\u0086"+ - "\u00b4\5D#\2\u0087\u0088\t\6\2\2\u0088\u00b4\5D#\2\u0089\u008a\7B\2\2"+ - "\u008a\u008f\7F\2\2\u008b\u008d\7\37\2\2\u008c\u008b\3\2\2\2\u008c\u008d"+ - "\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u0090\7d\2\2\u008f\u008c\3\2\2\2\u008f"+ - "\u0090\3\2\2\2\u0090\u00b4\3\2\2\2\u0091\u0092\7B\2\2\u0092\u00b4\7S\2"+ - "\2\u0093\u0094\7B\2\2\u0094\u009b\7R\2\2\u0095\u009c\5F$\2\u0096\u0098"+ - "\7\37\2\2\u0097\u0096\3\2\2\2\u0097\u0098\3\2\2\2\u0098\u0099\3\2\2\2"+ - "\u0099\u009c\7d\2\2\u009a\u009c\7\13\2\2\u009b\u0095\3\2\2\2\u009b\u0097"+ - "\3\2\2\2\u009b\u009a\3\2\2\2\u009c\u00b4\3\2\2\2\u009d\u009f\7P\2\2\u009e"+ - "\u00a0\7R\2\2\u009f\u009e\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0\u00a1\3\2"+ - "\2\2\u00a1\u00a3\5F$\2\u00a2\u00a4\7X\2\2\u00a3\u00a2\3\2\2\2\u00a3\u00a4"+ - "\3\2\2\2\u00a4\u00a5\3\2\2\2\u00a5\u00a6\58\35\2\u00a6\u00b4\3\2\2\2\u00a7"+ - "\u00a9\7Q\2\2\u00a8\u00aa\7R\2\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2"+ - "\2\u00aa\u00b1\3\2\2\2\u00ab\u00b2\5F$\2\u00ac\u00ae\7\37\2\2\u00ad\u00ac"+ - "\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00af\3\2\2\2\u00af\u00b2\7d\2\2\u00b0"+ - "\u00b2\7\13\2\2\u00b1\u00ab\3\2\2\2\u00b1\u00ad\3\2\2\2\u00b1\u00b0\3"+ - "\2\2\2\u00b2\u00b4\3\2\2\2\u00b3V\3\2\2\2\u00b3W\3\2\2\2\u00b3h\3\2\2"+ - "\2\u00b3w\3\2\2\2\u00b3\u0083\3\2\2\2\u00b3\u0087\3\2\2\2\u00b3\u0089"+ - "\3\2\2\2\u00b3\u0091\3\2\2\2\u00b3\u0093\3\2\2\2\u00b3\u009d\3\2\2\2\u00b3"+ - "\u00a7\3\2\2\2\u00b4\7\3\2\2\2\u00b5\u00b6\7\64\2\2\u00b6\u00bb\5\32\16"+ - "\2\u00b7\u00b8\7\5\2\2\u00b8\u00ba\5\32\16\2\u00b9\u00b7\3\2\2\2\u00ba"+ - "\u00bd\3\2\2\2\u00bb\u00b9\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00bf\3\2"+ - "\2\2\u00bd\u00bb\3\2\2\2\u00be\u00b5\3\2\2\2\u00be\u00bf\3\2\2\2\u00bf"+ - "\u00c0\3\2\2\2\u00c0\u00c1\5\n\6\2\u00c1\t\3\2\2\2\u00c2\u00cd\5\f\7\2"+ - "\u00c3\u00c4\7\25\2\2\u00c4\u00c5\7\22\2\2\u00c5\u00ca\5\16\b\2\u00c6"+ - "\u00c7\7\5\2\2\u00c7\u00c9\5\16\b\2\u00c8\u00c6\3\2\2\2\u00c9\u00cc\3"+ - "\2\2\2\u00ca\u00c8\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\u00ce\3\2\2\2\u00cc"+ - "\u00ca\3\2\2\2\u00cd\u00c3\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\u00d1\3\2"+ - "\2\2\u00cf\u00d0\7\27\2\2\u00d0\u00d2\t\7\2\2\u00d1\u00cf\3\2\2\2\u00d1"+ - "\u00d2\3\2\2\2\u00d2\13\3\2\2\2\u00d3\u00d9\5\20\t\2\u00d4\u00d5\7\3\2"+ - "\2\u00d5\u00d6\5\n\6\2\u00d6\u00d7\7\4\2\2\u00d7\u00d9\3\2\2\2\u00d8\u00d3"+ - "\3\2\2\2\u00d8\u00d4\3\2\2\2\u00d9\r\3\2\2\2\u00da\u00dc\5*\26\2\u00db"+ - "\u00dd\t\b\2\2\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\17\3\2\2"+ - "\2\u00de\u00e0\7\b\2\2\u00df\u00e1\5\34\17\2\u00e0\u00df\3\2\2\2\u00e0"+ - "\u00e1\3\2\2\2\u00e1\u00e2\3\2\2\2\u00e2\u00e7\5\36\20\2\u00e3\u00e4\7"+ - "\5\2\2\u00e4\u00e6\5\36\20\2\u00e5\u00e3\3\2\2\2\u00e6\u00e9\3\2\2\2\u00e7"+ - "\u00e5\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\u00eb\3\2\2\2\u00e9\u00e7\3\2"+ - "\2\2\u00ea\u00ec\5\22\n\2\u00eb\u00ea\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec"+ - "\u00ef\3\2\2\2\u00ed\u00ee\7\20\2\2\u00ee\u00f0\5,\27\2\u00ef\u00ed\3"+ - "\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f4\3\2\2\2\u00f1\u00f2\7\21\2\2\u00f2"+ - "\u00f3\7\22\2\2\u00f3\u00f5\5\24\13\2\u00f4\u00f1\3\2\2\2\u00f4\u00f5"+ - "\3\2\2\2\u00f5\u00f8\3\2\2\2\u00f6\u00f7\7\26\2\2\u00f7\u00f9\5,\27\2"+ - "\u00f8\u00f6\3\2\2\2\u00f8\u00f9\3\2\2\2\u00f9\21\3\2\2\2\u00fa\u00fb"+ - "\7\t\2\2\u00fb\u0100\5 \21\2\u00fc\u00fd\7\5\2\2\u00fd\u00ff\5 \21\2\u00fe"+ - "\u00fc\3\2\2\2\u00ff\u0102\3\2\2\2\u0100\u00fe\3\2\2\2\u0100\u0101\3\2"+ - "\2\2\u0101\23\3\2\2\2\u0102\u0100\3\2\2\2\u0103\u0105\5\34\17\2\u0104"+ - "\u0103\3\2\2\2\u0104\u0105\3\2\2\2\u0105\u0106\3\2\2\2\u0106\u010b\5\26"+ - "\f\2\u0107\u0108\7\5\2\2\u0108\u010a\5\26\f\2\u0109\u0107\3\2\2\2\u010a"+ - "\u010d\3\2\2\2\u010b\u0109\3\2\2\2\u010b\u010c\3\2\2\2\u010c\25\3\2\2"+ - "\2\u010d\u010b\3\2\2\2\u010e\u010f\5\30\r\2\u010f\27\3\2\2\2\u0110\u0119"+ - "\7\3\2\2\u0111\u0116\5*\26\2\u0112\u0113\7\5\2\2\u0113\u0115\5*\26\2\u0114"+ - "\u0112\3\2\2\2\u0115\u0118\3\2\2\2\u0116\u0114\3\2\2\2\u0116\u0117\3\2"+ - "\2\2\u0117\u011a\3\2\2\2\u0118\u0116\3\2\2\2\u0119\u0111\3\2\2\2\u0119"+ - "\u011a\3\2\2\2\u011a\u011b\3\2\2\2\u011b\u011e\7\4\2\2\u011c\u011e\5*"+ - "\26\2\u011d\u0110\3\2\2\2\u011d\u011c\3\2\2\2\u011e\31\3\2\2\2\u011f\u0120"+ - "\5F$\2\u0120\u0121\7\n\2\2\u0121\u0122\7\3\2\2\u0122\u0123\5\n\6\2\u0123"+ - "\u0124\7\4\2\2\u0124\33\3\2\2\2\u0125\u0126\t\t\2\2\u0126\35\3\2\2\2\u0127"+ - "\u012c\5*\26\2\u0128\u012a\7\n\2\2\u0129\u0128\3\2\2\2\u0129\u012a\3\2"+ - "\2\2\u012a\u012b\3\2\2\2\u012b\u012d\5F$\2\u012c\u0129\3\2\2\2\u012c\u012d"+ - "\3\2\2\2\u012d\37\3\2\2\2\u012e\u0132\5(\25\2\u012f\u0131\5\"\22\2\u0130"+ - "\u012f\3\2\2\2\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2"+ - "\2\2\u0133!\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\5$\23\2\u0136\u0137"+ - "\7*\2\2\u0137\u0139\5(\25\2\u0138\u013a\5&\24\2\u0139\u0138\3\2\2\2\u0139"+ - "\u013a\3\2\2\2\u013a\u0141\3\2\2\2\u013b\u013c\7\61\2\2\u013c\u013d\5"+ - "$\23\2\u013d\u013e\7*\2\2\u013e\u013f\5(\25\2\u013f\u0141\3\2\2\2\u0140"+ - "\u0135\3\2\2\2\u0140\u013b\3\2\2\2\u0141#\3\2\2\2\u0142\u0144\7-\2\2\u0143"+ - "\u0142\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u0152\3\2\2\2\u0145\u0147\7."+ - "\2\2\u0146\u0148\7,\2\2\u0147\u0146\3\2\2\2\u0147\u0148\3\2\2\2\u0148"+ - "\u0152\3\2\2\2\u0149\u014b\7/\2\2\u014a\u014c\7,\2\2\u014b\u014a\3\2\2"+ - "\2\u014b\u014c\3\2\2\2\u014c\u0152\3\2\2\2\u014d\u014f\7\60\2\2\u014e"+ - "\u0150\7,\2\2\u014f\u014e\3\2\2\2\u014f\u0150\3\2\2\2\u0150\u0152\3\2"+ - "\2\2\u0151\u0143\3\2\2\2\u0151\u0145\3\2\2\2\u0151\u0149\3\2\2\2\u0151"+ - "\u014d\3\2\2\2\u0152%\3\2\2\2\u0153\u0154\7\63\2\2\u0154\u0162\5,\27\2"+ - "\u0155\u0156\7\62\2\2\u0156\u0157\7\3\2\2\u0157\u015c\5F$\2\u0158\u0159"+ - "\7\5\2\2\u0159\u015b\5F$\2\u015a\u0158\3\2\2\2\u015b\u015e\3\2\2\2\u015c"+ - "\u015a\3\2\2\2\u015c\u015d\3\2\2\2\u015d\u015f\3\2\2\2\u015e\u015c\3\2"+ - "\2\2\u015f\u0160\7\4\2\2\u0160\u0162\3\2\2\2\u0161\u0153\3\2\2\2\u0161"+ - "\u0155\3\2\2\2\u0162\'\3\2\2\2\u0163\u0168\5D#\2\u0164\u0166\7\n\2\2\u0165"+ - "\u0164\3\2\2\2\u0165\u0166\3\2\2\2\u0166\u0167\3\2\2\2\u0167\u0169\5B"+ - "\"\2\u0168\u0165\3\2\2\2\u0168\u0169\3\2\2\2\u0169\u017d\3\2\2\2\u016a"+ - "\u016b\7\3\2\2\u016b\u016c\5\n\6\2\u016c\u0171\7\4\2\2\u016d\u016f\7\n"+ - "\2\2\u016e\u016d\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u0170\3\2\2\2\u0170"+ - "\u0172\5B\"\2\u0171\u016e\3\2\2\2\u0171\u0172\3\2\2\2\u0172\u017d\3\2"+ - "\2\2\u0173\u0174\7\3\2\2\u0174\u0175\5 \21\2\u0175\u017a\7\4\2\2\u0176"+ - "\u0178\7\n\2\2\u0177\u0176\3\2\2\2\u0177\u0178\3\2\2\2\u0178\u0179\3\2"+ - "\2\2\u0179\u017b\5B\"\2\u017a\u0177\3\2\2\2\u017a\u017b\3\2\2\2\u017b"+ - "\u017d\3\2\2\2\u017c\u0163\3\2\2\2\u017c\u016a\3\2\2\2\u017c\u0173\3\2"+ - "\2\2\u017d)\3\2\2\2\u017e\u017f\5,\27\2\u017f+\3\2\2\2\u0180\u0181\b\27"+ - "\1\2\u0181\u0182\7\33\2\2\u0182\u01b0\5,\27\t\u0183\u01b0\5.\30\2\u0184"+ - "\u0185\7\35\2\2\u0185\u0186\7\3\2\2\u0186\u0187\5\b\5\2\u0187\u0188\7"+ - "\4\2\2\u0188\u01b0\3\2\2\2\u0189\u018a\7U\2\2\u018a\u018b\7\3\2\2\u018b"+ - "\u0190\7d\2\2\u018c\u018d\7\5\2\2\u018d\u018f\7d\2\2\u018e\u018c\3\2\2"+ - "\2\u018f\u0192\3\2\2\2\u0190\u018e\3\2\2\2\u0190\u0191\3\2\2\2\u0191\u0193"+ - "\3\2\2\2\u0192\u0190\3\2\2\2\u0193\u01b0\7\4\2\2\u0194\u0195\7V\2\2\u0195"+ - "\u0196\7\3\2\2\u0196\u0197\5B\"\2\u0197\u0198\7\5\2\2\u0198\u019d\7d\2"+ - "\2\u0199\u019a\7\5\2\2\u019a\u019c\7d\2\2\u019b\u0199\3\2\2\2\u019c\u019f"+ - "\3\2\2\2\u019d\u019b\3\2\2\2\u019d\u019e\3\2\2\2\u019e\u01a0\3\2\2\2\u019f"+ - "\u019d\3\2\2\2\u01a0\u01a1\7\4\2\2\u01a1\u01b0\3\2\2\2\u01a2\u01a3\7V"+ - "\2\2\u01a3\u01a4\7\3\2\2\u01a4\u01a5\7d\2\2\u01a5\u01a6\7\5\2\2\u01a6"+ - "\u01ab\7d\2\2\u01a7\u01a8\7\5\2\2\u01a8\u01aa\7d\2\2\u01a9\u01a7\3\2\2"+ - "\2\u01aa\u01ad\3\2\2\2\u01ab\u01a9\3\2\2\2\u01ab\u01ac\3\2\2\2\u01ac\u01ae"+ - "\3\2\2\2\u01ad\u01ab\3\2\2\2\u01ae\u01b0\7\4\2\2\u01af\u0180\3\2\2\2\u01af"+ - "\u0183\3\2\2\2\u01af\u0184\3\2\2\2\u01af\u0189\3\2\2\2\u01af\u0194\3\2"+ - "\2\2\u01af\u01a2\3\2\2\2\u01b0\u01b9\3\2\2\2\u01b1\u01b2\f\b\2\2\u01b2"+ - "\u01b3\7\31\2\2\u01b3\u01b8\5,\27\t\u01b4\u01b5\f\7\2\2\u01b5\u01b6\7"+ - "\30\2\2\u01b6\u01b8\5,\27\b\u01b7\u01b1\3\2\2\2\u01b7\u01b4\3\2\2\2\u01b8"+ - "\u01bb\3\2\2\2\u01b9\u01b7\3\2\2\2\u01b9\u01ba\3\2\2\2\u01ba-\3\2\2\2"+ - "\u01bb\u01b9\3\2\2\2\u01bc\u01be\5\62\32\2\u01bd\u01bf\5\60\31\2\u01be"+ - "\u01bd\3\2\2\2\u01be\u01bf\3\2\2\2\u01bf/\3\2\2\2\u01c0\u01c2\7\33\2\2"+ - "\u01c1\u01c0\3\2\2\2\u01c1\u01c2\3\2\2\2\u01c2\u01c3\3\2\2\2\u01c3\u01c4"+ - "\7\36\2\2\u01c4\u01c5\5\62\32\2\u01c5\u01c6\7\31\2\2\u01c6\u01c7\5\62"+ - "\32\2\u01c7\u01ea\3\2\2\2\u01c8\u01ca\7\33\2\2\u01c9\u01c8\3\2\2\2\u01c9"+ - "\u01ca\3\2\2\2\u01ca\u01cb\3\2\2\2\u01cb\u01cc\7\32\2\2\u01cc\u01cd\7"+ - "\3\2\2\u01cd\u01d2\5*\26\2\u01ce\u01cf\7\5\2\2\u01cf\u01d1\5*\26\2\u01d0"+ - "\u01ce\3\2\2\2\u01d1\u01d4\3\2\2\2\u01d2\u01d0\3\2\2\2\u01d2\u01d3\3\2"+ - "\2\2\u01d3\u01d5\3\2\2\2\u01d4\u01d2\3\2\2\2\u01d5\u01d6\7\4\2\2\u01d6"+ - "\u01ea\3\2\2\2\u01d7\u01d9\7\33\2\2\u01d8\u01d7\3\2\2\2\u01d8\u01d9\3"+ - "\2\2\2\u01d9\u01da\3\2\2\2\u01da\u01db\7\32\2\2\u01db\u01dc\7\3\2\2\u01dc"+ - "\u01dd\5\b\5\2\u01dd\u01de\7\4\2\2\u01de\u01ea\3\2\2\2\u01df\u01e1\7\33"+ - "\2\2\u01e0\u01df\3\2\2\2\u01e0\u01e1\3\2\2\2\u01e1\u01e2\3\2\2\2\u01e2"+ - "\u01e3\t\n\2\2\u01e3\u01ea\5\62\32\2\u01e4\u01e6\7!\2\2\u01e5\u01e7\7"+ - "\33\2\2\u01e6\u01e5\3\2\2\2\u01e6\u01e7\3\2\2\2\u01e7\u01e8\3\2\2\2\u01e8"+ - "\u01ea\7\"\2\2\u01e9\u01c1\3\2\2\2\u01e9\u01c9\3\2\2\2\u01e9\u01d8\3\2"+ - "\2\2\u01e9\u01e0\3\2\2\2\u01e9\u01e4\3\2\2\2\u01ea\61\3\2\2\2\u01eb\u01ec"+ - "\b\32\1\2\u01ec\u01ed\t\13\2\2\u01ed\u01f0\5\62\32\6\u01ee\u01f0\5\64"+ - "\33\2\u01ef\u01eb\3\2\2\2\u01ef\u01ee\3\2\2\2\u01f0\u01fd\3\2\2\2\u01f1"+ - "\u01f2\f\5\2\2\u01f2\u01f3\t\f\2\2\u01f3\u01fc\5\62\32\6\u01f4\u01f5\f"+ - "\4\2\2\u01f5\u01f6\t\13\2\2\u01f6\u01fc\5\62\32\5\u01f7\u01f8\f\3\2\2"+ - "\u01f8\u01f9\5:\36\2\u01f9\u01fa\5\62\32\4\u01fa\u01fc\3\2\2\2\u01fb\u01f1"+ - "\3\2\2\2\u01fb\u01f4\3\2\2\2\u01fb\u01f7\3\2\2\2\u01fc\u01ff\3\2\2\2\u01fd"+ - "\u01fb\3\2\2\2\u01fd\u01fe\3\2\2\2\u01fe\63\3\2\2\2\u01ff\u01fd\3\2\2"+ - "\2\u0200\u0235\58\35\2\u0201\u0235\7`\2\2\u0202\u0203\5\66\34\2\u0203"+ - "\u0204\7\6\2\2\u0204\u0206\3\2\2\2\u0205\u0202\3\2\2\2\u0205\u0206\3\2"+ - "\2\2\u0206\u0207\3\2\2\2\u0207\u0235\7`\2\2\u0208\u0209\5F$\2\u0209\u0215"+ - "\7\3\2\2\u020a\u020c\5\34\17\2\u020b\u020a\3\2\2\2\u020b\u020c\3\2\2\2"+ - "\u020c\u020d\3\2\2\2\u020d\u0212\5*\26\2\u020e\u020f\7\5\2\2\u020f\u0211"+ - "\5*\26\2\u0210\u020e\3\2\2\2\u0211\u0214\3\2\2\2\u0212\u0210\3\2\2\2\u0212"+ - "\u0213\3\2\2\2\u0213\u0216\3\2\2\2\u0214\u0212\3\2\2\2\u0215\u020b\3\2"+ - "\2\2\u0215\u0216\3\2\2\2\u0216\u0217\3\2\2\2\u0217\u0218\7\4\2\2\u0218"+ - "\u0235\3\2\2\2\u0219\u021a\7\3\2\2\u021a\u021b\5\b\5\2\u021b\u021c\7\4"+ - "\2\2\u021c\u0235\3\2\2\2\u021d\u0235\5\66\34\2\u021e\u021f\5\66\34\2\u021f"+ - "\u0220\7\6\2\2\u0220\u0221\5F$\2\u0221\u0235\3\2\2\2\u0222\u0223\7\3\2"+ - "\2\u0223\u0224\5*\26\2\u0224\u0225\7\4\2\2\u0225\u0235\3\2\2\2\u0226\u0227"+ - "\7W\2\2\u0227\u0228\7\3\2\2\u0228\u0229\5*\26\2\u0229\u022a\7\n\2\2\u022a"+ - "\u022b\5> \2\u022b\u022c\7\4\2\2\u022c\u0235\3\2\2\2\u022d\u022e\7T\2"+ - "\2\u022e\u022f\7\3\2\2\u022f\u0230\5F$\2\u0230\u0231\7\t\2\2\u0231\u0232"+ - "\5\62\32\2\u0232\u0233\7\4\2\2\u0233\u0235\3\2\2\2\u0234\u0200\3\2\2\2"+ - "\u0234\u0201\3\2\2\2\u0234\u0205\3\2\2\2\u0234\u0208\3\2\2\2\u0234\u0219"+ - "\3\2\2\2\u0234\u021d\3\2\2\2\u0234\u021e\3\2\2\2\u0234\u0222\3\2\2\2\u0234"+ - "\u0226\3\2\2\2\u0234\u022d\3\2\2\2\u0235\65\3\2\2\2\u0236\u0239\5F$\2"+ - "\u0237\u0239\5D#\2\u0238\u0236\3\2\2\2\u0238\u0237\3\2\2\2\u0239\u023a"+ - "\3\2\2\2\u023a\u023b\7\6\2\2\u023b\u023d\3\2\2\2\u023c\u0238\3\2\2\2\u023c"+ - "\u023d\3\2\2\2\u023d\u023e\3\2\2\2\u023e\u023f\5F$\2\u023f\67\3\2\2\2"+ - "\u0240\u024c\7\"\2\2\u0241\u0242\5F$\2\u0242\u0243\7d\2\2\u0243\u024c"+ - "\3\2\2\2\u0244\u024c\5L\'\2\u0245\u024c\5<\37\2\u0246\u0248\7d\2\2\u0247"+ - "\u0246\3\2\2\2\u0248\u0249\3\2\2\2\u0249\u0247\3\2\2\2\u0249\u024a\3\2"+ - "\2\2\u024a\u024c\3\2\2\2\u024b\u0240\3\2\2\2\u024b\u0241\3\2\2\2\u024b"+ - "\u0244\3\2\2\2\u024b\u0245\3\2\2\2\u024b\u0247\3\2\2\2\u024c9\3\2\2\2"+ - "\u024d\u024e\t\r\2\2\u024e;\3\2\2\2\u024f\u0250\t\16\2\2\u0250=\3\2\2"+ - "\2\u0251\u0252\5F$\2\u0252?\3\2\2\2\u0253\u0254\7\f\2\2\u0254\u0255\5"+ - "*\26\2\u0255\u0256\7\r\2\2\u0256\u0257\5*\26\2\u0257A\3\2\2\2\u0258\u025d"+ - "\5F$\2\u0259\u025a\7\6\2\2\u025a\u025c\5F$\2\u025b\u0259\3\2\2\2\u025c"+ - "\u025f\3\2\2\2\u025d\u025b\3\2\2\2\u025d\u025e\3\2\2\2\u025eC\3\2\2\2"+ - "\u025f\u025d\3\2\2\2\u0260\u0263\5F$\2\u0261\u0262\7\6\2\2\u0262\u0264"+ - "\5F$\2\u0263\u0261\3\2\2\2\u0263\u0264\3\2\2\2\u0264\u026e\3\2\2\2\u0265"+ - "\u0266\7\7\2\2\u0266\u0269\5J&\2\u0267\u0268\7\6\2\2\u0268\u026a\5J&\2"+ - "\u0269\u0267\3\2\2\2\u0269\u026a\3\2\2\2\u026a\u026b\3\2\2\2\u026b\u026c"+ - "\7\7\2\2\u026c\u026e\3\2\2\2\u026d\u0260\3\2\2\2\u026d\u0265\3\2\2\2\u026e"+ - "E\3\2\2\2\u026f\u0272\5H%\2\u0270\u0272\5J&\2\u0271\u026f\3\2\2\2\u0271"+ - "\u0270\3\2\2\2\u0272G\3\2\2\2\u0273\u0276\7i\2\2\u0274\u0276\7j\2\2\u0275"+ - "\u0273\3\2\2\2\u0275\u0274\3\2\2\2\u0276I\3\2\2\2\u0277\u027b\7g\2\2\u0278"+ - "\u027b\5N(\2\u0279\u027b\7h\2\2\u027a\u0277\3\2\2\2\u027a\u0278\3\2\2"+ - "\2\u027a\u0279\3\2\2\2\u027bK\3\2\2\2\u027c\u027f\7f\2\2\u027d\u027f\7"+ - "e\2\2\u027e\u027c\3\2\2\2\u027e\u027d\3\2\2\2\u027fM\3\2\2\2\u0280\u0281"+ - "\t\17\2\2\u0281O\3\2\2\2]_aenpt{~\u0081\u008c\u008f\u0097\u009b\u009f"+ - "\u00a3\u00a9\u00ad\u00b1\u00b3\u00bb\u00be\u00ca\u00cd\u00d1\u00d8\u00dc"+ - "\u00e0\u00e7\u00eb\u00ef\u00f4\u00f8\u0100\u0104\u010b\u0116\u0119\u011d"+ - "\u0129\u012c\u0132\u0139\u0140\u0143\u0147\u014b\u014f\u0151\u015c\u0161"+ - "\u0165\u0168\u016e\u0171\u0177\u017a\u017c\u0190\u019d\u01ab\u01af\u01b7"+ - "\u01b9\u01be\u01c1\u01c9\u01d2\u01d8\u01e0\u01e6\u01e9\u01ef\u01fb\u01fd"+ - "\u0205\u020b\u0212\u0215\u0234\u0238\u023c\u0249\u024b\u025d\u0263\u0269"+ - "\u026d\u0271\u0275\u027a\u027e"; + "\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\5\33\u0231"+ + "\n\33\3\34\3\34\5\34\u0235\n\34\3\34\3\34\5\34\u0239\n\34\3\34\3\34\3"+ + "\35\3\35\3\35\3\35\3\35\3\35\3\35\6\35\u0244\n\35\r\35\16\35\u0245\5\35"+ + "\u0248\n\35\3\36\3\36\3\37\3\37\3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3\"\7\"\u0258"+ + "\n\"\f\"\16\"\u025b\13\"\3#\3#\3$\3$\5$\u0261\n$\3%\3%\5%\u0265\n%\3&"+ + "\3&\3&\5&\u026a\n&\3\'\3\'\5\'\u026e\n\'\3(\3(\3(\2\4,\62)\2\4\6\b\n\f"+ + "\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLN\2\20\4\2"+ + "\n\nIM\4\2<<>>\3\2JK\4\2\b\b\31\31\4\2&&\66\66\4\2\n\ndd\3\2%&\4\2\n\n"+ + "\16\16\3\2\36\37\3\2]^\3\2_a\3\2W\\\3\2\"#\3\28E\u02c4\2P\3\2\2\2\4S\3"+ + "\2\2\2\6\u00af\3\2\2\2\b\u00ba\3\2\2\2\n\u00be\3\2\2\2\f\u00d4\3\2\2\2"+ + "\16\u00d6\3\2\2\2\20\u00da\3\2\2\2\22\u00f6\3\2\2\2\24\u0100\3\2\2\2\26"+ + "\u010a\3\2\2\2\30\u0119\3\2\2\2\32\u011b\3\2\2\2\34\u0121\3\2\2\2\36\u0123"+ + "\3\2\2\2 \u012a\3\2\2\2\"\u013c\3\2\2\2$\u014d\3\2\2\2&\u015d\3\2\2\2"+ + "(\u0178\3\2\2\2*\u017a\3\2\2\2,\u01ab\3\2\2\2.\u01b8\3\2\2\2\60\u01e5"+ + "\3\2\2\2\62\u01eb\3\2\2\2\64\u0230\3\2\2\2\66\u0238\3\2\2\28\u0247\3\2"+ + "\2\2:\u0249\3\2\2\2<\u024b\3\2\2\2>\u024d\3\2\2\2@\u024f\3\2\2\2B\u0254"+ + "\3\2\2\2D\u025c\3\2\2\2F\u0260\3\2\2\2H\u0264\3\2\2\2J\u0269\3\2\2\2L"+ + "\u026d\3\2\2\2N\u026f\3\2\2\2PQ\5\6\4\2QR\7\2\2\3R\3\3\2\2\2ST\5*\26\2"+ + "TU\7\2\2\3U\5\3\2\2\2V\u00b0\5\b\5\2We\78\2\2Xa\7\3\2\2YZ\7H\2\2Z`\t\2"+ + "\2\2[\\\7:\2\2\\`\t\3\2\2]^\7=\2\2^`\5<\37\2_Y\3\2\2\2_[\3\2\2\2_]\3\2"+ + "\2\2`c\3\2\2\2a_\3\2\2\2ab\3\2\2\2bd\3\2\2\2ca\3\2\2\2df\7\4\2\2eX\3\2"+ + "\2\2ef\3\2\2\2fg\3\2\2\2g\u00b0\5\6\4\2ht\7G\2\2ip\7\3\2\2jk\7H\2\2ko"+ + "\t\4\2\2lm\7:\2\2mo\t\3\2\2nj\3\2\2\2nl\3\2\2\2or\3\2\2\2pn\3\2\2\2pq"+ + "\3\2\2\2qs\3\2\2\2rp\3\2\2\2su\7\4\2\2ti\3\2\2\2tu\3\2\2\2uv\3\2\2\2v"+ + "\u00b0\5\6\4\2wx\7A\2\2x}\7B\2\2y{\7\36\2\2zy\3\2\2\2z{\3\2\2\2{|\3\2"+ + "\2\2|~\7c\2\2}z\3\2\2\2}~\3\2\2\2~\u00b0\3\2\2\2\177\u0080\7A\2\2\u0080"+ + "\u0081\7C\2\2\u0081\u0082\t\5\2\2\u0082\u00b0\5D#\2\u0083\u0084\t\6\2"+ + "\2\u0084\u00b0\5D#\2\u0085\u0086\7A\2\2\u0086\u008b\7E\2\2\u0087\u0089"+ + "\7\36\2\2\u0088\u0087\3\2\2\2\u0088\u0089\3\2\2\2\u0089\u008a\3\2\2\2"+ + "\u008a\u008c\7c\2\2\u008b\u0088\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u00b0"+ + "\3\2\2\2\u008d\u008e\7A\2\2\u008e\u00b0\7R\2\2\u008f\u0090\7A\2\2\u0090"+ + "\u0097\7Q\2\2\u0091\u0098\5F$\2\u0092\u0094\7\36\2\2\u0093\u0092\3\2\2"+ + "\2\u0093\u0094\3\2\2\2\u0094\u0095\3\2\2\2\u0095\u0098\7c\2\2\u0096\u0098"+ + "\7\n\2\2\u0097\u0091\3\2\2\2\u0097\u0093\3\2\2\2\u0097\u0096\3\2\2\2\u0098"+ + "\u00b0\3\2\2\2\u0099\u009b\7O\2\2\u009a\u009c\7Q\2\2\u009b\u009a\3\2\2"+ + "\2\u009b\u009c\3\2\2\2\u009c\u009d\3\2\2\2\u009d\u009f\5F$\2\u009e\u00a0"+ + "\7W\2\2\u009f\u009e\3\2\2\2\u009f\u00a0\3\2\2\2\u00a0\u00a1\3\2\2\2\u00a1"+ + "\u00a2\58\35\2\u00a2\u00b0\3\2\2\2\u00a3\u00a5\7P\2\2\u00a4\u00a6\7Q\2"+ + "\2\u00a5\u00a4\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a6\u00ad\3\2\2\2\u00a7\u00ae"+ + "\5F$\2\u00a8\u00aa\7\36\2\2\u00a9\u00a8\3\2\2\2\u00a9\u00aa\3\2\2\2\u00aa"+ + "\u00ab\3\2\2\2\u00ab\u00ae\7c\2\2\u00ac\u00ae\7\n\2\2\u00ad\u00a7\3\2"+ + "\2\2\u00ad\u00a9\3\2\2\2\u00ad\u00ac\3\2\2\2\u00ae\u00b0\3\2\2\2\u00af"+ + "V\3\2\2\2\u00afW\3\2\2\2\u00afh\3\2\2\2\u00afw\3\2\2\2\u00af\177\3\2\2"+ + "\2\u00af\u0083\3\2\2\2\u00af\u0085\3\2\2\2\u00af\u008d\3\2\2\2\u00af\u008f"+ + "\3\2\2\2\u00af\u0099\3\2\2\2\u00af\u00a3\3\2\2\2\u00b0\7\3\2\2\2\u00b1"+ + "\u00b2\7\63\2\2\u00b2\u00b7\5\32\16\2\u00b3\u00b4\7\5\2\2\u00b4\u00b6"+ + "\5\32\16\2\u00b5\u00b3\3\2\2\2\u00b6\u00b9\3\2\2\2\u00b7\u00b5\3\2\2\2"+ + "\u00b7\u00b8\3\2\2\2\u00b8\u00bb\3\2\2\2\u00b9\u00b7\3\2\2\2\u00ba\u00b1"+ + "\3\2\2\2\u00ba\u00bb\3\2\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00bd\5\n\6\2\u00bd"+ + "\t\3\2\2\2\u00be\u00c9\5\f\7\2\u00bf\u00c0\7\24\2\2\u00c0\u00c1\7\21\2"+ + "\2\u00c1\u00c6\5\16\b\2\u00c2\u00c3\7\5\2\2\u00c3\u00c5\5\16\b\2\u00c4"+ + "\u00c2\3\2\2\2\u00c5\u00c8\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c6\u00c7\3\2"+ + "\2\2\u00c7\u00ca\3\2\2\2\u00c8\u00c6\3\2\2\2\u00c9\u00bf\3\2\2\2\u00c9"+ + "\u00ca\3\2\2\2\u00ca\u00cd\3\2\2\2\u00cb\u00cc\7\26\2\2\u00cc\u00ce\t"+ + "\7\2\2\u00cd\u00cb\3\2\2\2\u00cd\u00ce\3\2\2\2\u00ce\13\3\2\2\2\u00cf"+ + "\u00d5\5\20\t\2\u00d0\u00d1\7\3\2\2\u00d1\u00d2\5\n\6\2\u00d2\u00d3\7"+ + "\4\2\2\u00d3\u00d5\3\2\2\2\u00d4\u00cf\3\2\2\2\u00d4\u00d0\3\2\2\2\u00d5"+ + "\r\3\2\2\2\u00d6\u00d8\5*\26\2\u00d7\u00d9\t\b\2\2\u00d8\u00d7\3\2\2\2"+ + "\u00d8\u00d9\3\2\2\2\u00d9\17\3\2\2\2\u00da\u00dc\7\7\2\2\u00db\u00dd"+ + "\5\34\17\2\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00de\3\2\2\2"+ + "\u00de\u00e3\5\36\20\2\u00df\u00e0\7\5\2\2\u00e0\u00e2\5\36\20\2\u00e1"+ + "\u00df\3\2\2\2\u00e2\u00e5\3\2\2\2\u00e3\u00e1\3\2\2\2\u00e3\u00e4\3\2"+ + "\2\2\u00e4\u00e7\3\2\2\2\u00e5\u00e3\3\2\2\2\u00e6\u00e8\5\22\n\2\u00e7"+ + "\u00e6\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\u00eb\3\2\2\2\u00e9\u00ea\7\17"+ + "\2\2\u00ea\u00ec\5,\27\2\u00eb\u00e9\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec"+ + "\u00f0\3\2\2\2\u00ed\u00ee\7\20\2\2\u00ee\u00ef\7\21\2\2\u00ef\u00f1\5"+ + "\24\13\2\u00f0\u00ed\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f4\3\2\2\2\u00f2"+ + "\u00f3\7\25\2\2\u00f3\u00f5\5,\27\2\u00f4\u00f2\3\2\2\2\u00f4\u00f5\3"+ + "\2\2\2\u00f5\21\3\2\2\2\u00f6\u00f7\7\b\2\2\u00f7\u00fc\5 \21\2\u00f8"+ + "\u00f9\7\5\2\2\u00f9\u00fb\5 \21\2\u00fa\u00f8\3\2\2\2\u00fb\u00fe\3\2"+ + "\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\23\3\2\2\2\u00fe\u00fc"+ + "\3\2\2\2\u00ff\u0101\5\34\17\2\u0100\u00ff\3\2\2\2\u0100\u0101\3\2\2\2"+ + "\u0101\u0102\3\2\2\2\u0102\u0107\5\26\f\2\u0103\u0104\7\5\2\2\u0104\u0106"+ + "\5\26\f\2\u0105\u0103\3\2\2\2\u0106\u0109\3\2\2\2\u0107\u0105\3\2\2\2"+ + "\u0107\u0108\3\2\2\2\u0108\25\3\2\2\2\u0109\u0107\3\2\2\2\u010a\u010b"+ + "\5\30\r\2\u010b\27\3\2\2\2\u010c\u0115\7\3\2\2\u010d\u0112\5*\26\2\u010e"+ + "\u010f\7\5\2\2\u010f\u0111\5*\26\2\u0110\u010e\3\2\2\2\u0111\u0114\3\2"+ + "\2\2\u0112\u0110\3\2\2\2\u0112\u0113\3\2\2\2\u0113\u0116\3\2\2\2\u0114"+ + "\u0112\3\2\2\2\u0115\u010d\3\2\2\2\u0115\u0116\3\2\2\2\u0116\u0117\3\2"+ + "\2\2\u0117\u011a\7\4\2\2\u0118\u011a\5*\26\2\u0119\u010c\3\2\2\2\u0119"+ + "\u0118\3\2\2\2\u011a\31\3\2\2\2\u011b\u011c\5F$\2\u011c\u011d\7\t\2\2"+ + "\u011d\u011e\7\3\2\2\u011e\u011f\5\n\6\2\u011f\u0120\7\4\2\2\u0120\33"+ + "\3\2\2\2\u0121\u0122\t\t\2\2\u0122\35\3\2\2\2\u0123\u0128\5*\26\2\u0124"+ + "\u0126\7\t\2\2\u0125\u0124\3\2\2\2\u0125\u0126\3\2\2\2\u0126\u0127\3\2"+ + "\2\2\u0127\u0129\5F$\2\u0128\u0125\3\2\2\2\u0128\u0129\3\2\2\2\u0129\37"+ + "\3\2\2\2\u012a\u012e\5(\25\2\u012b\u012d\5\"\22\2\u012c\u012b\3\2\2\2"+ + "\u012d\u0130\3\2\2\2\u012e\u012c\3\2\2\2\u012e\u012f\3\2\2\2\u012f!\3"+ + "\2\2\2\u0130\u012e\3\2\2\2\u0131\u0132\5$\23\2\u0132\u0133\7)\2\2\u0133"+ + "\u0135\5(\25\2\u0134\u0136\5&\24\2\u0135\u0134\3\2\2\2\u0135\u0136\3\2"+ + "\2\2\u0136\u013d\3\2\2\2\u0137\u0138\7\60\2\2\u0138\u0139\5$\23\2\u0139"+ + "\u013a\7)\2\2\u013a\u013b\5(\25\2\u013b\u013d\3\2\2\2\u013c\u0131\3\2"+ + "\2\2\u013c\u0137\3\2\2\2\u013d#\3\2\2\2\u013e\u0140\7,\2\2\u013f\u013e"+ + "\3\2\2\2\u013f\u0140\3\2\2\2\u0140\u014e\3\2\2\2\u0141\u0143\7-\2\2\u0142"+ + "\u0144\7+\2\2\u0143\u0142\3\2\2\2\u0143\u0144\3\2\2\2\u0144\u014e\3\2"+ + "\2\2\u0145\u0147\7.\2\2\u0146\u0148\7+\2\2\u0147\u0146\3\2\2\2\u0147\u0148"+ + "\3\2\2\2\u0148\u014e\3\2\2\2\u0149\u014b\7/\2\2\u014a\u014c\7+\2\2\u014b"+ + "\u014a\3\2\2\2\u014b\u014c\3\2\2\2\u014c\u014e\3\2\2\2\u014d\u013f\3\2"+ + "\2\2\u014d\u0141\3\2\2\2\u014d\u0145\3\2\2\2\u014d\u0149\3\2\2\2\u014e"+ + "%\3\2\2\2\u014f\u0150\7\62\2\2\u0150\u015e\5,\27\2\u0151\u0152\7\61\2"+ + "\2\u0152\u0153\7\3\2\2\u0153\u0158\5F$\2\u0154\u0155\7\5\2\2\u0155\u0157"+ + "\5F$\2\u0156\u0154\3\2\2\2\u0157\u015a\3\2\2\2\u0158\u0156\3\2\2\2\u0158"+ + "\u0159\3\2\2\2\u0159\u015b\3\2\2\2\u015a\u0158\3\2\2\2\u015b\u015c\7\4"+ + "\2\2\u015c\u015e\3\2\2\2\u015d\u014f\3\2\2\2\u015d\u0151\3\2\2\2\u015e"+ + "\'\3\2\2\2\u015f\u0164\5D#\2\u0160\u0162\7\t\2\2\u0161\u0160\3\2\2\2\u0161"+ + "\u0162\3\2\2\2\u0162\u0163\3\2\2\2\u0163\u0165\5B\"\2\u0164\u0161\3\2"+ + "\2\2\u0164\u0165\3\2\2\2\u0165\u0179\3\2\2\2\u0166\u0167\7\3\2\2\u0167"+ + "\u0168\5\n\6\2\u0168\u016d\7\4\2\2\u0169\u016b\7\t\2\2\u016a\u0169\3\2"+ + "\2\2\u016a\u016b\3\2\2\2\u016b\u016c\3\2\2\2\u016c\u016e\5B\"\2\u016d"+ + "\u016a\3\2\2\2\u016d\u016e\3\2\2\2\u016e\u0179\3\2\2\2\u016f\u0170\7\3"+ + "\2\2\u0170\u0171\5 \21\2\u0171\u0176\7\4\2\2\u0172\u0174\7\t\2\2\u0173"+ + "\u0172\3\2\2\2\u0173\u0174\3\2\2\2\u0174\u0175\3\2\2\2\u0175\u0177\5B"+ + "\"\2\u0176\u0173\3\2\2\2\u0176\u0177\3\2\2\2\u0177\u0179\3\2\2\2\u0178"+ + "\u015f\3\2\2\2\u0178\u0166\3\2\2\2\u0178\u016f\3\2\2\2\u0179)\3\2\2\2"+ + "\u017a\u017b\5,\27\2\u017b+\3\2\2\2\u017c\u017d\b\27\1\2\u017d\u017e\7"+ + "\32\2\2\u017e\u01ac\5,\27\t\u017f\u01ac\5.\30\2\u0180\u0181\7\34\2\2\u0181"+ + "\u0182\7\3\2\2\u0182\u0183\5\b\5\2\u0183\u0184\7\4\2\2\u0184\u01ac\3\2"+ + "\2\2\u0185\u0186\7T\2\2\u0186\u0187\7\3\2\2\u0187\u018c\7c\2\2\u0188\u0189"+ + "\7\5\2\2\u0189\u018b\7c\2\2\u018a\u0188\3\2\2\2\u018b\u018e\3\2\2\2\u018c"+ + "\u018a\3\2\2\2\u018c\u018d\3\2\2\2\u018d\u018f\3\2\2\2\u018e\u018c\3\2"+ + "\2\2\u018f\u01ac\7\4\2\2\u0190\u0191\7U\2\2\u0191\u0192\7\3\2\2\u0192"+ + "\u0193\5B\"\2\u0193\u0194\7\5\2\2\u0194\u0199\7c\2\2\u0195\u0196\7\5\2"+ + "\2\u0196\u0198\7c\2\2\u0197\u0195\3\2\2\2\u0198\u019b\3\2\2\2\u0199\u0197"+ + "\3\2\2\2\u0199\u019a\3\2\2\2\u019a\u019c\3\2\2\2\u019b\u0199\3\2\2\2\u019c"+ + "\u019d\7\4\2\2\u019d\u01ac\3\2\2\2\u019e\u019f\7U\2\2\u019f\u01a0\7\3"+ + "\2\2\u01a0\u01a1\7c\2\2\u01a1\u01a2\7\5\2\2\u01a2\u01a7\7c\2\2\u01a3\u01a4"+ + "\7\5\2\2\u01a4\u01a6\7c\2\2\u01a5\u01a3\3\2\2\2\u01a6\u01a9\3\2\2\2\u01a7"+ + "\u01a5\3\2\2\2\u01a7\u01a8\3\2\2\2\u01a8\u01aa\3\2\2\2\u01a9\u01a7\3\2"+ + "\2\2\u01aa\u01ac\7\4\2\2\u01ab\u017c\3\2\2\2\u01ab\u017f\3\2\2\2\u01ab"+ + "\u0180\3\2\2\2\u01ab\u0185\3\2\2\2\u01ab\u0190\3\2\2\2\u01ab\u019e\3\2"+ + "\2\2\u01ac\u01b5\3\2\2\2\u01ad\u01ae\f\b\2\2\u01ae\u01af\7\30\2\2\u01af"+ + "\u01b4\5,\27\t\u01b0\u01b1\f\7\2\2\u01b1\u01b2\7\27\2\2\u01b2\u01b4\5"+ + ",\27\b\u01b3\u01ad\3\2\2\2\u01b3\u01b0\3\2\2\2\u01b4\u01b7\3\2\2\2\u01b5"+ + "\u01b3\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6-\3\2\2\2\u01b7\u01b5\3\2\2\2"+ + "\u01b8\u01ba\5\62\32\2\u01b9\u01bb\5\60\31\2\u01ba\u01b9\3\2\2\2\u01ba"+ + "\u01bb\3\2\2\2\u01bb/\3\2\2\2\u01bc\u01be\7\32\2\2\u01bd\u01bc\3\2\2\2"+ + "\u01bd\u01be\3\2\2\2\u01be\u01bf\3\2\2\2\u01bf\u01c0\7\35\2\2\u01c0\u01c1"+ + "\5\62\32\2\u01c1\u01c2\7\30\2\2\u01c2\u01c3\5\62\32\2\u01c3\u01e6\3\2"+ + "\2\2\u01c4\u01c6\7\32\2\2\u01c5\u01c4\3\2\2\2\u01c5\u01c6\3\2\2\2\u01c6"+ + "\u01c7\3\2\2\2\u01c7\u01c8\7\31\2\2\u01c8\u01c9\7\3\2\2\u01c9\u01ce\5"+ + "*\26\2\u01ca\u01cb\7\5\2\2\u01cb\u01cd\5*\26\2\u01cc\u01ca\3\2\2\2\u01cd"+ + "\u01d0\3\2\2\2\u01ce\u01cc\3\2\2\2\u01ce\u01cf\3\2\2\2\u01cf\u01d1\3\2"+ + "\2\2\u01d0\u01ce\3\2\2\2\u01d1\u01d2\7\4\2\2\u01d2\u01e6\3\2\2\2\u01d3"+ + "\u01d5\7\32\2\2\u01d4\u01d3\3\2\2\2\u01d4\u01d5\3\2\2\2\u01d5\u01d6\3"+ + "\2\2\2\u01d6\u01d7\7\31\2\2\u01d7\u01d8\7\3\2\2\u01d8\u01d9\5\b\5\2\u01d9"+ + "\u01da\7\4\2\2\u01da\u01e6\3\2\2\2\u01db\u01dd\7\32\2\2\u01dc\u01db\3"+ + "\2\2\2\u01dc\u01dd\3\2\2\2\u01dd\u01de\3\2\2\2\u01de\u01df\t\n\2\2\u01df"+ + "\u01e6\5\62\32\2\u01e0\u01e2\7 \2\2\u01e1\u01e3\7\32\2\2\u01e2\u01e1\3"+ + "\2\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e4\3\2\2\2\u01e4\u01e6\7!\2\2\u01e5"+ + "\u01bd\3\2\2\2\u01e5\u01c5\3\2\2\2\u01e5\u01d4\3\2\2\2\u01e5\u01dc\3\2"+ + "\2\2\u01e5\u01e0\3\2\2\2\u01e6\61\3\2\2\2\u01e7\u01e8\b\32\1\2\u01e8\u01e9"+ + "\t\13\2\2\u01e9\u01ec\5\62\32\6\u01ea\u01ec\5\64\33\2\u01eb\u01e7\3\2"+ + "\2\2\u01eb\u01ea\3\2\2\2\u01ec\u01f9\3\2\2\2\u01ed\u01ee\f\5\2\2\u01ee"+ + "\u01ef\t\f\2\2\u01ef\u01f8\5\62\32\6\u01f0\u01f1\f\4\2\2\u01f1\u01f2\t"+ + "\13\2\2\u01f2\u01f8\5\62\32\5\u01f3\u01f4\f\3\2\2\u01f4\u01f5\5:\36\2"+ + "\u01f5\u01f6\5\62\32\4\u01f6\u01f8\3\2\2\2\u01f7\u01ed\3\2\2\2\u01f7\u01f0"+ + "\3\2\2\2\u01f7\u01f3\3\2\2\2\u01f8\u01fb\3\2\2\2\u01f9\u01f7\3\2\2\2\u01f9"+ + "\u01fa\3\2\2\2\u01fa\63\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fc\u0231\58\35"+ + "\2\u01fd\u0231\7_\2\2\u01fe\u01ff\5\66\34\2\u01ff\u0200\7\6\2\2\u0200"+ + "\u0202\3\2\2\2\u0201\u01fe\3\2\2\2\u0201\u0202\3\2\2\2\u0202\u0203\3\2"+ + "\2\2\u0203\u0231\7_\2\2\u0204\u0205\5F$\2\u0205\u0211\7\3\2\2\u0206\u0208"+ + "\5\34\17\2\u0207\u0206\3\2\2\2\u0207\u0208\3\2\2\2\u0208\u0209\3\2\2\2"+ + "\u0209\u020e\5*\26\2\u020a\u020b\7\5\2\2\u020b\u020d\5*\26\2\u020c\u020a"+ + "\3\2\2\2\u020d\u0210\3\2\2\2\u020e\u020c\3\2\2\2\u020e\u020f\3\2\2\2\u020f"+ + "\u0212\3\2\2\2\u0210\u020e\3\2\2\2\u0211\u0207\3\2\2\2\u0211\u0212\3\2"+ + "\2\2\u0212\u0213\3\2\2\2\u0213\u0214\7\4\2\2\u0214\u0231\3\2\2\2\u0215"+ + "\u0216\7\3\2\2\u0216\u0217\5\b\5\2\u0217\u0218\7\4\2\2\u0218\u0231\3\2"+ + "\2\2\u0219\u0231\5\66\34\2\u021a\u021b\5\66\34\2\u021b\u021c\7\6\2\2\u021c"+ + "\u021d\5F$\2\u021d\u0231\3\2\2\2\u021e\u021f\7\3\2\2\u021f\u0220\5*\26"+ + "\2\u0220\u0221\7\4\2\2\u0221\u0231\3\2\2\2\u0222\u0223\7V\2\2\u0223\u0224"+ + "\7\3\2\2\u0224\u0225\5*\26\2\u0225\u0226\7\t\2\2\u0226\u0227\5> \2\u0227"+ + "\u0228\7\4\2\2\u0228\u0231\3\2\2\2\u0229\u022a\7S\2\2\u022a\u022b\7\3"+ + "\2\2\u022b\u022c\5F$\2\u022c\u022d\7\b\2\2\u022d\u022e\5\62\32\2\u022e"+ + "\u022f\7\4\2\2\u022f\u0231\3\2\2\2\u0230\u01fc\3\2\2\2\u0230\u01fd\3\2"+ + "\2\2\u0230\u0201\3\2\2\2\u0230\u0204\3\2\2\2\u0230\u0215\3\2\2\2\u0230"+ + "\u0219\3\2\2\2\u0230\u021a\3\2\2\2\u0230\u021e\3\2\2\2\u0230\u0222\3\2"+ + "\2\2\u0230\u0229\3\2\2\2\u0231\65\3\2\2\2\u0232\u0235\5F$\2\u0233\u0235"+ + "\5D#\2\u0234\u0232\3\2\2\2\u0234\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236"+ + "\u0237\7\6\2\2\u0237\u0239\3\2\2\2\u0238\u0234\3\2\2\2\u0238\u0239\3\2"+ + "\2\2\u0239\u023a\3\2\2\2\u023a\u023b\5F$\2\u023b\67\3\2\2\2\u023c\u0248"+ + "\7!\2\2\u023d\u023e\5F$\2\u023e\u023f\7c\2\2\u023f\u0248\3\2\2\2\u0240"+ + "\u0248\5L\'\2\u0241\u0248\5<\37\2\u0242\u0244\7c\2\2\u0243\u0242\3\2\2"+ + "\2\u0244\u0245\3\2\2\2\u0245\u0243\3\2\2\2\u0245\u0246\3\2\2\2\u0246\u0248"+ + "\3\2\2\2\u0247\u023c\3\2\2\2\u0247\u023d\3\2\2\2\u0247\u0240\3\2\2\2\u0247"+ + "\u0241\3\2\2\2\u0247\u0243\3\2\2\2\u02489\3\2\2\2\u0249\u024a\t\r\2\2"+ + "\u024a;\3\2\2\2\u024b\u024c\t\16\2\2\u024c=\3\2\2\2\u024d\u024e\5F$\2"+ + "\u024e?\3\2\2\2\u024f\u0250\7\13\2\2\u0250\u0251\5*\26\2\u0251\u0252\7"+ + "\f\2\2\u0252\u0253\5*\26\2\u0253A\3\2\2\2\u0254\u0259\5F$\2\u0255\u0256"+ + "\7\6\2\2\u0256\u0258\5F$\2\u0257\u0255\3\2\2\2\u0258\u025b\3\2\2\2\u0259"+ + "\u0257\3\2\2\2\u0259\u025a\3\2\2\2\u025aC\3\2\2\2\u025b\u0259\3\2\2\2"+ + "\u025c\u025d\5F$\2\u025dE\3\2\2\2\u025e\u0261\5H%\2\u025f\u0261\5J&\2"+ + "\u0260\u025e\3\2\2\2\u0260\u025f\3\2\2\2\u0261G\3\2\2\2\u0262\u0265\7"+ + "h\2\2\u0263\u0265\7i\2\2\u0264\u0262\3\2\2\2\u0264\u0263\3\2\2\2\u0265"+ + "I\3\2\2\2\u0266\u026a\7f\2\2\u0267\u026a\5N(\2\u0268\u026a\7g\2\2\u0269"+ + "\u0266\3\2\2\2\u0269\u0267\3\2\2\2\u0269\u0268\3\2\2\2\u026aK\3\2\2\2"+ + "\u026b\u026e\7e\2\2\u026c\u026e\7d\2\2\u026d\u026b\3\2\2\2\u026d\u026c"+ + "\3\2\2\2\u026eM\3\2\2\2\u026f\u0270\t\17\2\2\u0270O\3\2\2\2Y_aenptz}\u0088"+ + "\u008b\u0093\u0097\u009b\u009f\u00a5\u00a9\u00ad\u00af\u00b7\u00ba\u00c6"+ + "\u00c9\u00cd\u00d4\u00d8\u00dc\u00e3\u00e7\u00eb\u00f0\u00f4\u00fc\u0100"+ + "\u0107\u0112\u0115\u0119\u0125\u0128\u012e\u0135\u013c\u013f\u0143\u0147"+ + "\u014b\u014d\u0158\u015d\u0161\u0164\u016a\u016d\u0173\u0176\u0178\u018c"+ + "\u0199\u01a7\u01ab\u01b3\u01b5\u01ba\u01bd\u01c5\u01ce\u01d4\u01dc\u01e2"+ + "\u01e5\u01eb\u01f7\u01f9\u0201\u0207\u020e\u0211\u0230\u0234\u0238\u0245"+ + "\u0247\u0259\u0260\u0264\u0269\u026d"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/TableIdentifier.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/TableIdentifier.java index c0dc514196a..1432fa4a147 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/TableIdentifier.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/TableIdentifier.java @@ -5,37 +5,27 @@ */ package org.elasticsearch.xpack.sql.plan; -import java.util.Objects; - -import org.elasticsearch.common.Strings; import org.elasticsearch.xpack.sql.tree.Location; +import java.util.Objects; + public class TableIdentifier { - private final String index, type; + private final String index; private final Location location; - public TableIdentifier(Location location, String index, String type) { + public TableIdentifier(Location location, String index) { this.location = location; this.index = index; - this.type = type; } public String index() { return index; } - public String type() { - return type; - } - - public boolean hasType() { - return Strings.hasText(type); - } - @Override public int hashCode() { - return Objects.hash(index, type); + return Objects.hash(index); } @Override @@ -49,8 +39,7 @@ public class TableIdentifier { } TableIdentifier other = (TableIdentifier) obj; - return Objects.equals(index, other.index) - && Objects.equals(type, other.type); + return Objects.equals(index, other.index); } public Location location() { @@ -62,8 +51,6 @@ public class TableIdentifier { StringBuilder builder = new StringBuilder(); builder.append("[index="); builder.append(index); - builder.append(", type="); - builder.append(type); builder.append("]"); return builder.toString(); } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/CatalogTable.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/CatalogTable.java index c9f1a0dd1c8..766b7a18768 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/CatalogTable.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/CatalogTable.java @@ -5,13 +5,8 @@ */ package org.elasticsearch.xpack.sql.plan.logical; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.stream.Stream; - import org.elasticsearch.xpack.sql.SqlIllegalArgumentException; -import org.elasticsearch.xpack.sql.analysis.catalog.EsType; +import org.elasticsearch.xpack.sql.analysis.catalog.EsIndex; import org.elasticsearch.xpack.sql.expression.Attribute; import org.elasticsearch.xpack.sql.expression.NestedFieldAttribute; import org.elasticsearch.xpack.sql.expression.RootFieldAttribute; @@ -21,20 +16,24 @@ import org.elasticsearch.xpack.sql.type.NestedType; import org.elasticsearch.xpack.sql.type.StringType; import org.elasticsearch.xpack.sql.util.StringUtils; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Stream; + import static java.util.Collections.emptyList; import static java.util.stream.Collectors.toList; - import static org.elasticsearch.xpack.sql.util.CollectionUtils.combine; public class CatalogTable extends LeafPlan { - private final EsType type; + private final EsIndex index; private final List attrs; - public CatalogTable(Location location, EsType type) { + public CatalogTable(Location location, EsIndex index) { super(location); - this.type = type; - attrs = flatten(location, type.mapping()).collect(toList()); + this.index = index; + attrs = flatten(location, index.mapping()).collect(toList()); } private static Stream flatten(Location location, Map mapping) { @@ -62,8 +61,8 @@ public class CatalogTable extends LeafPlan { }); } - public EsType type() { - return type; + public EsIndex index() { + return index; } @Override @@ -78,7 +77,7 @@ public class CatalogTable extends LeafPlan { @Override public int hashCode() { - return Objects.hash(type); + return Objects.hash(index); } @Override @@ -92,11 +91,11 @@ public class CatalogTable extends LeafPlan { } CatalogTable other = (CatalogTable) obj; - return Objects.equals(type, other.type); + return Objects.equals(index, other.index); } @Override public String nodeString() { - return nodeName() + "[" + type + "]" + StringUtils.limitedToString(attrs); + return nodeName() + "[" + index + "]" + StringUtils.limitedToString(attrs); } } \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowColumns.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowColumns.java index 556a59eca51..c0f14bc31df 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowColumns.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowColumns.java @@ -5,11 +5,6 @@ */ package org.elasticsearch.xpack.sql.plan.logical.command; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - import org.elasticsearch.xpack.sql.analysis.catalog.Catalog; import org.elasticsearch.xpack.sql.expression.Attribute; import org.elasticsearch.xpack.sql.expression.RootFieldAttribute; @@ -21,28 +16,27 @@ import org.elasticsearch.xpack.sql.type.CompoundDataType; import org.elasticsearch.xpack.sql.type.DataType; import org.elasticsearch.xpack.sql.type.DataTypes; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.Objects; import static java.util.Arrays.asList; public class ShowColumns extends Command { - private final String index, type; + private final String index; - public ShowColumns(Location location, String index, String type) { + public ShowColumns(Location location, String index) { super(location); this.index = index; - this.type = type; } public String index() { return index; } - public String type() { - return type; - } - @Override public List output() { return asList(new RootFieldAttribute(location(), "column", DataTypes.KEYWORD), @@ -52,7 +46,7 @@ public class ShowColumns extends Command { @Override protected RowSetCursor execute(SqlSession session) { Catalog catalog = session.catalog(); - Map mapping = catalog.getType(index, type).mapping(); + Map mapping = catalog.getIndex(index).mapping(); List> rows = new ArrayList<>(); fillInRows(mapping, null, rows); @@ -75,7 +69,7 @@ public class ShowColumns extends Command { @Override public int hashCode() { - return Objects.hash(index, type); + return Objects.hash(index); } @Override @@ -89,7 +83,6 @@ public class ShowColumns extends Command { } ShowColumns other = (ShowColumns) obj; - return Objects.equals(index, other.index) - && Objects.equals(type, other.type); + return Objects.equals(index, other.index); } } \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowTables.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowTables.java index c0b9e5f9883..41d9608b9f8 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowTables.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/logical/command/ShowTables.java @@ -5,7 +5,7 @@ */ package org.elasticsearch.xpack.sql.plan.logical.command; -import org.elasticsearch.xpack.sql.analysis.catalog.EsType; +import org.elasticsearch.xpack.sql.analysis.catalog.EsIndex; import org.elasticsearch.xpack.sql.expression.Attribute; import org.elasticsearch.xpack.sql.expression.RootFieldAttribute; import org.elasticsearch.xpack.sql.session.RowSetCursor; @@ -19,47 +19,42 @@ import java.util.List; import java.util.Objects; import static java.util.Arrays.asList; +import static java.util.Collections.singletonList; import static java.util.Comparator.comparing; import static java.util.stream.Collectors.toList; public class ShowTables extends Command { - private final String index, pattern; + private final String pattern; - public ShowTables(Location location, String index, String pattern) { + public ShowTables(Location location, String pattern) { super(location); - this.index = index; this.pattern = pattern; } - public String index() { - return index; - } - public String pattern() { return pattern; } @Override public List output() { - return asList(new RootFieldAttribute(location(), "index", DataTypes.KEYWORD), - new RootFieldAttribute(location(), "type", DataTypes.KEYWORD)); + return asList(new RootFieldAttribute(location(), "table", DataTypes.KEYWORD)); } @Override protected RowSetCursor execute(SqlSession session) { - List types = session.catalog().listTypes(index, pattern); + List indices = session.catalog().listIndices(pattern); // Consistent sorting is nice both for testing and humans - Collections.sort(types, comparing(EsType::index).thenComparing(EsType::name)); + Collections.sort(indices, comparing(EsIndex::name)); - return Rows.of(output(), types.stream() - .map(t -> asList(t.index(), t.name())) + return Rows.of(output(), indices.stream() + .map(t -> singletonList(t.name())) .collect(toList())); } @Override public int hashCode() { - return Objects.hash(index, pattern); + return Objects.hash(pattern); } @Override @@ -73,7 +68,6 @@ public class ShowTables extends Command { } ShowTables other = (ShowTables) obj; - return Objects.equals(index, other.index) - && Objects.equals(pattern, other.pattern); + return Objects.equals(pattern, other.pattern); } -} +} \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/physical/EsQueryExec.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/physical/EsQueryExec.java index ff56d2ebb88..85df5be5eca 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/physical/EsQueryExec.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plan/physical/EsQueryExec.java @@ -19,30 +19,25 @@ import java.util.Objects; public class EsQueryExec extends LeafExec { - private final String index, type; + private final String index; private final List output; private final QueryContainer queryContainer; - public EsQueryExec(Location location, String index, String type, List output, QueryContainer queryContainer) { + public EsQueryExec(Location location, String index, List output, QueryContainer queryContainer) { super(location); this.index = index; - this.type = type; this.output = output; this.queryContainer = queryContainer; } public EsQueryExec with(QueryContainer queryContainer) { - return new EsQueryExec(location(), index, type, output, queryContainer); + return new EsQueryExec(location(), index, output, queryContainer); } public String index() { return index; } - - public String type() { - return type; - } public QueryContainer queryContainer() { return queryContainer; @@ -56,12 +51,12 @@ public class EsQueryExec extends LeafExec { @Override public void execute(SqlSession session, ActionListener listener) { Scroller scroller = new Scroller(session.client(), session.settings()); - scroller.scroll(Rows.schema(output), queryContainer, index, type, listener); + scroller.scroll(Rows.schema(output), queryContainer, index, listener); } @Override public int hashCode() { - return Objects.hash(index, type, queryContainer, output); + return Objects.hash(index, queryContainer, output); } @Override @@ -76,13 +71,12 @@ public class EsQueryExec extends LeafExec { EsQueryExec other = (EsQueryExec) obj; return Objects.equals(index, other.index) - && Objects.equals(type, other.type) && Objects.equals(queryContainer, other.queryContainer) && Objects.equals(output, other.output); } @Override public String nodeString() { - return nodeName() + "[" + index + "/" + type + "," + queryContainer + "]"; + return nodeName() + "[" + index + "," + queryContainer + "]"; } } \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/Mapper.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/Mapper.java index 02c1d185f30..2d36e250437 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/Mapper.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/Mapper.java @@ -5,9 +5,6 @@ */ package org.elasticsearch.xpack.sql.planner; -import java.util.Arrays; -import java.util.List; - import org.elasticsearch.xpack.sql.expression.Attribute; import org.elasticsearch.xpack.sql.plan.logical.Aggregate; import org.elasticsearch.xpack.sql.plan.logical.CatalogTable; @@ -35,6 +32,9 @@ import org.elasticsearch.xpack.sql.rule.Rule; import org.elasticsearch.xpack.sql.rule.RuleExecutor; import org.elasticsearch.xpack.sql.util.ReflectionUtils; +import java.util.Arrays; +import java.util.List; + class Mapper extends RuleExecutor { public PhysicalPlan map(LogicalPlan plan) { @@ -91,7 +91,7 @@ class Mapper extends RuleExecutor { if (p instanceof CatalogTable) { CatalogTable c = (CatalogTable) p; List output = c.output(); - return new EsQueryExec(c.location(), c.type().index(), c.type().name(), output, new QueryContainer()); + return new EsQueryExec(c.location(), c.index().name(), output, new QueryContainer()); } if (p instanceof Limit) { diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/QueryFolder.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/QueryFolder.java index 186d2b924d9..d5722ad4fc6 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/QueryFolder.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/planner/QueryFolder.java @@ -118,7 +118,7 @@ class QueryFolder extends RuleExecutor { } QueryContainer clone = new QueryContainer(queryC.query(), queryC.aggs(), queryC.refs(), aliases, processors, queryC.pseudoFunctions(), queryC.sort(), queryC.limit()); - return new EsQueryExec(exec.location(), exec.index(), exec.type(), project.output(), clone); + return new EsQueryExec(exec.location(), exec.index(), project.output(), clone); } return project; } @@ -323,7 +323,7 @@ class QueryFolder extends RuleExecutor { if (!aliases.isEmpty()) { queryC = queryC.withAliases(combine(queryC.aliases(), aliases)); } - return new EsQueryExec(exec.location(), exec.index(), exec.type(), a.output(), queryC); + return new EsQueryExec(exec.location(), exec.index(), a.output(), queryC); } return a; } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/JdbcServer.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/JdbcServer.java index 98a2e86a1b0..e3a2e377dbc 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/JdbcServer.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/jdbc/JdbcServer.java @@ -10,7 +10,7 @@ import org.elasticsearch.Version; import org.elasticsearch.action.ActionListener; import org.elasticsearch.common.Strings; import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.xpack.sql.analysis.catalog.EsType; +import org.elasticsearch.xpack.sql.analysis.catalog.EsIndex; import org.elasticsearch.xpack.sql.execution.PlanExecutor; import org.elasticsearch.xpack.sql.execution.search.SearchHitRowSetCursor; import org.elasticsearch.xpack.sql.jdbc.net.protocol.ColumnInfo; @@ -45,9 +45,7 @@ import java.util.regex.Pattern; import static java.util.stream.Collectors.toList; import static org.elasticsearch.action.ActionListener.wrap; -import static org.elasticsearch.common.Strings.coalesceToEmpty; import static org.elasticsearch.common.Strings.hasText; -import static org.elasticsearch.common.Strings.tokenizeToStringArray; import static org.elasticsearch.xpack.sql.util.StringUtils.EMPTY; public class JdbcServer extends AbstractSqlServer { @@ -100,35 +98,29 @@ public class JdbcServer extends AbstractSqlServer { } public MetaTableResponse metaTable(MetaTableRequest req) { - String[] split = splitToIndexAndType(req.pattern()); - String index = split[0]; - String type = split[1]; - String indexPattern = hasText(index) ? StringUtils.jdbcToEsPattern(index) : "*"; + String indexPattern = hasText(req.pattern()) ? StringUtils.jdbcToEsPattern(req.pattern()) : "*"; - Collection types = executor.catalog().listTypes(indexPattern, type); - return new MetaTableResponse(types.stream() - .map(t -> t.index() + "." + t.name()) + Collection indices = executor.catalog().listIndices(indexPattern); + return new MetaTableResponse(indices.stream() + .map(EsIndex::name) .collect(toList())); } public MetaColumnResponse metaColumn(MetaColumnRequest req) { - String[] split = splitToIndexAndType(req.tablePattern()); - String index = split[0]; - String type = split[1]; - String indexPattern = Strings.hasText(index) ? StringUtils.jdbcToEsPattern(index) : "*"; + String pattern = Strings.hasText(req.tablePattern()) ? StringUtils.jdbcToEsPattern(req.tablePattern()) : "*"; - Collection types = executor.catalog().listTypes(indexPattern, type); + Collection indices = executor.catalog().listIndices(pattern); Pattern columnMatcher = hasText(req.columnPattern()) ? StringUtils.likeRegex(req.columnPattern()) : null; List resp = new ArrayList<>(); - for (EsType esType : types) { + for (EsIndex esIndex : indices) { int pos = 0; - for (Entry entry : esType.mapping().entrySet()) { + for (Entry entry : esIndex.mapping().entrySet()) { pos++; if (columnMatcher == null || columnMatcher.matcher(entry.getKey()).matches()) { String name = entry.getKey(); - String table = esType.index() + "." + esType.name(); + String table = esIndex.name(); JDBCType tp = entry.getValue().sqlType(); int size = entry.getValue().precision(); resp.add(new MetaColumnInfo(table, name, tp, size, pos)); @@ -149,6 +141,7 @@ public class JdbcServer extends AbstractSqlServer { .build() ); + //NOCOMMIT: this should be pushed down to the TransportSqlAction to hook up pagination executor.sql(sqlCfg, req.query, wrap(c -> { long stop = System.currentTimeMillis(); String requestId = EMPTY; @@ -167,17 +160,4 @@ public class JdbcServer extends AbstractSqlServer { public void queryPage(QueryPageRequest req, ActionListener listener) { throw new UnsupportedOperationException(); } - - static String[] splitToIndexAndType(String pattern) { - String[] tokens = tokenizeToStringArray(pattern, "."); - - if (tokens.length == 2) { - return tokens; - } - if (tokens.length != 1) { - throw new IllegalArgumentException("bad pattern: [" + pattern + "]"); - } - - return new String[] {coalesceToEmpty(pattern), ""}; - } } \ No newline at end of file diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/action/TransportSqlAction.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/action/TransportSqlAction.java index c83c020b183..9ff835143fd 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/action/TransportSqlAction.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/sql/action/TransportSqlAction.java @@ -60,10 +60,6 @@ public class TransportSqlAction extends HandledTransportAction { String id = generateId(); SESSIONS.put(id, c); diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/session/SqlSettings.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/session/SqlSettings.java index cedcfad3fdb..412a1bb53e4 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/session/SqlSettings.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/session/SqlSettings.java @@ -39,7 +39,7 @@ public class SqlSettings { } public DateTimeZone timeZone() { - return DateTimeZone.forID(TIMEZONE_ID); + return DateTimeZone.forID(timeZoneId()); } public int pageSize() {