Tamas Mate has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16389


Change subject: IMPALA-10051: impala-shell exits with ValueError with WITH 
clauses
......................................................................

IMPALA-10051: impala-shell exits with ValueError with WITH clauses

When a query a contains WITH clause impala-shell tries to identify whether
it is a DML query or not, so that later it can provide appropriate
result messages. Earlier shlex was used to create tokens and assess the
query type based on that. However shlex can misinterpret some query
strings where whitespace charachters are mixed with quotes, because it
splits the string based on whitespace charachters. In some scenarios
'ValueError: No closing quotation' error can occur.

This change moves the tokenization from shlex to sqlparse.

Testing:
 - Added unit test to cover queries that contain mixed whitespaces
   and strings

Change-Id: I442d3bc65b90a55c73c847948d5179a8586d71ad
---
M shell/impala_shell.py
M tests/shell/test_shell_interactive.py
2 files changed, 21 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/89/16389/2
--
To view, visit http://gerrit.cloudera.org:8080/16389
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I442d3bc65b90a55c73c847948d5179a8586d71ad
Gerrit-Change-Number: 16389
Gerrit-PatchSet: 2
Gerrit-Owner: Tamas Mate <[email protected]>

Reply via email to