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

Query hang when containing alias names as empty backticks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • Impala 3.4.0
    • Impala 4.0.0
    • Frontend

    Description

      The following query will hang in an infinite loop:

      select 1 as "``";
      

      Stacktrace of its compiler thread:

      "Thread-19" #34 prio=5 os_prio=0 tid=0x0000000012fc0000 nid=0x5514 runnable [0x00007f2abda41000]
         java.lang.Thread.State: RUNNABLE
              at java.io.FileOutputStream.writeBytes(Native Method)
              at java.io.FileOutputStream.write(FileOutputStream.java:326)
              at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
              at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
              - locked <0x00000005cc90f7b8> (a java.io.BufferedOutputStream)
              at java.io.PrintStream.write(PrintStream.java:482)
              - locked <0x00000005cc90f798> (a java.io.PrintStream)
              at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
              at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
              at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
              - locked <0x00000005cc90f8d8> (a java.io.OutputStreamWriter)
              at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
              at java.io.PrintStream.write(PrintStream.java:527)
              - locked <0x00000005cc90f798> (a java.io.PrintStream)
              at java.io.PrintStream.print(PrintStream.java:669)
              at java.io.PrintStream.println(PrintStream.java:806)
              - locked <0x00000005cc90f798> (a java.io.PrintStream)
              at org.antlr.runtime.BaseRecognizer.emitErrorMessage(BaseRecognizer.java:344)
              at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecognizer.java:194)
              at org.antlr.runtime.Lexer.reportError(Lexer.java:261)
              at org.antlr.runtime.Lexer.nextToken(Lexer.java:103)
              at org.apache.impala.analysis.ToSqlUtils.hiveNeedsQuotes(ToSqlUtils.java:145)
              at org.apache.impala.analysis.ToSqlUtils.getIdentSql(ToSqlUtils.java:199)
              at org.apache.impala.analysis.SlotRef.<init>(SlotRef.java:58)
              at org.apache.impala.analysis.SelectStmt$SelectAnalyzer.analyzeSelectClause(SelectStmt.java:283)
              at org.apache.impala.analysis.SelectStmt$SelectAnalyzer.analyze(SelectStmt.java:215)
              at org.apache.impala.analysis.SelectStmt$SelectAnalyzer.access$100(SelectStmt.java:199)
              at org.apache.impala.analysis.SelectStmt.analyze(SelectStmt.java:192)
              at org.apache.impala.analysis.AnalysisContext.analyze(AnalysisContext.java:473)
              at org.apache.impala.analysis.AnalysisContext.analyzeAndAuthorize(AnalysisContext.java:437)
              at org.apache.impala.service.Frontend.doCreateExecRequest(Frontend.java:1530)
              at org.apache.impala.service.Frontend.getTExecRequest(Frontend.java:1497)
              at org.apache.impala.service.Frontend.createExecRequest(Frontend.java:1467)
              at org.apache.impala.service.JniFrontend.createExecRequest(JniFrontend.java:154)
      

      org.antlr.runtime.Lexer keeps emitting the same error message to stderr (which is redirected to impalad.ERROR):

      line 1:0 rule Identifier failed predicate: {allowQuotedId()}?
      line 1:0 rule Identifier failed predicate: {allowQuotedId()}?
      line 1:0 rule Identifier failed predicate: {allowQuotedId()}?
      

      Attachments

        Issue Links

          Activity

            People

              tmate Tamas Mate
              stigahuang Quanlong Huang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: