hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Ciemiewicz (JIRA)" <j...@apache.org>
Subject [jira] Commented: (PIG-1097) Pig do not support group by boolean type
Date Thu, 19 Nov 2009 19:31:40 GMT

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

David Ciemiewicz commented on PIG-1097:
---------------------------------------

I think that one could argue that Filter functions are REALLY just Eval<Boolean> functions
in disguise.

That Filter functions were a way of adding return type to Pig for Boolean cases when Pig had
no types.

Further, I'd argue, that now that Pig does have data types, that Filter should be deprecated
and all Filter functions should now become Eval<Boolean>.

In otherwords, I believe it was an oversight in the types migration to not migrate Filter
to Eval<Boolean>

> Pig do not support group by boolean type
> ----------------------------------------
>
>                 Key: PIG-1097
>                 URL: https://issues.apache.org/jira/browse/PIG-1097
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>            Reporter: Jeff Zhang
>            Assignee: Jeff Zhang
>            Priority: Minor
>             Fix For: 0.6.0
>
>
> My Script is as following, the TestUDF return boolean type.
> {color:blue}
> DEFINE testUDF org.apache.pig.piggybank.util.TestUDF();
> raw = LOAD 'data/input';
> raw = FOREACH raw GENERATE testUDF();
> raw = GROUP raw BY $0;
> DUMP raw;
> {color}
> *The above script will throw exception:*
> Exception in thread "main" org.apache.pig.impl.logicalLayer.FrontendException: ERROR
1066: Unable to open iterator for alias raw
> 	at org.apache.pig.PigServer.openIterator(PigServer.java:481)
> 	at org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:539)
> 	at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:241)
> 	at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:168)
> 	at org.apache.pig.PigServer.registerScript(PigServer.java:409)
> 	at PigExample.main(PigExample.java:13)
> Caused by: org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1002: Unable to
store alias raw
> 	at org.apache.pig.PigServer.store(PigServer.java:536)
> 	at org.apache.pig.PigServer.openIterator(PigServer.java:464)
> 	... 5 more
> Caused by: org.apache.pig.backend.executionengine.ExecException: ERROR 2043: Unexpected
error during execution.
> 	at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.execute(HExecutionEngine.java:269)
> 	at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:780)
> 	at org.apache.pig.PigServer.store(PigServer.java:528)
> 	... 6 more
> Caused by: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobCreationException:
ERROR 2036: Unhandled key type boolean
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.selectComparator(JobControlCompiler.java:856)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:561)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:251)
> 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:128)
> 	at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.execute(HExecutionEngine.java:249)
> 	... 8 more

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