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

Allow conditions in case statement

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.12.0
    • parser
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: