Pig
  1. Pig
  2. PIG-1420

Make CONCAT act on all fields of a tuple, instead of just the first two fields of a tuple

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.8.0
    • Component/s: impl
    • Labels:
    • Patch Info:
      Patch Available
    • Release Note:
      Hide
      CONCAT handles all fields in the supplied tuple, instead of just the first two. This is backwards compatible unless you were relying on it only using the first two fields, which seems unlikely. DataByteArray now has an append() method.

      Example use before:

      B = FOREACH A GENERATE CONCAT(CONCAT(first_name, ' '), last_name);

      Example extended use now:

      D = FOREACH C GENERATE CONCAT(first_name, ' ', last_name);
      Show
      CONCAT handles all fields in the supplied tuple, instead of just the first two. This is backwards compatible unless you were relying on it only using the first two fields, which seems unlikely. DataByteArray now has an append() method. Example use before: B = FOREACH A GENERATE CONCAT(CONCAT(first_name, ' '), last_name); Example extended use now: D = FOREACH C GENERATE CONCAT(first_name, ' ', last_name);
    • Tags:
      pig builtin concat all fields of a tuple

      Description

      org.apache.pig.builtin.CONCAT (which acts on DataByteArray's internally) and org.apache.pig.builtin.StringConcat (which acts on Strings internally), both act on the first two fields of a tuple. This results in ugly nested CONCAT calls like:

      CONCAT(CONCAT(A, ' '), B)

      The more desirable form is:

      CONCAT(A, ' ', B)

      This change will be backwards compatible, provided that no one was relying on the fact that CONCAT ignores fields after the first two in a tuple. This seems a reasonable assumption to make, or at least a small break in compatibility for a sizable improvement.

      1. addconcat2.patch
        8 kB
        Russell Jurney
      2. PIG-1420.2.patch
        1 kB
        Dmitriy V. Ryaboy

        Issue Links

          Activity

          Russell Jurney created issue -
          Russell Jurney made changes -
          Field Original Value New Value
          Attachment concat.patch [ 12444557 ]
          Russell Jurney made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Release Note CONCAT handles all fields in the supplied tuple, instead of just the first two. This is backwards compatible unless you were relying on it only using the first two fields, which seems unlikely. DataByteArray now has an append() method.

          Example use before:

          B = FOREACH A GENERATE CONCAT(CONCAT(first_name, ' '), last_name);

          Example extended use now:

          D = FOREACH C GENERATE CONCAT(first_name, ' ', last_name);
          Russell Jurney made changes -
          Status Patch Available [ 10002 ] Open [ 1 ]
          Russell Jurney made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Russell Jurney made changes -
          Status Patch Available [ 10002 ] In Progress [ 3 ]
          Russell Jurney made changes -
          Attachment addconcat.patch [ 12444832 ]
          Russell Jurney made changes -
          Attachment concat.patch [ 12444557 ]
          Russell Jurney made changes -
          Patch Info [Patch Available]
          Russell Jurney made changes -
          Attachment addconcat.patch [ 12444832 ]
          Russell Jurney made changes -
          Attachment addconcat2.patch [ 12444886 ]
          Dmitriy V. Ryaboy made changes -
          Assignee Russell Jurney [ rjurney ]
          Dmitriy V. Ryaboy made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 0.8.0 [ 12314562 ]
          Fix Version/s 0.7.0 [ 12314397 ]
          Resolution Fixed [ 1 ]
          Dmitriy V. Ryaboy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Dmitriy V. Ryaboy made changes -
          Attachment PIG-1420.2.patch [ 12452315 ]
          Gavin made changes -
          Assignee Russell Jurney [ rjurney ] Russell Jurney [ russell.jurney ]
          Daniel Dai made changes -
          Link This issue is superceded by PIG-3444 [ PIG-3444 ]

            People

            • Assignee:
              Russell Jurney
              Reporter:
              Russell Jurney
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Development