You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (Jira)" <ji...@apache.org> on 2020/10/12 19:42:00 UTC
[jira] [Updated] (PIG-5243) describe with typecast on as-clause
shows the types before the typecasting
[ https://issues.apache.org/jira/browse/PIG-5243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Koji Noguchi updated PIG-5243:
------------------------------
Attachment: pig-5243-v01.patch
Component/s: parser
First tried to find a way to update the PigServer.Graph.operators after the conversion. There wasn't any clean ways of accessing PigServer.Graph.operators when logicalplan was updated.
Second, thought about instead of adding a typecast foreach, convert the original foreach to typecast and then create the copy of original foreach.
I think this second method would work but a bit messy updating the internal references.
Then lastly, added a reference for this typecast foreach and follow it only for "describe".
This last method works and it only changes the behavior for "describe", thus less risky.
Attaching pig-5243-v01.patch with this last method.
> describe with typecast on as-clause shows the types before the typecasting
> --------------------------------------------------------------------------
>
> Key: PIG-5243
> URL: https://issues.apache.org/jira/browse/PIG-5243
> Project: Pig
> Issue Type: Bug
> Components: parser
> Reporter: Koji Noguchi
> Assignee: Koji Noguchi
> Priority: Minor
> Attachments: pig-5243-v01.patch
>
>
> For code like
> {code}
> a = load 'test.txt' as (mytuple:tuple (), gpa:float);
> b = foreach a generate mytuple as (mytuple2:(name:int, age:double));
> store b into '/tmp/deleteme';
> {code}
> {{describe b}} shows
> {noformat}
> b: {mytuple2: (name: bytearray,age: bytearray)}
> {noformat}
> Execution wise, it is fine since there is an extra foreach typecasting the above relation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)