Github user manishgupta88 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/1885#discussion_r164956772
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala
---
@@ -249,6 +249,27 @@ class DDLStrategy(sparkSession: SparkSession) extends
SparkStrategy {
ExecutedCommandExec(
CarbonAlterTableUnsetCommand(tableName, propKeys, ifExists,
isView)) :: Nil
}
+ case rename@AlterTableRenamePartitionCommand(tableName,
oldPartition, newPartition) =>
+ val dbOption = tableName.database.map(_.toLowerCase)
+ val tableIdentifier =
TableIdentifier(tableName.table.toLowerCase(), dbOption)
+ val isCarbonTable =
CarbonEnv.getInstance(sparkSession).carbonMetastore
+ .tableExists(tableIdentifier)(sparkSession)
+ if (isCarbonTable) {
+ throw new UnsupportedOperationException("Renaming partition on
table is not supported")
+ } else {
+ ExecutedCommandExec(rename) :: Nil
+ }
--- End diff --
correct the code alignment
---