You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sunil Aryal (Jira)" <ji...@apache.org> on 2020/03/05 06:39:00 UTC

[jira] [Created] (SPARK-31048) alter hive column datatype is not supported

Sunil Aryal created SPARK-31048:
-----------------------------------

             Summary: alter hive column datatype is not supported
                 Key: SPARK-31048
                 URL: https://issues.apache.org/jira/browse/SPARK-31048
             Project: Spark
          Issue Type: Bug
          Components: Spark Shell, SQL
    Affects Versions: 2.2.2
         Environment: spark sql with hive metadata store.
            Reporter: Sunil Aryal


describe tb2;
Getting log thread is interrupted, since query is done!
+-----------------+-----------------+-----------------+--+
| col_name | data_type | comment |
+-----------------+-----------------+-----------------+--+
| fn | int | NULL |
| ln | string | NULL |
| age | int | NULL |
| # Partition Information | | |
| # col_name | data_type | comment |
| age | int | NULL |
+-----------------+-----------------+-----------------+--+
6 rows selected (0.213 seconds)
 alter table tb2 change fn fn bigint;
Getting log thread is interrupted, since query is done!
Error: org.apache.spark.sql.AnalysisException: ALTER TABLE CHANGE COLUMN is not supported for changing column 'fn' with type 'IntegerType' to 'fn' with type 'LongType'; (state=,code=0)
java.sql.SQLException: org.apache.spark.sql.AnalysisException: ALTER TABLE CHANGE COLUMN is not supported for changing column 'fn' with type 'IntegerType' to 'fn' with type 'LongType';
 at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:296)
 at org.apache.hive.beeline.Commands.execute(Commands.java:848)
 at org.apache.hive.beeline.Commands.sql(Commands.java:713)
 at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:973)
 at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:813)
 at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:771)
 at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:484)
 at org.apache.hive.beeline.BeeLine.main(BeeLine.java:467)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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