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

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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      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.002.patch
          8 kB
          Nanda kumar
        2. HIVE-15792.001.patch
          6 kB
          Nanda kumar
        3. HIVE-15792.000.patch
          4 kB
          Nanda kumar

          Activity

            People

            • Assignee:
              nandakumar131 Nanda kumar
              Reporter:
              zchovan Zoltan Chovan
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: