mirror of
https://github.com/apache/impala.git
synced 2026-01-03 06:00:52 -05:00
Shell: Fix parsing of strings containing an escaped backslash
Upgrading sqlparse ended up trading one bug for another. The new bug is not fixed upstream, I sent a patch. The problem is '\\' is not considered a terminated string and we use this in the phrase "fields escaped by '\\'" when creating tables. Change-Id: Id57081f5a96e997afd3aa9b26dca23f627488fc3 Reviewed-on: http://gerrit.cloudera.org:8080/117 Reviewed-by: Casey Ching <casey@cloudera.com> Tested-by: Internal Jenkins
This commit is contained in:
@@ -74,6 +74,12 @@ class TestImpalaShell(object):
|
||||
args = '-q "%s" -B' % queries
|
||||
run_impala_shell_cmd(args)
|
||||
|
||||
@pytest.mark.execute_serially
|
||||
def test_multiple_queries_with_escaped_backslash(self):
|
||||
# Regression test for string containing an escaped backslash. This relies on the
|
||||
# patch at thirdparty/patches/sqlparse/0001-....patch.
|
||||
run_impala_shell_cmd(r'''-q "select '\\\\'; select '\\'';" -B''')
|
||||
|
||||
@pytest.mark.execute_serially
|
||||
def test_default_db(self):
|
||||
args = '-d %s -q "describe %s" --quiet' % (TEST_DB, TEST_TBL)
|
||||
|
||||
Reference in New Issue
Block a user