hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dai (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-1415) LoadFunc signature is not correct in LoadFunc.getSchema sometimes
Date Mon, 17 May 2010 17:21:42 GMT

     [ https://issues.apache.org/jira/browse/PIG-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Dai updated PIG-1415:
----------------------------

           Status: Resolved  (was: Patch Available)
     Hadoop Flags: [Reviewed]
    Fix Version/s: 0.7.0
                       (was: 0.8.0)
       Resolution: Fixed

Patch committed to both 0.7 branch and trunk.

> 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.7.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.


Mime
View raw message