Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # dev >> A solution for the confusion around "as alias:type" ?


+
Jonathan Coveney 2012-06-20, 04:57
+
Aniket Mokashi 2012-06-20, 05:14
+
Jonathan Coveney 2012-06-20, 05:36
Copy link to this message
-
Re: A solution for the confusion around "as alias:type" ?
We have already discussed it and come to a decision:
See https://issues.apache.org/jira/browse/PIG-2315
If somebody feels like implementing it I would be happy :)

Cheers,

--
Gianmarco
On Wed, Jun 20, 2012 at 7:36 AM, Jonathan Coveney <[EMAIL PROTECTED]>wrote:

> $ cat data6
> 1
> 2
> 3
> 4
> 5
>
> $ java -cp pig.jar org.apache.pig.Main -x local
> a = load 'data6' as (x:chararray);
> b = foreach a generate x as y:int;
> c = foreach b generate y+y;
> dump c;
>
> Eventually:
> java.lang.ClassCastException: java.lang.String cannot be cast to
> java.lang.Number
> at
>
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Add.genericGetNext(Add.java:89)
> at
>
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Add.getNext(Add.java:114)
> at
>
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:344)
> at
>
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:353)
> at
>
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:294)
> at
>
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:273)
> at
>
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:268)
> at
>
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:64)
> at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
> at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
> at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:212)
>
>
> 2012/6/19 Aniket Mokashi <[EMAIL PROTECTED]>
>
> > I am not aware of the difference, can you please elaborate? That would
> help
> > other users too [+user@pig?]...
> >
> > Thanks,
> > Aniket
> >
> > On Tue, Jun 19, 2012 at 9:57 PM, Jonathan Coveney <[EMAIL PROTECTED]
> > >wrote:
> >
> > > I cannot tell you the number of scripts I have had die because of this,
> > and
> > > the mass confusion it causes. Is there any reason why we can't just
> have
> > >
> > > "thing as alias:type" and "(type)thing as alias" be synonymous?
> > >
> >
> >
> >
> > --
> > "...:::Aniket:::... Quetzalco@tl"
> >
>
+
Aniket Mokashi 2012-06-20, 09:48
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB