[
https://issues.apache.org/jira/browse/PIG-4851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15212505#comment-15212505
]
Koji Noguchi commented on PIG-4851:
-----------------------------------
Noticed the bug when reviewing a different issue with our user's custom loader
that extends PigStorage and appended hardcoded value to the tuple.
In 0.12, PIG-3123 added a feature that skips identity projection when possible
and moved the Null padding logic to inside PigStorage getNext().
This itself is debatable since it broke our user's custom loader (that extended
PigStorage), but more serious issue exists with _other_ Loaders that lack this
padding logic, like CSVLoader from description.
Reviewing the code, I think the issue exists for Loader that implements
LoadPushDown but LoLoad.getDeterminedSchema() returns null.
> Null not padded when input has less fields than declared schema for some
> loader
> -------------------------------------------------------------------------------
>
> Key: PIG-4851
> URL: https://issues.apache.org/jira/browse/PIG-4851
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.12.1, 0.13.0, 0.14.0, 0.15.0
> Reporter: Koji Noguchi
> Assignee: Koji Noguchi
>
> {code:title=test.pig}
> A = load 'input.txt' using org.apache.pig.piggybank.storage.CSVLoader() as
> (field1, field2);
> dump A;
> {code}
> {code:title=input.txt}
> a
> b,
> c,d
> ,e
> f
> {code}
> {code:title=expected output by pig-0.11}
> (a,)
> (b,)
> (c,d)
> (,e)
> (f,)
> {code}
> {code:title=incorrect output by trunk and probably from 0.12}
> (a)
> (b)
> (c,d)
> (,e)
> (f)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)