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

Case expression fails with an even number of when branches

    XMLWordPrintableJSON

    Details

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

      Description

      This is a bug introduced by PIG-3342 - Allow conditions in case statement.

      If 1) there are an even number of when branches, and 2) there is the else branch, case statement with conditions fails with the following error:

      Caused by: org.apache.pig.impl.logicalLayer.validators.TypeCheckerException: ERROR 1057: 
      <line 2, column 14> LOGenerate expression plan can only have one output
      

      This is because the logic of determining whether case statement has the else branch is incorrect. This doesn't happen when conditions are not used in case statement.

        Attachments

        1. PIG-3364.patch
          4 kB
          Cheolsoo Park

          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: