[jira] [Commented] (SPARK-10794) Spark-SQL- select query on table column with binary Data Type displays error message- java.lang.ClassCastException: java.lang.String cannot be cast to [B

2016-10-08 Thread Xiao Li (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-10794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15558631#comment-15558631
 ] 

Xiao Li commented on SPARK-10794:
-

The related parts are changed a lot. Could you retry it? Thanks!

> Spark-SQL- select query on table column with binary Data Type displays error 
> message- java.lang.ClassCastException: java.lang.String cannot be cast to [B
> -
>
> Key: SPARK-10794
> URL: https://issues.apache.org/jira/browse/SPARK-10794
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.5.0
> Environment: Spark 1.5.0 running on MapR 5.0 sandbox
>Reporter: Anilkumar Kalshetti
>Priority: Critical
> Attachments: binaryDataType.png, spark_1_5_0.png, testbinary.txt
>
>
> Spark-SQL connected to Hive Metastore-- MapR5.0 has Hive 1.0.0
> Use beeline interface for Spark-SQL
> 1] Execute below query to create Table,
> CREATE TABLE default.testbinary  ( 
> c1 binary, 
> c2 string)
> ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
> STORED AS TEXTFILE;
> 2] Copy the attachment file: testbinary.txt in VM directory - /home/mapr/data/
> and execute below script to load data in table
> LOAD DATA LOCAL INPATH '/home/mapr/data/testbinary.txt' INTO TABLE testbinary
> //testbinary.txt  contains data
> 1001,'russia'
> 3] Execute below 'Describe' command to get table information, and select 
> command to get table data
> describe  testbinary;
> SELECT c1 FROM testbinary;
> 4] Select query displays error message:
>  java.lang.ClassCastException: java.lang.String cannot be cast to [B 
> Info:  for same table - select query on column c2 - string datatype works 
> properly
> SELECT c2 FROM testbinary;
> Please refer screenshot- binaryDataType.png



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-10794) Spark-SQL- select query on table column with binary Data Type displays error message- java.lang.ClassCastException: java.lang.String cannot be cast to [B

2015-10-07 Thread Anilkumar Kalshetti (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-10794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14946865#comment-14946865
 ] 

Anilkumar Kalshetti commented on SPARK-10794:
-

Jia Li
Thanks for trying.

Looking at the screenshot you provided,
I can say that, you are connecteing to Hive [not to Spark-SQL]
In beeline interface you used command:
!connect jdbc:hive2://

This is connecting to Hive default port 1
It displayed connection message
Connected to: Apache Hive (Version1.2.1.spark)

Please refer my screenshot:binaryDataType.png
Observe 8th line- Connected to: Spark SQL (version 1.5.0)<-Expected

I have started spark thriftserver on port 10001.
and connected through beeline interface with port 10001.


Thanks,
Anil

> Spark-SQL- select query on table column with binary Data Type displays error 
> message- java.lang.ClassCastException: java.lang.String cannot be cast to [B
> -
>
> Key: SPARK-10794
> URL: https://issues.apache.org/jira/browse/SPARK-10794
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.5.0
> Environment: Spark 1.5.0 running on MapR 5.0 sandbox
>Reporter: Anilkumar Kalshetti
>Priority: Critical
> Attachments: binaryDataType.png, spark_1_5_0.png, testbinary.txt
>
>
> Spark-SQL connected to Hive Metastore-- MapR5.0 has Hive 1.0.0
> Use beeline interface for Spark-SQL
> 1] Execute below query to create Table,
> CREATE TABLE default.testbinary  ( 
> c1 binary, 
> c2 string)
> ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
> STORED AS TEXTFILE;
> 2] Copy the attachment file: testbinary.txt in VM directory - /home/mapr/data/
> and execute below script to load data in table
> LOAD DATA LOCAL INPATH '/home/mapr/data/testbinary.txt' INTO TABLE testbinary
> //testbinary.txt  contains data
> 1001,'russia'
> 3] Execute below 'Describe' command to get table information, and select 
> command to get table data
> describe  testbinary;
> SELECT c1 FROM testbinary;
> 4] Select query displays error message:
>  java.lang.ClassCastException: java.lang.String cannot be cast to [B 
> Info:  for same table - select query on column c2 - string datatype works 
> properly
> SELECT c2 FROM testbinary;
> Please refer screenshot- binaryDataType.png



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org



[jira] [Commented] (SPARK-10794) Spark-SQL- select query on table column with binary Data Type displays error message- java.lang.ClassCastException: java.lang.String cannot be cast to [B

2015-10-06 Thread Jia Li (JIRA)

[ 
https://issues.apache.org/jira/browse/SPARK-10794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14945567#comment-14945567
 ] 

Jia Li commented on SPARK-10794:


I tried the repro steps on spark 1.5.0 for hadoop 2.6 and did not see the 
exception. I'm using hive (version 1.2.1 spark). Please refer to screenshot - 
spark1_5_0.png. 

> Spark-SQL- select query on table column with binary Data Type displays error 
> message- java.lang.ClassCastException: java.lang.String cannot be cast to [B
> -
>
> Key: SPARK-10794
> URL: https://issues.apache.org/jira/browse/SPARK-10794
> Project: Spark
>  Issue Type: Bug
>  Components: SQL
>Affects Versions: 1.5.0
> Environment: Spark 1.5.0 running on MapR 5.0 sandbox
>Reporter: Anilkumar Kalshetti
>Priority: Critical
> Attachments: binaryDataType.png, spark_1_5_0.png, testbinary.txt
>
>
> Spark-SQL connected to Hive Metastore-- MapR5.0 has Hive 1.0.0
> Use beeline interface for Spark-SQL
> 1] Execute below query to create Table,
> CREATE TABLE default.testbinary  ( 
> c1 binary, 
> c2 string)
> ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
> STORED AS TEXTFILE;
> 2] Copy the attachment file: testbinary.txt in VM directory - /home/mapr/data/
> and execute below script to load data in table
> LOAD DATA LOCAL INPATH '/home/mapr/data/testbinary.txt' INTO TABLE testbinary
> //testbinary.txt  contains data
> 1001,'russia'
> 3] Execute below 'Describe' command to get table information, and select 
> command to get table data
> describe  testbinary;
> SELECT c1 FROM testbinary;
> 4] Select query displays error message:
>  java.lang.ClassCastException: java.lang.String cannot be cast to [B 
> Info:  for same table - select query on column c2 - string datatype works 
> properly
> SELECT c2 FROM testbinary;
> Please refer screenshot- binaryDataType.png



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org