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

Fix ambiguity in grammar warnings at compilation time

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0, 3.2.0
    • Component/s: Parser
    • Labels:
      None

      Description

      These are the warnings at compilation time:

      warning(200): org/apache/hadoop/hive/ql/parse/HiveParser.g:2439:5:
      Decision can match input such as "KW_CHECK KW_DATETIME" using multiple alternatives: 1, 2
      
      As a result, alternative(s) 2 were disabled for that input
      warning(200): org/apache/hadoop/hive/ql/parse/HiveParser.g:2439:5:
      Decision can match input such as "KW_CHECK KW_DATE {LPAREN, StringLiteral}" using multiple alternatives: 1, 2
      
      As a result, alternative(s) 2 were disabled for that input
      warning(200): org/apache/hadoop/hive/ql/parse/HiveParser.g:2439:5:
      Decision can match input such as "KW_CHECK KW_UNIONTYPE LESSTHAN" using multiple alternatives: 1, 2
      
      As a result, alternative(s) 2 were disabled for that input
      warning(200): org/apache/hadoop/hive/ql/parse/HiveParser.g:2439:5:
      Decision can match input such as "KW_CHECK {KW_EXISTS, KW_TINYINT}" using multiple alternatives: 1, 2
      
      As a result, alternative(s) 2 were disabled for that input
      warning(200): org/apache/hadoop/hive/ql/parse/HiveParser.g:2439:5:
      Decision can match input such as "KW_CHECK KW_STRUCT LESSTHAN" using multiple alternatives: 1, 2
      
      As a result, alternative(s) 2 were disabled for that input
      

      This means that multiple parser rules can match certain query text, possibly leading to unexpected errors at parsing time.

        Attachments

        1. HIVE-21278.01.patch
          29 kB
          Jesus Camacho Rodriguez
        2. HIVE-21278.02.patch
          29 kB
          Jesus Camacho Rodriguez
        3. HIVE-21278.patch
          21 kB
          Jesus Camacho Rodriguez

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                jcamachorodriguez Jesus Camacho Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: