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

AND and OR do not give right results with nulls

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2.0
    • 0.2.0
    • None
    • None
    • Patch Available

    Description

      Here are the truth tables for AND and OR - currently we do not short circuit and return a null if either operand is null (for both AND and OR)

              truth table for AND 
              t = true, n = null, f = false
              AND  t n f
                    t    t n f
                   n   n n f
                   f    f f f
      
      
              truth table for OR 
              t = true, n = null, f = false
              OR   t n f
                   t    t t t
                  n    t n n
                  f     t n f
      
      

      Attachments

        1. PIG-434.patch
          7 kB
          Pradeep Kamath

        Activity

          People

            pkamath Pradeep Kamath
            pkamath Pradeep Kamath
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: