[jira] [Updated] (PIG-2017) consumeMap() fails with EmptyStackException

2011-04-27 Thread Jacob Perkins (JIRA)

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

Jacob Perkins updated PIG-2017:
---

Attachment: utf8storagepatch_withtests.txt

Test cases for map values containing close parenthesis and closed curly braces. 
Both pass.

> consumeMap() fails with EmptyStackException
> ---
>
> Key: PIG-2017
> URL: https://issues.apache.org/jira/browse/PIG-2017
> Project: Pig
>  Issue Type: Bug
>Reporter: Jacob Perkins
> Attachments: utf8storagepatch.txt, utf8storagepatch_withtests.txt
>
>
> If a map is read in its serialized form, eg: [key#value], then the 
> consumeMap() method of Utf8StorageConverter fails for the following maps:
> {code:none}
> [a#)]
> [a#}]
> [a#"take a look at my lovely curly brace, }"]
> [a#'oh look, a closed parenthesis! )']
> {code}
> There are a couple of options:
> 1. Define an escape sequence (ie. quotes or a backslash)
> 2. Call it a bad record, go get a beer, and move on.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1826) Unexpected data type -1 found in stream error

2011-04-27 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026055#comment-13026055
 ] 

jirapos...@reviews.apache.org commented on PIG-1826:



---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/670/#review594
---

Ship it!


+1

- thejas


On 2011-04-27 21:28:47, Daniel Dai wrote:
bq.  
bq.  ---
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/670/
bq.  ---
bq.  
bq.  (Updated 2011-04-27 21:28:47)
bq.  
bq.  
bq.  Review request for pig and thejas.
bq.  
bq.  
bq.  Summary
bq.  ---
bq.  
bq.  See PIG-1826
bq.  
bq.  
bq.  This addresses bug PIG-1826.
bq.  https://issues.apache.org/jira/browse/PIG-1826
bq.  
bq.  
bq.  Diffs
bq.  -
bq.  
bq.
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/data/BinInterSedes.java
 1096629 
bq.
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/MiniCluster.java
 1096629 
bq.
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestEvalPipeline2.java
 1096629 
bq.  
bq.  Diff: https://reviews.apache.org/r/670/diff
bq.  
bq.  
bq.  Testing
bq.  ---
bq.  
bq.  Test-patch:
bq.   [exec] +1 overall.  
bq.   [exec] 
bq.   [exec] +1 @author.  The patch does not contain any @author tags.
bq.   [exec] 
bq.   [exec] +1 tests included.  The patch appears to include 6 new or 
modified tests.
bq.   [exec] 
bq.   [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
bq.   [exec] 
bq.   [exec] +1 javac.  The applied patch does not increase the total 
number of javac compiler warnings.
bq.   [exec] 
bq.   [exec] +1 findbugs.  The patch does not introduce any new 
Findbugs warnings.
bq.   [exec] 
bq.   [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.
bq.  
bq.  Unit-test:
bq.  all pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> Unexpected data type -1 found in stream error
> -
>
> Key: PIG-1826
> URL: https://issues.apache.org/jira/browse/PIG-1826
> Project: Pig
>  Issue Type: Bug
>Affects Versions: 0.8.0
> Environment: This is pig 0.8.0 on a linux box
>Reporter: Jonathan Coveney
>Assignee: Daniel Dai
> Fix For: 0.9.0
>
> Attachments: PIG-1826-1.patch, PIG-1826.tar.gz, numgraph.java
>
>
> When running the attached udf I get the title error. By inserting printlns 
> extensively, the script is functioning properly and returning a DataBag, but 
> for whatever reason, pig does not detect it as such.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Re: Review Request: Unexpected data type -1 found in stream error

2011-04-27 Thread thejas . nair

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/670/#review594
---

Ship it!


+1

- thejas


On 2011-04-27 21:28:47, Daniel Dai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/670/
> ---
> 
> (Updated 2011-04-27 21:28:47)
> 
> 
> Review request for pig and thejas.
> 
> 
> Summary
> ---
> 
> See PIG-1826
> 
> 
> This addresses bug PIG-1826.
> https://issues.apache.org/jira/browse/PIG-1826
> 
> 
> Diffs
> -
> 
>   
> http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/data/BinInterSedes.java
>  1096629 
>   
> http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/MiniCluster.java
>  1096629 
>   
> http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestEvalPipeline2.java
>  1096629 
> 
> Diff: https://reviews.apache.org/r/670/diff
> 
> 
> Testing
> ---
> 
> Test-patch:
>  [exec] +1 overall.  
>  [exec] 
>  [exec] +1 @author.  The patch does not contain any @author tags.
>  [exec] 
>  [exec] +1 tests included.  The patch appears to include 6 new or 
> modified tests.
>  [exec] 
>  [exec] +1 javadoc.  The javadoc tool did not generate any warning 
> messages.
>  [exec] 
>  [exec] +1 javac.  The applied patch does not increase the total 
> number of javac compiler warnings.
>  [exec] 
>  [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
> warnings.
>  [exec] 
>  [exec] +1 release audit.  The applied patch does not increase the 
> total number of release audit warnings.
> 
> Unit-test:
> all pass.
> 
> 
> Thanks,
> 
> Daniel
> 
>



[jira] [Updated] (PIG-2018) NPE for co-group with group-by column having complex schema and different load functions for each input

2011-04-27 Thread Thejas M Nair (JIRA)

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

Thejas M Nair updated PIG-2018:
---

Attachment: PIG-2018.1.patch

> NPE for co-group with group-by column having complex schema and different 
> load functions for each input
> ---
>
> Key: PIG-2018
> URL: https://issues.apache.org/jira/browse/PIG-2018
> Project: Pig
>  Issue Type: Bug
>Reporter: Thejas M Nair
>Assignee: Thejas M Nair
> Fix For: 0.9.0
>
> Attachments: PIG-2018.1.patch
>
>
> {code}
> l1 = load 'x' using PigStorage(':') as (a : (i : int),b,c);
> l2 = load 'x' as (a,b,c);
> cg = cogroup l1 by a, l2 by a;
> explain cg;
> Gives -
> ERROR 1067: Unable to explain alias cg
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1067: Unable to 
> explain alias cg
> at org.apache.pig.PigServer.explain(PigServer.java:1075)
> at 
> org.apache.pig.tools.grunt.GruntParser.explainCurrentBatch(GruntParser.java:381)
> at 
> org.apache.pig.tools.grunt.GruntParser.processExplain(GruntParser.java:313)
> at 
> org.apache.pig.tools.grunt.GruntParser.processExplain(GruntParser.java:276)
> at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.Explain(PigScriptParser.java:665)
> at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:325)
> at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:176)
> at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:152)
> at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:90)
> at org.apache.pig.Main.run(Main.java:554)
> at org.apache.pig.Main.main(Main.java:109)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.pig.newplan.logical.visitor.LineageFindRelVisitor.mapMatchLoadFuncToUid(LineageFindRelVisitor.java:528)
> at 
> org.apache.pig.newplan.logical.visitor.LineageFindRelVisitor.visit(LineageFindRelVisitor.java:287)
> at 
> org.apache.pig.newplan.logical.relational.LOCogroup.accept(LOCogroup.java:235)
> at 
> org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
> at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
> at 
> org.apache.pig.newplan.logical.visitor.CastLineageSetter.(CastLineageSetter.java:57)
> at org.apache.pig.PigServer$Graph.compile(PigServer.java:1683)
> at org.apache.pig.PigServer$Graph.compile(PigServer.java:1659)
> at org.apache.pig.PigServer$Graph.access$200(PigServer.java:1389)
> at org.apache.pig.PigServer.buildStorePlan(PigServer.java:1277)
> at org.apache.pig.PigServer.explain(PigServer.java:1038)
> ... 10 more
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (PIG-2018) NPE for co-group with group-by column having complex schema and different load functions for each input

2011-04-27 Thread Thejas M Nair (JIRA)
NPE for co-group with group-by column having complex schema and different load 
functions for each input
---

 Key: PIG-2018
 URL: https://issues.apache.org/jira/browse/PIG-2018
 Project: Pig
  Issue Type: Bug
Reporter: Thejas M Nair
Assignee: Thejas M Nair
 Fix For: 0.9.0


{code}
l1 = load 'x' using PigStorage(':') as (a : (i : int),b,c);
l2 = load 'x' as (a,b,c);
cg = cogroup l1 by a, l2 by a;
explain cg;

Gives -
ERROR 1067: Unable to explain alias cg

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1067: Unable to 
explain alias cg
at org.apache.pig.PigServer.explain(PigServer.java:1075)
at 
org.apache.pig.tools.grunt.GruntParser.explainCurrentBatch(GruntParser.java:381)
at 
org.apache.pig.tools.grunt.GruntParser.processExplain(GruntParser.java:313)
at 
org.apache.pig.tools.grunt.GruntParser.processExplain(GruntParser.java:276)
at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.Explain(PigScriptParser.java:665)
at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:325)
at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:176)
at 
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:152)
at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:90)
at org.apache.pig.Main.run(Main.java:554)
at org.apache.pig.Main.main(Main.java:109)
Caused by: java.lang.NullPointerException
at 
org.apache.pig.newplan.logical.visitor.LineageFindRelVisitor.mapMatchLoadFuncToUid(LineageFindRelVisitor.java:528)
at 
org.apache.pig.newplan.logical.visitor.LineageFindRelVisitor.visit(LineageFindRelVisitor.java:287)
at 
org.apache.pig.newplan.logical.relational.LOCogroup.accept(LOCogroup.java:235)
at 
org.apache.pig.newplan.DependencyOrderWalker.walk(DependencyOrderWalker.java:75)
at org.apache.pig.newplan.PlanVisitor.visit(PlanVisitor.java:50)
at 
org.apache.pig.newplan.logical.visitor.CastLineageSetter.(CastLineageSetter.java:57)
at org.apache.pig.PigServer$Graph.compile(PigServer.java:1683)
at org.apache.pig.PigServer$Graph.compile(PigServer.java:1659)
at org.apache.pig.PigServer$Graph.access$200(PigServer.java:1389)
at org.apache.pig.PigServer.buildStorePlan(PigServer.java:1277)
at org.apache.pig.PigServer.explain(PigServer.java:1038)
... 10 more

{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-2017) consumeMap() fails with EmptyStackException

2011-04-27 Thread Daniel Dai (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-2017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026029#comment-13026029
 ] 

Daniel Dai commented on PIG-2017:
-

Looks good. Can you add couple of test cases (One good place to add is 
TestConversions.testBytesToComplexTypeMisc), and I can review and commit the 
patch?

> consumeMap() fails with EmptyStackException
> ---
>
> Key: PIG-2017
> URL: https://issues.apache.org/jira/browse/PIG-2017
> Project: Pig
>  Issue Type: Bug
>Reporter: Jacob Perkins
> Attachments: utf8storagepatch.txt
>
>
> If a map is read in its serialized form, eg: [key#value], then the 
> consumeMap() method of Utf8StorageConverter fails for the following maps:
> {code:none}
> [a#)]
> [a#}]
> [a#"take a look at my lovely curly brace, }"]
> [a#'oh look, a closed parenthesis! )']
> {code}
> There are a couple of options:
> 1. Define an escape sequence (ie. quotes or a backslash)
> 2. Call it a bad record, go get a beer, and move on.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1826) Unexpected data type -1 found in stream error

2011-04-27 Thread jirapos...@reviews.apache.org (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026017#comment-13026017
 ] 

jirapos...@reviews.apache.org commented on PIG-1826:



---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/670/
---

Review request for pig and thejas.


Summary
---

See PIG-1826


This addresses bug PIG-1826.
https://issues.apache.org/jira/browse/PIG-1826


Diffs
-

  
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/data/BinInterSedes.java
 1096629 
  
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/MiniCluster.java
 1096629 
  
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestEvalPipeline2.java
 1096629 

Diff: https://reviews.apache.org/r/670/diff


Testing
---

Test-patch:
 [exec] +1 overall.  
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 6 new or 
modified tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.

Unit-test:
all pass.


Thanks,

Daniel



> Unexpected data type -1 found in stream error
> -
>
> Key: PIG-1826
> URL: https://issues.apache.org/jira/browse/PIG-1826
> Project: Pig
>  Issue Type: Bug
>Affects Versions: 0.8.0
> Environment: This is pig 0.8.0 on a linux box
>Reporter: Jonathan Coveney
>Assignee: Daniel Dai
> Fix For: 0.9.0
>
> Attachments: PIG-1826-1.patch, PIG-1826.tar.gz, numgraph.java
>
>
> When running the attached udf I get the title error. By inserting printlns 
> extensively, the script is functioning properly and returning a DataBag, but 
> for whatever reason, pig does not detect it as such.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Review Request: Unexpected data type -1 found in stream error

2011-04-27 Thread Daniel Dai

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/670/
---

Review request for pig and thejas.


Summary
---

See PIG-1826


This addresses bug PIG-1826.
https://issues.apache.org/jira/browse/PIG-1826


Diffs
-

  
http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/data/BinInterSedes.java
 1096629 
  
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/MiniCluster.java
 1096629 
  
http://svn.apache.org/repos/asf/pig/trunk/test/org/apache/pig/test/TestEvalPipeline2.java
 1096629 

Diff: https://reviews.apache.org/r/670/diff


Testing
---

Test-patch:
 [exec] +1 overall.  
 [exec] 
 [exec] +1 @author.  The patch does not contain any @author tags.
 [exec] 
 [exec] +1 tests included.  The patch appears to include 6 new or 
modified tests.
 [exec] 
 [exec] +1 javadoc.  The javadoc tool did not generate any warning 
messages.
 [exec] 
 [exec] +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
 [exec] 
 [exec] +1 findbugs.  The patch does not introduce any new Findbugs 
warnings.
 [exec] 
 [exec] +1 release audit.  The applied patch does not increase the 
total number of release audit warnings.

Unit-test:
all pass.


Thanks,

Daniel



[jira] [Commented] (PIG-1772) Pig 090 Documentation

2011-04-27 Thread Daniel Dai (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026004#comment-13026004
 ] 

Daniel Dai commented on PIG-1772:
-

pig-1772-beta2-2.patch committed to trunk and 0.9 branch.

> Pig 090 Documentation
> -
>
> Key: PIG-1772
> URL: https://issues.apache.org/jira/browse/PIG-1772
> Project: Pig
>  Issue Type: Task
>  Components: documentation
>Affects Versions: 0.9.0
>Reporter: Corinne Chandel
>Assignee: Corinne Chandel
> Fix For: 0.9.0
>
> Attachments: penny-archt.jpg, pig-1772-1.patch, pig-1772-2.patch, 
> pig-1772-3.patch, pig-1772-beta-1-2.patch, pig-1772-beta-1-3.patch, 
> pig-1772-beta-1.patch, pig-1772-beta2-1.patch, pig-1772-beta2-2.patch
>
>
> Pig 090 documentation 
> Will include multiple patches as documentation is released with Pig  090 
> milestones (M1, M2, M3, ... )

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIG-2015) Explain writes out logical plan twice

2011-04-27 Thread Alan Gates (JIRA)

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

Alan Gates updated PIG-2015:


Status: Patch Available  (was: Open)

> Explain writes out logical plan twice
> -
>
> Key: PIG-2015
> URL: https://issues.apache.org/jira/browse/PIG-2015
> Project: Pig
>  Issue Type: Bug
>  Components: impl
>Affects Versions: 0.9.0
>Reporter: Alan Gates
>Priority: Minor
> Fix For: 0.9.0
>
> Attachments: PIG-2015.patch
>
>
> Running explain on a script writes out the logical plan twice, the physical 
> plan once, and the map reduce plan once.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIG-2015) Explain writes out logical plan twice

2011-04-27 Thread Alan Gates (JIRA)

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

Alan Gates updated PIG-2015:


Attachment: PIG-2015.patch

> Explain writes out logical plan twice
> -
>
> Key: PIG-2015
> URL: https://issues.apache.org/jira/browse/PIG-2015
> Project: Pig
>  Issue Type: Bug
>  Components: impl
>Affects Versions: 0.9.0
>Reporter: Alan Gates
>Priority: Minor
> Fix For: 0.9.0
>
> Attachments: PIG-2015.patch
>
>
> Running explain on a script writes out the logical plan twice, the physical 
> plan once, and the map reduce plan once.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIG-1772) Pig 090 Documentation

2011-04-27 Thread Corinne Chandel (JIRA)

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

Corinne Chandel updated PIG-1772:
-

Attachment: penny-archt.jpg
pig-1772-beta2-2.patch

(1) Beta2-2 patch. Includes fixes for:
>PIG-1752, PIG-1622
> convergence (cont.xml)
> penny (test.xml)
> filter functions (udf.xml)

Apply this patch to Trunk and 090-branch

(2) penny-archt.jpg (for new penny section)

Add this jpg to Trunk and 090-branch here:

\src\docs\src\documentation\content\xdocs\images


> Pig 090 Documentation
> -
>
> Key: PIG-1772
> URL: https://issues.apache.org/jira/browse/PIG-1772
> Project: Pig
>  Issue Type: Task
>  Components: documentation
>Affects Versions: 0.9.0
>Reporter: Corinne Chandel
>Assignee: Corinne Chandel
> Fix For: 0.9.0
>
> Attachments: penny-archt.jpg, pig-1772-1.patch, pig-1772-2.patch, 
> pig-1772-3.patch, pig-1772-beta-1-2.patch, pig-1772-beta-1-3.patch, 
> pig-1772-beta-1.patch, pig-1772-beta2-1.patch, pig-1772-beta2-2.patch
>
>
> Pig 090 documentation 
> Will include multiple patches as documentation is released with Pig  090 
> milestones (M1, M2, M3, ... )

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (PIG-1999) Macro alias masker should consider schema context

2011-04-27 Thread Richard Ding (JIRA)

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

Richard Ding updated PIG-1999:
--

Attachment: PIG-1999_2.patch

Rebase the patch.

> Macro alias masker should consider schema context 
> --
>
> Key: PIG-1999
> URL: https://issues.apache.org/jira/browse/PIG-1999
> Project: Pig
>  Issue Type: Bug
>  Components: impl
>Affects Versions: 0.9.0
>Reporter: Richard Ding
>Assignee: Richard Ding
> Fix For: 0.9.0
>
> Attachments: PIG-1999_1.patch, PIG-1999_2.patch
>
>
> Macro alias masker doesn't consider the current schema context. This results 
> errors when deciding with alias to mask. Here is an example:
> {code}
> define toBytearray(in, intermediate) returns e { 
>a = load '$in' as (name:chararray, age:long, gpa: float);
>b = group a by  name;
>c = foreach b generate a, (1,2,3);
>store c into '$intermediate' using BinStorage();
>d = load '$intermediate' using BinStorage() as (b:bag{t:tuple(x,y,z)}, 
> t2:tuple(a,b,c));
>$e = foreach d generate COUNT(b), t2.a, t2.b, t2.c;
> };
>  
> f = toBytearray ('data', 'output1');
> {code} 
> Now the alias masker mistakes b in COUNT(b) as an alias instead of b in the 
> current schema.
> The workaround is to not use alias as as names in the schema definition. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (PIG-1998) Allow macro to return void

2011-04-27 Thread Richard Ding (JIRA)

[ 
https://issues.apache.org/jira/browse/PIG-1998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025898#comment-13025898
 ] 

Richard Ding commented on PIG-1998:
---

Patch 2 committed to both trunk and 0.9 branch. I'll add new patches to address 
additional review comments.

> Allow macro to return void
> --
>
> Key: PIG-1998
> URL: https://issues.apache.org/jira/browse/PIG-1998
> Project: Pig
>  Issue Type: Improvement
>  Components: impl
>Affects Versions: 0.9.0
>Reporter: Richard Ding
>Assignee: Richard Ding
> Fix For: 0.9.0
>
> Attachments: PIG-1998_1.patch, PIG-1998_2.patch
>
>
> Pig macro is allowed to not have output alias. But this property isn't clear 
> from macro definition and macro invocation (macro inline). Here we propose to 
> make it clear:
> 1. If a macro doesn't output any alias, it must specify void as return value. 
> For example:
> {code}  
> define mymacro(...) returns void {
>... ...
> };
> {code}
> 2. If a macro doesn't output any alias, it must be invoked without return 
> value. For example, to invoke above macro, just specify:
> {code}
> mymacro(...);
> {code}
> 3. Any non-void return alias in the macro definition must exist in the macro 
> body and be prefixed with $. For example:
> {code}  
> define mymacro(...) returns B {
>... ...
>$B = filter ...;
> };
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira