Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-31048

alter hive column datatype is not supported

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 2.2.2
    • None
    • Spark Shell, SQL
    • spark sql with hive metadata store.

    Description

      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
      1. Partition Information
         
      1. 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)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sunilaryal Sunil Aryal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment