Pig
  1. Pig
  2. PIG-3779

Assert constructs ConstantExpression with null when no comment is given

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.12.1, 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      I ran into this problem with Lipstick after deploying ASSERT. When ASSERT is not given any comment, LogicalPlanBuilder constructs ConstantExpression with null. Later tools like Lipstick try to convert it to a String resulting in NPE.

      Although it's possible to handle this case in Lipstick, I feel ConstantExpression shouldn't be constructed with null in the first place.

      Here is the code in LogicalPlanBuilder-

      ConstantExpression constExpr = new ConstantExpression(exprPlan, comment);
      
      1. assert.diff
        0.9 kB
        Jacob Perkins

        Activity

        Cheolsoo Park created issue -
        Jacob Perkins made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Assignee Cheolsoo Park [ cheolsoo ]
        Jacob Perkins made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Jacob Perkins made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Jacob Perkins made changes -
        Attachment assert.diff [ 12631064 ]
        Jacob Perkins made changes -
        Assignee Cheolsoo Park [ cheolsoo ] Jacob Perkins [ thedatachef ]
        Hide
        Cheolsoo Park added a comment -

        +1.

        I will commit it tomorrow.

        Show
        Cheolsoo Park added a comment - +1. I will commit it tomorrow.
        Hide
        Cheolsoo Park added a comment -

        Committed to 0.12.1 and trunk. Thank you Jacob!

        Show
        Cheolsoo Park added a comment - Committed to 0.12.1 and trunk. Thank you Jacob!
        Cheolsoo Park made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.12.1 [ 12324970 ]
        Resolution Fixed [ 1 ]
        Prashant Kommireddi made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Patch Available Patch Available Open Open
        12s 1 Jacob Perkins 25/Feb/14 22:02
        Open Open Patch Available Patch Available
        1h 1m 2 Jacob Perkins 25/Feb/14 22:04
        Patch Available Patch Available Resolved Resolved
        22h 40m 1 Cheolsoo Park 26/Feb/14 20:45
        Resolved Resolved Closed Closed
        47d 23h 59m 1 Prashant Kommireddi 15/Apr/14 21:45

          People

          • Assignee:
            Jacob Perkins
            Reporter:
            Cheolsoo Park
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development