Adam Silberstein created PIG-3412:
-------------------------------------
Summary: jsonstorage breaks when tuple does not have as many
columns as schema
Key: PIG-3412
URL: https://issues.apache.org/jira/browse/PIG-3412
Project: Pig
Issue Type: Improvement
Reporter: Adam Silberstein
Noticed this error when doing something like
A = flatten(STRSPLIT($0, ',', 3)) AS (col1:chararray, col2:chararray,
col3:chararray);
STORE A INTO 'foo' USING JsonStorage();
If the string being split doesn't generate 3 columns, then JsonStorage errors
out with an index exception. This is because it tries to read the fields of
the tuple passed to it or not. See JsonStorage, line 148.
MY patch checks the length of the tuple. If any schema column positions are
past the length of the tuple, it fills in null.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira