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

Add assert keyword (operator) in pig

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.12.0
    • parser
    • None

    Description

      Assert operator can be used for data validation. With assert you can write script as following-

      a = load 'something' as (a0:int, a1:int);
      assert a by a0 > 0, 'a cant be negative for reasons';
      

      This script will fail if assert is violated.

      Attachments

        1. PIG-3367.patch
          12 kB
          Aniket Namadeo Mokashi
        2. PIG-3367-2.patch
          10 kB
          Aniket Namadeo Mokashi

        Issue Links

          Activity

            People

              aniket486 Aniket Namadeo Mokashi
              aniket486 Aniket Namadeo Mokashi
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: