You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Alan Gates (JIRA)" <ji...@apache.org> on 2008/07/28 22:23:31 UTC
[jira] Updated: (PIG-344) Ordering on types other than byte array
fails.
[ https://issues.apache.org/jira/browse/PIG-344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alan Gates updated PIG-344:
---------------------------
Attachment: sortkey.patch
MRCompiler was assuming that all order bys were on bytearrays. This fixes it to use the type provided in the physical plan instead of hardwire it to byte array.
> Ordering on types other than byte array fails.
> ----------------------------------------------
>
> Key: PIG-344
> URL: https://issues.apache.org/jira/browse/PIG-344
> Project: Pig
> Issue Type: Bug
> Affects Versions: types_branch
> Reporter: Alan Gates
> Assignee: Alan Gates
> Priority: Critical
> Fix For: types_branch
>
> Attachments: sortkey.patch
>
>
> {code}
> A = load '/Users/gates/test/data/studenttab10' as (name: chararray, age: long, gpa: float);
> B = order A by gpa;
> dump B;
> {code}
> java.io.IOException: Type mismatch in key from map: expected org.apache.hadoop.io.BytesWritable, recieved org.apache.hadoop.io.FloatWritable
> at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:419)
> at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Map.collect(PigMapReduce.java:79)
> at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:119)
> at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapReduce$Map.map(PigMapReduce.java:71)
> at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:47)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:219)
> at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:157)
> If the gpa type is not declared, then the sort passes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.