Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-28312

Save query error message on Driver level

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.1.0
    • None

    Description

      current call path is SQLOperation -> Driver.run

      Instead of just throwing CommandProcessorException, Driver might save the the error message for query-tracking purposes, this is a single message for later reference, like:

      FAILED: SemanticException [Error 10001]: Line 1:14 Table not found 'abcd'
      

      2 ways to achieve this

      1. wrap every occurrence of throwing CommandProcessorException inside driver
      e.g. https://github.com/apache/hive/blob/98d9d22398370f817fe64449368671b978fff096/ql/src/java/org/apache/hadoop/hive/ql/Driver.java#L146
      PRO: storing of error message stays inside the Driver (SQLCommand doesn't need to know about it)
      CONS: looks a bit worse, not future-proof (later, anyone can miss this call while throwing a cpe), needs Driver code changes at several places

      2. catch in SQLOperation and propagate back to Driver
      https://github.com/apache/hive/blob/98d9d22398370f817fe64449368671b978fff096/service/src/java/org/apache/hive/service/cli/operation/SQLOperation.java#L237
      PRO: maybe it looks better, every exception can be caught in a single place
      CON: it looks weird, because SQLOperation has to call back to the driver to store the error message (which was already passed through the driver)

      Attachments

        Issue Links

          Activity

            People

              abstractdog László Bodor
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: