[
https://issues.apache.org/jira/browse/PIG-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13545660#comment-13545660
]
Bill Graham commented on PIG-3057:
----------------------------------
Oops, I thought I had submitted a comment before the last one that was really
just in preview-mode...
What if we instead change {{readField}} top this:
{noformat}
protected DataByteArray readField(byte[] bytes, int start, int end) {
if (start == end) {
return null;
}
else {
return new DataByteArray(bytes, start, end);
}
}
{noformat}
and then added a new private {{addTupleValue(..)}} method that calls it. It
seems like that would achieve the same goal in a more intuitive way w.r.t
subclassing.
> 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