You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2010/07/09 21:40:50 UTC
[jira] Updated: (PIG-618) Bad error message when period rather than
comma appears as separator in UDF parameter list
[ https://issues.apache.org/jira/browse/PIG-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich updated PIG-618:
-------------------------------
Fix Version/s: 0.9.0
> Bad error message when period rather than comma appears as separator in UDF parameter list
> -------------------------------------------------------------------------------------------
>
> Key: PIG-618
> URL: https://issues.apache.org/jira/browse/PIG-618
> Project: Pig
> Issue Type: Bug
> Components: impl
> Affects Versions: 0.2.0
> Reporter: Viraj Bhat
> Fix For: 0.9.0
>
>
> Pig script generates the following compile-time error as it contains a period between 0.8 and 0.9 in the MYUDF parameter list. The "Invalid alias MYUDF" message should be changed to something that is more meaningful for the user to trace.
> {code}
> register 'MYUDF.jar';
> A = load 'mydata.txt' using PigStorage() as (
> col1: int,
> col2: chararray,
> col3: long,
> col4: int
> );
> B = group A by (
> col1,
> col2
> );
> C = foreach B generate
> group,
> MYUDF(A.col3, 0.0, 0.8. 0.9) as stat: (min, max);
> describe C;
> {code}
> ========================================================================================================
> java.io.IOException: Invalid alias: MYUDF in {group: (col1: int,col2: chararray),A: {col1: int,col2: chararray,col
> 3: long,col4: int}}
> at org.apache.pig.PigServer.parseQuery(PigServer.java:301)
> at org.apache.pig.PigServer.registerQuery(PigServer.java:266)
> at org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:439)
> at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:249)
> at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:84)
> at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:64)
> at org.apache.pig.Main.main(Main.java:306)
> Caused by: org.apache.pig.impl.logicalLayer.parser.ParseException: Invalid alias: MYUDF in {group: (col1: int,col2
> : chararray),A: {col1: int,col2: chararray,col3: long,col4: int}}
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.AliasFieldOrSpec(QueryParser.java:6005)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.ColOrSpec(QueryParser.java:5863)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseEvalSpec(QueryParser.java:4049)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.UnaryExpr(QueryParser.java:3946)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.CastExpr(QueryParser.java:3900)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.MultiplicativeExpr(QueryParser.java:3809)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.AdditiveExpr(QueryParser.java:3735)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.InfixExpr(QueryParser.java:3701)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItem(QueryParser.java:3627)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.FlattenedGenerateItemList(QueryParser.java:3550)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.GenerateStatement(QueryParser.java:3494)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.NestedBlock(QueryParser.java:2969)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.ForEachClause(QueryParser.java:2384)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.BaseExpr(QueryParser.java:1019)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.Expr(QueryParser.java:795)
> at org.apache.pig.impl.logicalLayer.parser.QueryParser.Parse(QueryParser.java:590)
> at org.apache.pig.impl.logicalLayer.LogicalPlanBuilder.parse(LogicalPlanBuilder.java:60)
> at org.apache.pig.PigServer.parseQuery(PigServer.java:298)
> ========================================================================================================
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.