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

Hive should raise SemanticException when LPAD/RPAD pad character's length is 0

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.0
    • None
    • None

    Description

      For example SELECT LPAD('A', 2, ''); will cause an infinite loop and the running query will hang without any error.

      It would be great if this could be prevented by checking the pad character's length and if it's 0 then throw a SemanticException.

      Attachments

        1. HIVE-15792.000.patch
          4 kB
          Nandakumar
        2. HIVE-15792.001.patch
          6 kB
          Nandakumar
        3. HIVE-15792.002.patch
          8 kB
          Nandakumar

        Activity

          People

            nanda Nandakumar
            zchovan Zoltan Chovan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: