[
https://issues.apache.org/jira/browse/PIG-2427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Coveney updated PIG-2427:
----------------------------------
Fix Version/s: 0.11
Affects Version/s: 0.11
Status: Patch Available (was: Open)
I ran ant test-commit and ant -Dtestcase=parser/Test* test successfully. Not
sure how else to test this sort of change. It didn't seem like I needed to
change AstPrinter, but let me know if I do.
I added a test case to TestSchema that makes sure that Util.getSchemaFromString
can will create an identical schema via its Schema.toString. I also had to
change one existing test case, because it was assuming (incorrectly) that the
tuple data should be thrown out (of course, that depends on whether you think
it should be, but I strongly believe it shouldn't be thrown out if it is given).
Haven't tested on anything but trunk
> getSchemaFromString throws away the name of the tuple that is in a bag
> ----------------------------------------------------------------------
>
> Key: PIG-2427
> URL: https://issues.apache.org/jira/browse/PIG-2427
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.11
> Reporter: Jonathan Coveney
> Priority: Minor
> Fix For: 0.11
>
> Attachments: PIG2427.patch
>
>
> {code}Schema thing =
> Utils.getSchemaFromString("b:bag{t:tuple(x:int,y:int,z:int)}");
> System.out.println(thing.getField(0).schema.getField(0).alias); //returns
> null{code}
> This isn't a huge issue, but it does seem odd to throw away this information
> unnecessarily. While any bag will of course have thus tuple and no other
> elements, it seems to violate the principle of least astonishment: if the
> tuple name was specified, shouldn't it be kept around?
> Edit: I just found a case where this actually can be a bit annoying. If you
> want to pull that tuple out of the bag, for whatever reason, you've now lost
> its name.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira