mirror of
https://github.com/apache/impala.git
synced 2026-01-29 03:00:27 -05:00
The FE has several repeated blocks of code to set up the lexer and parser, to parse, and to handle errors. This patch moves this code into a static function that can be used in place of the copies. At the same time, provide a specific ParseException to replace the generic Exception thrown by the parser to allow easier error handling. Some of the uses of the parser assume the return value is Object, others that the value is ParseNode and still others that it is StatementBase. Since the actual return is StatementBase, declares that as the return value of the new static method to clearly state the actual output. Testing: This is just a refactoring. Reran all FE tests to ensure no regressions. Change-Id: I174c59d38542ff311c6c3dc10cf3ad4e40f8b30e Reviewed-on: http://gerrit.cloudera.org:8080/12016 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
34 KiB
Executable File
34 KiB
Executable File