Daniel Dai created PIG-3570:
-------------------------------
Summary: Rollback PIG-3060
Key: PIG-3570
URL: https://issues.apache.org/jira/browse/PIG-3570
Project: Pig
Issue Type: Bug
Components: impl
Reporter: Daniel Dai
Assignee: Daniel Dai
Fix For: 0.12.1
Will result missing records in some cases. One case is when we have two flatten
in a single pipeline, when the first flatten still hold some records, the
second flatten cannot return EOP just because an empty bag. Here is the test
script:
{code}
a = load '1.txt' as (bag1:bag{(t:int)});
b = foreach a generate flatten(bag1) as field1;
c = foreach b generate flatten(GenBag(field1));
dump c;
{code}
GenBag:
{code}
public class GenBag extends EvalFunc<DataBag> {
@Override
public DataBag exec(Tuple input) throws IOException {
Integer content = (Integer)input.get(0);
DataBag bag = BagFactory.getInstance().newDefaultBag();
if (content > 10) {
Tuple t = TupleFactory.getInstance().newTuple();
t.append(content);
bag.add(t);
}
return bag;
}
}
{code}
Input:
{code}
{(1),(12),(9)}
{(15),(2)}
{code}
The test case in PIG-3060 fails if rollback, need to fix it when rollback.
--
This message was sent by Atlassian JIRA
(v6.1#6144)