[jira] [Comment Edited] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate
[ https://issues.apache.org/jira/browse/SPARK-24631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16577502#comment-16577502 ] Yuming Wang edited comment on SPARK-24631 at 8/12/18 11:18 AM: --- I hit this issue. fixed it by recreate table/view. Can you execute 2 SQLs like below: {code:sql} desc testtable; {code} {code:sql} show create table testtable; {code} was (Author: q79969786): 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] [Comment Edited] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate
[ https://issues.apache.org/jira/browse/SPARK-24631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16520576#comment-16520576 ] vaquar khan edited comment on SPARK-24631 at 6/22/18 4:43 PM: -- Database type (MYSQL,Hbase etc ), column descriptions (int,bigdecimal etc ) all possible detail will help to reproduce issue. What type of connection are you using JDBC , database version , spark version ? was (Author: vaquar.k...@gmail.com): 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] [Comment Edited] (SPARK-24631) Cannot up cast column from bigint to smallint as it may truncate
[ https://issues.apache.org/jira/browse/SPARK-24631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16520533#comment-16520533 ] vaquar khan edited comment on SPARK-24631 at 6/22/18 3:57 PM: -- 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 ) was (Author: vaquar.k...@gmail.com): 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