Github user xuanyuanking commented on a diff in the pull request: https://github.com/apache/spark/pull/19773#discussion_r216132779 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala --- @@ -350,16 +366,11 @@ case class AlterTableChangeColumnCommand( s"${schema.fieldNames.mkString("[`", "`, `", "`]")}")) } - // Add the comment to a column, if comment is empty, return the original column. - private def addComment(column: StructField, comment: Option[String]): StructField = { - comment.map(column.withComment(_)).getOrElse(column) - } - --- End diff -- Its also can't work in Hive, I test with Hive 1.2.2 and Hadoop 2.7.3. ``` Logging initialized using configuration in jar:file:/Users/XuanYuan/Source/hive/apache-hive-1.2.2-bin/lib/hive-common-1.2.2.jar!/hive-log4j.properties hive> CREATE TABLE t(a INT, b STRING, c INT) stored as parquet; OK Time taken: 1.604 seconds hive> INSERT INTO t VALUES (1, 'a', 3); Query ID = XuanYuan_20180908230549_3c8732ff-07e0-4a7a-95b4-260aed04a762 Total jobs = 3 Launching Job 1 out of 3 Number of reduce tasks is set to 0 since there's no reduce operator Job running in-process (local Hadoop) SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. 2018-09-08 23:06:08,732 Stage-1 map = 0%, reduce = 0% 2018-09-08 23:06:09,743 Stage-1 map = 100%, reduce = 0% Ended Job = job_local712899233_0001 Stage-4 is selected by condition resolver. Stage-3 is filtered out by condition resolver. Stage-5 is filtered out by condition resolver. Moving data to: file:/Users/XuanYuan/Source/hive/apache-hive-1.2.2-bin/warehouse/t/.hive-staging_hive_2018-09-08_23-05-49_782_100109481692677607-1/-ext-10000 Loading data to table default.t Table default.t stats: [numFiles=1, numRows=1, totalSize=343, rawDataSize=3] MapReduce Jobs Launched: Stage-Stage-1: HDFS Read: 0 HDFS Write: 0 SUCCESS Total MapReduce CPU Time Spent: 0 msec OK Time taken: 20.294 seconds hive> select * from t; OK 1 a 3 Time taken: 0.154 seconds, Fetched: 1 row(s) hive> ALTER TABLE t CHANGE a a STRING; OK Time taken: 0.18 seconds hive> select * from t; OK Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.UnsupportedOperationException: Cannot inspect org.apache.hadoop.io.IntWritable Time taken: 0.116 seconds hive> ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org