Skip to content

Commit b5aaec0

Browse files
fix altertable catalogTable copy not support spark v4.0
1 parent d4f4d14 commit b5aaec0

File tree

1 file changed

+21
-7
lines changed
  • extensions/spark/kyuubi-spark-connector-hive/src/main/scala/org/apache/kyuubi/spark/connector/hive

1 file changed

+21
-7
lines changed

extensions/spark/kyuubi-spark-connector-hive/src/main/scala/org/apache/kyuubi/spark/connector/hive/HiveTableCatalog.scala

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,27 @@ class HiveTableCatalog(sparkSession: SparkSession)
378378
}
379379

380380
try {
381-
catalog.alterTable(
382-
catalogTable.copy(
383-
properties = properties,
384-
schema = schema,
385-
owner = owner,
386-
comment = comment,
387-
storage = storage))
381+
catalog.alterTable(newCatalogTable(
382+
identifier = catalogTable.identifier,
383+
tableType = catalogTable.tableType,
384+
storage = storage,
385+
schema = schema,
386+
provider = catalogTable.provider,
387+
partitionColumnNames = catalogTable.partitionColumnNames,
388+
bucketSpec = catalogTable.bucketSpec,
389+
owner = owner,
390+
createTime = catalogTable.createTime,
391+
lastAccessTime = catalogTable.lastAccessTime,
392+
createVersion = catalogTable.createVersion,
393+
properties = properties,
394+
stats = catalogTable.stats,
395+
viewText = catalogTable.viewText,
396+
comment = comment,
397+
unsupportedFeatures = catalogTable.unsupportedFeatures,
398+
tracksPartitionsInCatalog = catalogTable.tracksPartitionsInCatalog,
399+
schemaPreservesCase = catalogTable.schemaPreservesCase,
400+
ignoredProperties = catalogTable.ignoredProperties,
401+
viewOriginalText = catalogTable.viewOriginalText))
388402
} catch {
389403
case _: NoSuchTableException =>
390404
throw new NoSuchTableException(ident)

0 commit comments

Comments
 (0)