Pig
  1. Pig
  2. PIG-1341

BinStorage cannot convert DataByteArray to Chararray and results in FIELD_DISCARDED_TYPE_CONVERSION_FAILED

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.6.0
    • Fix Version/s: 0.9.0
    • Component/s: impl
    • Labels:
      None

      Description

      Script reads in BinStorage data and tries to convert a column which is in DataByteArray to Chararray.

      raw = load 'sampledata' using BinStorage() as (col1,col2, col3);
      --filter out null columns
      A = filter raw by col1#'bcookie' is not null;
      
      B = foreach A generate col1#'bcookie'  as reqcolumn;
      describe B;
      --B: {regcolumn: bytearray}
      X = limit B 5;
      dump X;
      
      B = foreach A generate (chararray)col1#'bcookie'  as convertedcol;
      describe B;
      --B: {convertedcol: chararray}
      X = limit B 5;
      dump X;
      
      

      The first dump produces:

      (36co9b55onr8s)
      (36co9b55onr8s)
      (36hilul5oo1q1)
      (36hilul5oo1q1)
      (36l4cj15ooa8a)

      The second dump produces:
      ()
      ()
      ()
      ()
      ()

      It also throws an error message: FIELD_DISCARDED_TYPE_CONVERSION_FAILED 5 time(s).
      Viraj

      1. PIG-1341.patch
        7 kB
        Richard Ding

        Issue Links

          Activity

          Viraj Bhat created issue -
          Viraj Bhat made changes -
          Field Original Value New Value
          Summary Cannot convert DataByeArray to Chararray and results in FIELD_DISCARDED_TYPE_CONVERSION_FAILED 20 Cannot convert DataByeArray to Chararray and results in FIELD_DISCARDED_TYPE_CONVERSION_FAILED
          Component/s impl [ 12312024 ]
          Olga Natkovich made changes -
          Fix Version/s 0.7.0 [ 12314397 ]
          Olga Natkovich made changes -
          Assignee Richard Ding [ rding ]
          Richard Ding made changes -
          Summary Cannot convert DataByeArray to Chararray and results in FIELD_DISCARDED_TYPE_CONVERSION_FAILED BinStorage cannot convert DataByteArray to Chararray and results in FIELD_DISCARDED_TYPE_CONVERSION_FAILED
          Richard Ding made changes -
          Attachment PIG-1341.patch [ 12440415 ]
          Richard Ding made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Richard Ding made changes -
          Fix Version/s 0.7.0 [ 12314397 ]
          Olga Natkovich made changes -
          Fix Version/s 0.9.0 [ 12315191 ]
          Alan Gates made changes -
          Assignee Richard Ding [ rding ] Alan Gates [ alangates ]
          Alan Gates made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Viraj Bhat made changes -
          Link This issue relates to PIG-1711 [ PIG-1711 ]
          Daniel Dai made changes -
          Link This issue is part of PIG-1745 [ PIG-1745 ]
          Olga Natkovich made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Alan Gates
              Reporter:
              Viraj Bhat
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development