Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.10.0
    • Component/s: data
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      Introduce boolean as first class Pig data type. You can use "boolean" anywhere Pig expecting a data type. For example:
      a = load 'input' as (a0:boolean, a1:tuple(a10:boolean, a11:int), a2);
      b = foreach a generate a0, a1, (boolean)a2;
      c = group b by a2; -- group by a boolean field

      When UTF8StorageConvert converts bytes into boolean, it expects "true" (ignore case) to be TRUE and "false" (ignore case) to be FALSE, otherwise, we get null. For example:
      a = load 'input' as (a0:boolean);

      input file:
      true -- we get TRUE
      True -- we get TRUE
      FALSE -- we get FALSE
      1 -- we get null

      We also change the interface LoadCaster/StoreCaster to include boolean type.
      Show
      Introduce boolean as first class Pig data type. You can use "boolean" anywhere Pig expecting a data type. For example: a = load 'input' as (a0:boolean, a1:tuple(a10:boolean, a11:int), a2); b = foreach a generate a0, a1, (boolean)a2; c = group b by a2; -- group by a boolean field When UTF8StorageConvert converts bytes into boolean, it expects "true" (ignore case) to be TRUE and "false" (ignore case) to be FALSE, otherwise, we get null. For example: a = load 'input' as (a0:boolean); input file: true -- we get TRUE True -- we get TRUE FALSE -- we get FALSE 1 -- we get null We also change the interface LoadCaster/StoreCaster to include boolean type.
    • Tags:
      boolean type pig

      Description

      Pig needs a Boolean data type. Pig-1097 is dependent on doing this.

      I volunteer. Is there anything beyond the work in src/org/apache/pig/data/ plus unit tests to make this work?

      This is a candidate project for Google summer of code 2011. More information about the program can be found at http://wiki.apache.org/pig/GSoc2011

      1. working_boolean.patch
        23 kB
        Russell Jurney
      2. PIG-1429_1.patch
        25 kB
        Zhijie Shen
      3. PIG-1429_2.patch
        39 kB
        Zhijie Shen
      4. PIG-1429_3.patch
        209 kB
        Zhijie Shen
      5. PIG-1429_4.patch
        122 kB
        Zhijie Shen
      6. PIG-1429_5.patch
        95 kB
        Zhijie Shen
      7. PIG-1429_6.patch
        96 kB
        Daniel Dai

        Issue Links

          Activity

          Daniel Dai made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Daniel Dai made changes -
          Release Note Introduce boolean as first class Pig data type. You can use "boolean" anywhere Pig expecting a data type. For example:
          a = load 'input' as (a0:boolean, a1:tuple(a10:boolean, a11:int), a2);
          b = foreach a generate a0, a1, (boolean)a2;
          c = group b by a2; -- group by a boolean field

          When UTF8StorageConvert converts bytes into boolean, it expects "true" (ignore case) to be TRUE and "false" (ignore case) to be FALSE, otherwise, we get null. For example:
          a = load 'input' as (a0:boolean);

          input file:
          true -- we get TRUE
          True -- we get TRUE
          FALSE -- we get FALSE
          1 -- we get null

          We also change the interface LoadCaster/StoreCaster to include boolean type.
          Daniel Dai made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Hadoop Flags [Reviewed]
          Fix Version/s 0.10 [ 12316246 ]
          Resolution Fixed [ 1 ]
          Daniel Dai made changes -
          Attachment PIG-1429_6.patch [ 12490817 ]
          Zhijie Shen made changes -
          Attachment PIG-1429_5.patch [ 12490607 ]
          Zhijie Shen made changes -
          Attachment PIG-1429_4.patch [ 12490342 ]
          Zhijie Shen made changes -
          Attachment PIG-1429_3.patch [ 12489822 ]
          Zhijie Shen made changes -
          Attachment PIG-1429_2.patch [ 12488852 ]
          Zhijie Shen made changes -
          Attachment PIG-1429_1.patch [ 12487643 ]
          Zhijie Shen made changes -
          Assignee Russell Jurney [ rjurney ] Zhijie Shen [ zjshen ]
          Daniel Dai made changes -
          Labels boolean pig type boolean gsoc2011 pig type
          Description Pig needs a Boolean data type. Pig-1097 is dependent on doing this.

          I volunteer. Is there anything beyond the work in src/org/apache/pig/data/ plus unit tests to make this work?
          Pig needs a Boolean data type. Pig-1097 is dependent on doing this.

          I volunteer. Is there anything beyond the work in src/org/apache/pig/data/ plus unit tests to make this work?

          This is a candidate project for Google summer of code 2011. More information about the program can be found at http://wiki.apache.org/pig/GSoc2011
          Olga Natkovich made changes -
          Fix Version/s 0.9.0 [ 12315191 ]
          Alan Gates made changes -
          Fix Version/s 0.9.0 [ 12315191 ]
          Olga Natkovich made changes -
          Fix Version/s 0.8.0 [ 12314562 ]
          Russell Jurney made changes -
          Attachment boolean.patch [ 12445873 ]
          Russell Jurney made changes -
          Attachment working_boolean.patch [ 12445897 ]
          Russell Jurney made changes -
          Attachment boolean.patch [ 12445870 ]
          Russell Jurney made changes -
          Attachment boolean.patch [ 12445873 ]
          Russell Jurney made changes -
          Attachment boolean.patch [ 12445870 ]
          Russell Jurney made changes -
          Link This issue is blocked by PIG-1314 [ PIG-1314 ]
          Russell Jurney made changes -
          Link This issue relates to PIG-1314 [ PIG-1314 ]
          Dmitriy V. Ryaboy made changes -
          Assignee Russell Jurney [ rjurney ]
          Russell Jurney made changes -
          Field Original Value New Value
          Link This issue blocks PIG-1097 [ PIG-1097 ]
          Russell Jurney created issue -

            People

            • Assignee:
              Zhijie Shen
              Reporter:
              Russell Jurney
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 8h
                8h
                Remaining:
                Remaining Estimate - 8h
                8h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Development