<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Topic: Pig error (type mismatch) when using key from CF in join or group</title>
		<link>http://www.datastax.com/support-forums/topic/pig-error-type-mismatch-when-using-key-from-cf-in-join-or-group</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Tue, 18 Jun 2013 22:52:03 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/topic/pig-error-type-mismatch-when-using-key-from-cf-in-join-or-group" rel="self" type="application/rss+xml" />

		<item>
			<title>Anonymous on "Pig error (type mismatch) when using key from CF in join or group"</title>
			<link>http://www.datastax.com/support-forums/topic/pig-error-type-mismatch-when-using-key-from-cf-in-join-or-group#post-1831</link>
			<pubDate>Thu, 03 May 2012 19:42:24 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1831@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Unfortunately there is no work around currently available, actually you have to options:  a. you would have to wait for 2.1 release with updated CassandraStorage, b. you would have to re-compile C*, include it into DSE  and use org.apache.cassandra.hadoop.pig.CassandraStorage class at your own risk.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Pig error (type mismatch) when using key from CF in join or group"</title>
			<link>http://www.datastax.com/support-forums/topic/pig-error-type-mismatch-when-using-key-from-cf-in-join-or-group#post-1787</link>
			<pubDate>Fri, 27 Apr 2012 16:39:00 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1787@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Using DSE 1.x&#60;br /&#62;
I have a simple CF with UTF8 key, column, &#38;amp; value.&#60;/p&#62;
&#60;p&#62;I can use the column or value in a join or group by, but if I try to use the key, I get the following error:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
Type mismatch in key from map: expected org.apache.pig.impl.io.NullableText, recieved org.apache.pig.impl.io.NullableBytesWritable
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Simplest example:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
p1 = LOAD 'cassandra://keyspace/CF' USING CassandraStorage() AS (key:chararray, columns: bag{T: tuple(property:chararray, value:chararray)});&#60;br /&#62;
p2 = group p1 by columns::property;&#60;br /&#62;
dump p2;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Works just fine, but changing the group by to:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
p2 = group p1 by key;&#60;br /&#62;
dump p2;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;will fail with the type mismatch error.&#60;/p&#62;
&#60;p&#62;However, if I do a load, using the same schema, from a text file with lines of the form:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
key {(c1,v1),(c2,v2),(c3,v3)}
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I can group (or join) by the key successfully.&#60;/p&#62;
&#60;p&#62;Any suggestions for work around?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
John
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
