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

Fix ambiguity in grammar warnings at compilation time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0, 4.0.0-alpha-1
    • Parser
    • 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
          jcamachorodriguez
        2. HIVE-21278.02.patch
          29 kB
          jcamachorodriguez
        3. HIVE-21278.patch
          21 kB
          jcamachorodriguez

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: