----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49655/ -----------------------------------------------------------
(Updated July 19, 2016, 7:45 p.m.) Review request for hive, Sergio Pena and Yongzhi Chen. Changes ------- Addressing comments. Added another test that covers 7 more cases. Updated logic to handle escape quotation marks. Removed escaping of ; in DDLTask done for `SHOW CREATE` queries, as it is no longer necessary. Bugs: HIVE-12646 https://issues.apache.org/jira/browse/HIVE-12646 Repository: hive-git Description ------- HIVE-12646: beeline and HIVE CLI do not parse ; in quote properly Approach: * Modified the `Commands.execute(...)` command to iterate throught the given input line character by character * It looks for single and double quotes in order to track when the iterator is inside a quotation block * If the iterator is inside a quotation block and it finds a semicolon, it ignores it, otherwise it treats it as it normally would * Moved the logic for parsing the line into a helper method called `getCmList(...)` which is responsible for returning a `List` of commands that need to be run Diffs (updated) ----- beeline/src/java/org/apache/hive/beeline/Commands.java 387861b itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java ecfeddb ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java 2b8d6a7 Diff: https://reviews.apache.org/r/49655/diff/ Testing ------- Add a unit tests which checks that Beeline can successfully run queries that contain semi-colons inside quotation blocks. Confirmed existing unit tests pass. Thanks, Sahil Takiar