Pig
  1. Pig
  2. PIG-3342

Allow conditions in case statement

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major 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.

      1. PIG-3342.patch
        11 kB
        Cheolsoo Park

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development