cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-5941) Incorrect Schema with PIG CqlStorage Queries
Date Tue, 27 Aug 2013 18:23:52 GMT

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

Alex Liu commented on CASSANDRA-5941:
-------------------------------------

git checkout cassandra-1.2 branch. then patch -p1 < 5867-bug-fix-filter-push-down-1.2-branch.txt
                
> Incorrect Schema with PIG CqlStorage Queries
> --------------------------------------------
>
>                 Key: CASSANDRA-5941
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5941
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: James Schappet
>            Assignee: Alex Liu
>
> A = LOAD 'cql://my/data?where_clause=key%3D\'status\' ' USING CqlStorage() AS 
>         (
>                 type:chararray,
>                 barcode:chararray,
>                 row_id:bytearray,
>                 key:chararray,
>                 status:chararray
>         );
> DESCRIBE A;
> --A: {type: chararray,barcode: chararray,row_id: bytearray,key: chararray,status: chararray}
> B = FOREACH A GENERATE FLATTEN( status );
> I am trying to process the following data:
> B = FOREACH A GENERATE FLATTEN( status);
> DUMB B;
> (value,LIVING)
> (value,LIVING)
> (value,LIVING)
> (value,DECEASED)
> (value,LIVING)
> (value,DECEASED)
> (value,DECEASED)
> (value,LIVING)
> But when I try to filter it (FILTER A BY status MATCHES 'DECEASED') 
> I get the following error:
> 2013-08-23 08:47:16,290 [Thread-4] WARN  org.apache.hadoop.mapred.LocalJobRunner - job_local_0001
> java.lang.ClassCastException: org.apache.pig.data.BinSedesTuple cannot be cast to java.lang.String
>     at org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.PORegexp.getNext(PORegexp.java:84)
>     at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POFilter.getNext(POFilter.java:148)
>     at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:290)
>     at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:233)
>     at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapReduce$Reduce.runPipeline(PigGenericMapReduce.java:460)
> ...
> There are two StackOverFlow questions related to this:
> http://stackoverflow.com/questions/18407248/cce-binsedestuple-cannot-be-cast-to-string?lq=1
> http://stackoverflow.com/questions/18391552/cqlstorage-generates-wrong-pig-schema?lq=1

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message