[
https://issues.apache.org/jira/browse/PIG-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13545941#comment-13545941
]
pablo martinez commented on PIG-3057:
-------------------------------------
sure, I like better your solution
let's see if I understood correctly.
1_ the new method addTupleValue is gonna be something like this ?
private void addTupleValue(byte[] buf, int start, int len) {
mProtoTuple.add(readField(buf, start, len));
}
2_ and getNext() will replace its 2 calls to readField with something like the
following ?
now: readField(buf, start, i);
new one: addTupleValue(buf, start, i);
now: readField(buf, start, len);
new one: addTupleValue(buf, start, len);
thank you so much,
> make readField protected to be able to override it if we extend PigStorage
> --------------------------------------------------------------------------
>
> Key: PIG-3057
> URL: https://issues.apache.org/jira/browse/PIG-3057
> Project: Pig
> Issue Type: Improvement
> Components: build, internal-udfs
> Affects Versions: 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.9.2, 0.10.0
> Reporter: pablo martinez
> Priority: Trivial
> Labels: patch
> Attachments: PIG-3057_1.patch, PigStorage_readField.patch
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> for the cases when we need to extend PigStorage just to override readField.
> Currently, we need to copy/paste several private fields and all getNext
> I've changed readField from private to protected and added a new method:
> protected void addToCurrentTuple(DataByteArray data)
--
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