Pig
  1. Pig
  2. PIG-3162

PigTest.assertOutput doesn't allow non-default delimiter

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.11
    • Fix Version/s: None
    • Component/s: tools
    • Labels:

      Description

      PigTest.assertInput(String aliasInput, String[] input, String alias, String[] expected) assumes that the default delimiter is used (i.e. tab char) in input data.

      TestPig.java
      override(aliasInput, String.format(
          "%s = LOAD '%s' AS %s;", aliasInput, destination, sb.toString()));
      

      But it will be useful to be able to use a non-default delimiter. For example, here is an email from the user mailing list:
      http://search-hadoop.com/m/Pxcfq1TrnIb/PigUnit+test+for+script+with+non-default+PigStorage+delimiter&subj=PigUnit+test+for+script+with+non+default+PigStorage+delimiter

      1. PIG-3162.nosw.patch.txt
        2 kB
        Johnny Zhang
      2. PIG-3162.patch.txt
        3 kB
        Johnny Zhang
      3. PIG-3162-2.nows.patch.txt
        3 kB
        Johnny Zhang
      4. PIG-3162-2.patch.txt
        3 kB
        Johnny Zhang

        Activity

        Cheolsoo Park created issue -
        Cheolsoo Park made changes -
        Field Original Value New Value
        Labels newbie
        Johnny Zhang made changes -
        Assignee Johnny Zhang [ dreambird ]
        Johnny Zhang made changes -
        Attachment PIG-3162.nosw.patch.txt [ 12569427 ]
        Attachment PIG-3162.patch.txt [ 12569428 ]
        Johnny Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Cheolsoo Park made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Johnny Zhang made changes -
        Attachment PIG-3162-2.patch.txt [ 12571318 ]
        Attachment PIG-3162-2.nows.patch.txt [ 12571319 ]
        Johnny Zhang made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Cheolsoo Park made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Cheolsoo Park made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Johnny Zhang
            Reporter:
            Cheolsoo Park
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development