Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-3342

Allow conditions in case statement

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.0
    • Component/s: parser
    • Labels:
      None

      Description

      PIG-3268 added case statement support. But conditions are currently not allowed in when branches. For example,

      CASE
        WHEN i % 5 == 0 THEN '5n'
        WHEN i % 5 == 1 THEN '5n+1'
        WHEN i % 5 == 2 THEN '5n+2'
        WHEN i % 5 == 3 THEN '5n+3'
        ELSE                 '5n+4'
      END
      

      This is invalid now. However, it will be useful if it's allowed.

        Attachments

        1. PIG-3342.patch
          11 kB
          Cheolsoo Park

          Issue Links

            Activity

              People

              • Assignee:
                cheolsoo Cheolsoo Park
                Reporter:
                cheolsoo Cheolsoo Park
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: