<?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: Strange error with Hive queries</title>
		<link>http://www.datastax.com/support-forums/topic/strange-error-with-hive-queries</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Wed, 19 Jun 2013 08:52:37 +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/strange-error-with-hive-queries" rel="self" type="application/rss+xml" />

		<item>
			<title>pierantonio.merlino on "Strange error with Hive queries"</title>
			<link>http://www.datastax.com/support-forums/topic/strange-error-with-hive-queries#post-7496</link>
			<pubDate>Wed, 14 Nov 2012 10:36:04 +0000</pubDate>
			<dc:creator>pierantonio.merlino</dc:creator>
			<guid isPermaLink="false">7496@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Thank you for the answer.&#60;br /&#62;
I tried with &#60;code&#62;SELECT * FROM MyTable WHERE col1.a = cast(&#38;quot;XXX&#38;quot; as binary);&#60;/code&#62; but the result is:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;FAILED: Hive Internal Error: java.lang.RuntimeException(Internal error:
Cannot find ConstantObjectInspector for BINARY)
java.lang.RuntimeException: Internal error: Cannot find ConstantObjectInspector
for BINARY
	at org.apache.hadoop.hive.serde2.objectinspector.primitive.
PrimitiveObjectInspectorFactory.getPrimitiveWritableConstantObjectInspector
(PrimitiveObjectInspectorFactory.java:196)&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>sam on "Strange error with Hive queries"</title>
			<link>http://www.datastax.com/support-forums/topic/strange-error-with-hive-queries#post-7494</link>
			<pubDate>Wed, 14 Nov 2012 09:49:45 +0000</pubDate>
			<dc:creator>sam</dc:creator>
			<guid isPermaLink="false">7494@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;when I've come across that error its been because the Hive query parser can't determine the Hive type of the operand in the comparision. So, for in this case it can't infer that XXX needs to be of type binary even though col1.a is binary. Does casting the value to Binary help at all?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>pierantonio.merlino on "Strange error with Hive queries"</title>
			<link>http://www.datastax.com/support-forums/topic/strange-error-with-hive-queries#post-7469</link>
			<pubDate>Mon, 12 Nov 2012 14:20:41 +0000</pubDate>
			<dc:creator>pierantonio.merlino</dc:creator>
			<guid isPermaLink="false">7469@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I wrote a custom serde for Hive in order to manage the column composite types in my application.&#60;br /&#62;
Some fields in the composite are binary types.&#60;/p&#62;
&#60;p&#62;All works, but when I perform queries with a WHERE clause like &#60;code&#62;SELECT * FROM MyTable WHERE col1.a = XXX;&#60;/code&#62; where &#60;code&#62;col1.a&#60;/code&#62; is a binary field, I get the following error:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;2012-11-12 15:14:38,008 FATAL ExecMapper: org.apache.hadoop.hive.ql.metadata.
HiveException: Hive Runtime Error while processing row {...
...
Caused by: java.lang.RuntimeException: Hive 2 Internal error: unknown type: binary
	at org.apache.hadoop.hive.serde2.objectinspector.primitive.
PrimitiveObjectInspectorUtils.getDouble(PrimitiveObjectInspectorUtils.java:651)
	at org.apache.hadoop.hive.serde2.objectinspector.primitive.
PrimitiveObjectInspectorConverter$DoubleConverter.convert
(PrimitiveObjectInspectorConverter.java:232)
	at org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPEqual.evaluate
(GenericUDFOPEqual.java:73)
	at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.evaluate
(ExprNodeGenericFuncEvaluator.java:163)
	at org.apache.hadoop.hive.ql.exec.FilterOperator.processOp
(FilterOperator.java:118)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:762)
	at org.apache.hadoop.hive.ql.exec.TableScanOperator.processOp
(TableScanOperator.java:83)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:762)
	at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:531)
	... 9 more&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;The method &#60;code&#62;org.apache.hadoop.hive.serde2.objectinspector.primitive.&#60;/code&#62;&#60;br /&#62;
&#60;code&#62;PrimitiveObjectInspectorUtils.getDouble&#60;/code&#62; indeed does not support binary types, but I don't understand how to solve the problem.&#60;/p&#62;
&#60;p&#62;Can someone help me?&#60;br /&#62;
Thank you in advance
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
