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

Exception during re-analyze can be lost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.4.0
    • Frontend
    • None
    • ghx-label-2

    Description

      The problem is that while we handle an exception, we throw another:

          } catch (AnalysisException e) {
            LOG.error(String.format("Error analyzing the rewritten query.\n" +
                "Original SQL: %s\nRewritten SQL: %s", analysisResult_.stmt_.toSql(),   // <== toSql() throws another exception, so we lose the original one
                analysisResult_.stmt_.toSql(REWRITTEN)), e);
            throw e;
          }
      

      https://github.com/apache/impala/blob/49d37cfef2e1aef611330489082e12e3c0c63347/fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java#L649

      Statement.toSql() assumes that the statement is analyzed, but here we are handling an AnalysisException, so there's good chance that the analysis of statement failed.

      Attachments

        Activity

          People

            boroknagyz Zoltán Borók-Nagy
            boroknagyz Zoltán Borók-Nagy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: