Robbie Strickland created CASSANDRA-7102:
--------------------------------------------

             Summary: CqlStorage loads incorrect schema
                 Key: CASSANDRA-7102
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7102
             Project: Cassandra
          Issue Type: Bug
          Components: Hadoop
         Environment: OS-X, Hadoop 1.2.1, C* 2.0.0, Pig 0.12
            Reporter: Robbie Strickland


When running C* 2.0.0 with Hadoop 1.2.1 and Pig 0.12, attempting to load a 
table using CqlStorage produces an invalid schema.

Given the following table:

CREATE TABLE checkins (
  user text,
  time bigint,
  checkinid text,
  address text,
  geohash text,
  lat double,
  lon double,
  PRIMARY KEY (user, time, checkinid)
)

I load my table in Pig as follows:

checkins = LOAD 'cql://wxcheckin/checkins' USING CqlStorage()

... which produces the following schema:

(user:chararray,time:long,checkinid:chararray,address:chararray,checkinid:chararray,geohash:chararray,lat:double,lon:double,time:long,user:chararray)

As you can see it repeats the fields in the PK, and it throws an error when any 
field is referenced:

Invalid field projection. Projected field [time] does not exist in schema: 
user:chararray,time:long,checkinid:chararray,address:chararray,checkinid:chararray,geohash:chararray,lat:double,lon:double,time:long,user:chararray.

Simply upgrading to C* 2.0.7 fixes the issue.




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to