vikramahuja1001 commented on a change in pull request #4162:
URL: https://github.com/apache/carbondata/pull/4162#discussion_r657013330



##########
File path: 
integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSparkSqlParserUtil.scala
##########
@@ -447,21 +447,31 @@ object CarbonSparkSqlParserUtil {
       table: String,
       columnName: String,
       columnNameCopy: String,
-      dataType: String,
+      dataType: Option[String],
       values: Option[List[(Int, Int)]],
-      comment: Option[String]
+      comment: Option[String],
+      complexChild: Option[Field]
   ): CarbonAlterTableColRenameDataTypeChangeCommand = {
     val isColumnRename = !columnName.equalsIgnoreCase(columnNameCopy)
-    val alterTableColRenameAndDataTypeChangeModel =
+    val alterTableColRenameAndDataTypeChangeModel = if 
(!dataType.equals(None)) {

Review comment:
       instead of duplicating the whole thing, just put the 
columnName/columnNameCopy and datatype.get.tolowerCase/complexChild to 2 
variables depending on the conditions and use them, because most of the 
variables are same.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to