[
https://issues.apache.org/jira/browse/PIG-3420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13738879#comment-13738879
]
Yuanli Dong commented on PIG-3420:
----------------------------------
For 1),2) refleted in the new patch.
For 3), you can look at the code in class Schema in avro-1.7.4, the MapSchema
type do not have an implementation of getField method, only RecordSchema has
this function overridden. Then what we need is judging whether the oldSchema is
a instance of RecordSchema, if it's not, we need to directly return it.
Unfortunately, the class is a inner class in Schema class, and it is private,
so we simply cannot achieve this.
> Failed to retrieve values from data loaded by AvroStorage
> ---------------------------------------------------------
>
> Key: PIG-3420
> URL: https://issues.apache.org/jira/browse/PIG-3420
> Project: Pig
> Issue Type: Bug
> Components: impl
> Affects Versions: 0.12
> Reporter: Yuanli Dong
> Fix For: 0.12
>
> Attachments: PIG-3420_08132013.patch
>
>
> Running the following script:
> a = load './newavro/data/avro/EmployeeMapF.ser' USING AvroStorage();
> dump a;
> c = foreach a generate name, office, 'Toyota', cars#'Toyota' as toyota,
> 'Mazda', cars#'Mazda', 'Nissan', cars#'Nissan' as nissan;
> Although object a has all the data loaded, c cannot retrieve the map values,
> column 4,6,8 are empty in the result.
> The map keys is of class Utf8, but the keys used to retrieve data is String,
> that is the reason why we cannot retrieve the values. The patch fix this
> problem.
--
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