Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-7915

Wrap SQL parser to avoid redundant code

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • Impala 3.0
    • Impala 3.2.0
    • Frontend
    • None
    • ghx-label-6

    Description

      The FE has several repeated blocks of code to set up the lexer and parser, to parse, and to handle errors.

      Move 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, declare that as the return value of the new static method to clearly state the actual output.

      Attachments

        Activity

          People

            Paul.Rogers Paul Rogers
            Paul.Rogers Paul Rogers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: