ShreelekhyaG commented on a change in pull request #4180: URL: https://github.com/apache/carbondata/pull/4180#discussion_r694645452
########## File path: integration/spark/src/main/scala/org/apache/spark/util/AlterTableUtil.scala ########## @@ -1105,24 +1106,33 @@ object AlterTableUtil { val new_column_name = newDimensionInfo .columnName.split(CarbonCommonConstants.POINT.toCharArray).last val new_column_datatype = newDimensionInfo.dataType + + // check if column datatypes are altered. If altered, validate them if (!old_column_datatype.equalsIgnoreCase(new_column_datatype)) { - // datatypes of complex children cannot be altered. So throwing exception for now. - throw new UnsupportedOperationException( - "Altering datatypes of any child column is not supported") + this.validateColumnDataType(newDimensionInfo, oldDimensionInfo) + alteredDatatypesMap += (oldDimensionInfo.getColName -> newDimensionInfo) Review comment: If we maintain 1 map then there would be confusion while validating columns for rename and change datatype operations. I have made a change for `alteredDatatypesMap `to store column name and `datatype ` directly instead of `newDimensionInfo `. -- 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. To unsubscribe, e-mail: dev-unsubscr...@carbondata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org