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

Regression: NPE when Pig processes an empty script file

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      If a pig script file is empty and supplied as input for Pig (using -f option), an NPE is thrown. Stacktrace:

      java.lang.NullPointerException
      at java.util.regex.Matcher.getTextLength(Matcher.java:1140)
      at java.util.regex.Matcher.reset(Matcher.java:291)
      at java.util.regex.Matcher.<init>(Matcher.java:211)
      at java.util.regex.Pattern.matcher(Pattern.java:888)
      at org.apache.pig.scripting.ScriptEngine$SupportedScriptLang.accepts(ScriptEngine.java:89)
      at org.apache.pig.scripting.ScriptEngine.getSupportedScriptLang(ScriptEngine.java:163)
      at org.apache.pig.Main.determineScriptType(Main.java:892)
      at org.apache.pig.Main.run(Main.java:378)
      at org.apache.pig.Main.main(Main.java:108)

      This seems related Jython support in 0.9.

        Attachments

        1. PIG-2006.patch
          2 kB
          Xuefu Zhang
        2. PIG-2006-1.patch
          0.5 kB
          Xuefu Zhang

          Activity

            People

            • Assignee:
              xuefuz Xuefu Zhang
              Reporter:
              xuefuz Xuefu Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: