[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-08-12 Thread Yuming Wang (JIRA)


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

Yuming Wang commented on SPARK-24631:
-

I hit this issue. fixed it by recreate table/view. Can you execute 2 SQLs like 
below:

 
{code:java}
desc testtable;
{code}
{code:java}
show create table testtable;
{code}
 

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-26 Thread Marcelo Vanzin (JIRA)


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

Marcelo Vanzin commented on SPARK-24631:


Sorry for the noise, pasted the wrong bug number in my PR.

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-26 Thread Sivakumar (JIRA)


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

Sivakumar commented on SPARK-24631:
---

The table that I queried was a view. That view was pointing to a actual table. 
The only thing I have done is dropped the current view and recreated it. After 
that issue got resolved. The same table didn't through any error while the 
program was in Spark 1.6. Since we  have Migrated to Spark2.2 It thrown error.

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-25 Thread vaquar khan (JIRA)


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

vaquar khan commented on SPARK-24631:
-

Why pull request? 
Please close jira no issue found. 


> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-25 Thread Apache Spark (JIRA)


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

Apache Spark commented on SPARK-24631:
--

User 'vanzin' has created a pull request for this issue:
https://github.com/apache/spark/pull/21639

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-24 Thread Hyukjin Kwon (JIRA)


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

Hyukjin Kwon commented on SPARK-24631:
--

[~HadoopSiva], you mean it's resolved in the upper versions?

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-22 Thread Sivakumar (JIRA)


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

Sivakumar commented on SPARK-24631:
---

Its resolved, Actually I was trying to query a view. Recreate d the view and it 
worked.

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-22 Thread vaquar khan (JIRA)


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

vaquar khan commented on SPARK-24631:
-

You just need to cast column , issue will be resolved {{}}

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-22 Thread vaquar khan (JIRA)


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

vaquar khan commented on SPARK-24631:
-

Database type (MYSQL,Hbase etc ), column descriptions (int,bigdecimal etc ) all 
possible detail will help to reproduce issue

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-22 Thread Sivakumar (JIRA)


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

Sivakumar commented on SPARK-24631:
---

Updated with some additional data. I have tried the same in spark2-shell as 
well, But it is throwing the same error for that particular table.

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#ff}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
> + more data,
> val df=spark.sql("select* from table_name")
> I am just trying this query a table. But with other tables it is running fine.
> {color:#d04437}18/06/22 01:36:29 ERROR Driver1: [] [main] Exception occurred: 
> org.apache.spark.sql.AnalysisException: Cannot up cast `column_name` from 
> bigint to column_name#2525: smallint as it may truncate.{color}
> that specific column is having Bigint datatype, But there were other table's 
> that ran fine with Bigint columns.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate

2018-06-22 Thread vaquar khan (JIRA)


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

vaquar khan commented on SPARK-24631:
-

Can you add complete error logs and if possible smalll code example with test 
data ( data you can find in your prod table where it's failing 

> Cannot up cast column from bigint to smallint as it may truncate
> 
>
> Key: SPARK-24631
> URL: https://issues.apache.org/jira/browse/SPARK-24631
> Project: Spark
>  Issue Type: New JIRA Project
>  Components: Spark Core, Spark Submit
>Affects Versions: 2.2.1
>Reporter: Sivakumar
>Priority: Major
>
> Getting the below error when executing the simple select query,
> Sample:
> Table Description:
> name: String, id: BigInt
> val df=spark.sql("select name,id from testtable")
> ERROR: {color:#FF}Cannot up cast column "id" from bigint to smallint as 
> it may truncate.{color}
> I am not doing any transformation's, I am just trying to query a table ,But 
> still I am getting the error.
> I am getting this error only on production cluster and only for a single 
> table, other tables are running fine.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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