Github user sounakr commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1469#discussion_r153095114
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonHiveMetaStore.scala
---
@@ -153,8 +153,11 @@ class CarbonHiveMetaStore extends CarbonFileMetastore {
val dbName = oldTableIdentifier.getDatabaseName
val tableName = oldTableIdentifier.getTableName
val schemaParts =
CarbonUtil.convertToMultiGsonStrings(wrapperTableInfo, "=", "'", "")
-
sparkSession.sessionState.asInstanceOf[CarbonSessionState].metadataHive.runSqlHive(
- s"ALTER TABLE $dbName.$tableName SET SERDEPROPERTIES($schemaParts)")
+ val hiveClient =
sparkSession.asInstanceOf[CarbonSession].sharedState.externalCatalog
+ .asInstanceOf[HiveExternalCatalog].client
+ hiveClient.runSqlHive(s"ALTER TABLE $dbName.$tableName SET
SERDEPROPERTIES($schemaParts)")
+
+ sparkSession.sessionState
--- End diff --
Removed
---