[
https://issues.apache.org/jira/browse/PIG-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Dai updated PIG-1415:
----------------------------
Attachment: PIG-1415-1.patch
> LoadFunc signature is not correct in LoadFunc.getSchema sometimes
> -----------------------------------------------------------------
>
> Key: PIG-1415
> URL: https://issues.apache.org/jira/browse/PIG-1415
> Project: Pig
> Issue Type: Bug
> Components: impl
> Affects Versions: 0.7.0
> Reporter: Daniel Dai
> Assignee: Daniel Dai
> Fix For: 0.8.0
>
> Attachments: PIG-1415-1.patch
>
>
> The following script does not set signature correctly when we call
> LoadFunc.getSchema.
> a = load 'xxx' using TableLoader('xxx') as (a, b, c);
> However, if we don't give schema to a, we get the right signature:
> a = load 'xxx' using TableLoader('xxx);
> Diagnosis:
> Parser will generate LoadClause before go to the generation "Alias =
> LoadClause", which actually set signature to the LOLoad. When we give a
> schema, parser try to call LOLoad.setSchema(), internally it will call
> LoadFunc.determineSchema. And at that time, signature has not been set yet.
> This relates to the change we cache determinedSchema in LOLoad
> [PIG-1317|https://issues.apache.org/jira/browse/PIG-1317]. Before that
> change, we will later call LoadFunc.getSchema() again using the right
> signature. Now we cache determinedSchema, so LoadFunc don't have a chance to
> get the right signature inside LoadFunc.getSchema()
> Solution:
> We shall not call LoadFunc.determineSchema inside LOLoad.setSchema().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.