mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-14464: Calcite planner should allow semi-colon in statement
The Calcite planner now handles a sql statement that has a semi-colon at the end. Note that impala-shell doesn't pass the semi-colon into the server. This is only seen with a direct call to the server. Change-Id: Ie690159cd03f28f6b793628aa946292af71b6970 Reviewed-on: http://gerrit.cloudera.org:8080/23517 Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
@@ -1138,9 +1138,9 @@ SqlNode SqlStmt() :
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
(
|
(
|
||||||
stmt = OrderedQueryOrExpr(ExprContext.ACCEPT_QUERY)
|
stmt = OrderedQueryOrExpr(ExprContext.ACCEPT_QUERY) (<SEMICOLON>)*
|
||||||
|
|
|
|
||||||
stmt = SqlExplain()
|
stmt = SqlExplain() (<SEMICOLON>)*
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return stmt;
|
return stmt;
|
||||||
|
|||||||
@@ -41,3 +41,9 @@ class TestCalcitePlanner(CustomClusterTestSuite):
|
|||||||
def test_calcite_frontend(self, vector, unique_database):
|
def test_calcite_frontend(self, vector, unique_database):
|
||||||
"""Calcite planner does not work in local catalog mode yet."""
|
"""Calcite planner does not work in local catalog mode yet."""
|
||||||
self.run_test_case('QueryTest/calcite', vector, use_db=unique_database)
|
self.run_test_case('QueryTest/calcite', vector, use_db=unique_database)
|
||||||
|
|
||||||
|
@pytest.mark.execute_serially
|
||||||
|
@CustomClusterTestSuite.with_args(start_args="--env_vars=USE_CALCITE_PLANNER=true")
|
||||||
|
def test_semicolon(self, cursor):
|
||||||
|
cursor.execute("set use_calcite_planner=true;")
|
||||||
|
cursor.execute("select 4;")
|
||||||
|
|||||||
Reference in New Issue
Block a user