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

PigTest.assertOutput doesn't allow non-default delimiter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.11
    • None
    • tools

    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

      Attachments

        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

          People

            dreambird Johnny Zhang
            cheolsoo Cheolsoo Park
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: