akashrn5 commented on a change in pull request #3647: [CARBONDATA-3348]  Fix 
the case insensitive validation for duplicate sort column.
URL: https://github.com/apache/carbondata/pull/3647#discussion_r386812861
 
 

 ##########
 File path: 
integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
 ##########
 @@ -760,11 +760,13 @@ object CommonUtil {
       fields: Seq[(String, String)],
       varcharCols: Seq[String]
   ): Unit = {
-    if (sortKey.diff(sortKey.distinct).length > 0 ||
-        (sortKey.length > 1 && sortKey.contains(""))) {
+    val sortKeyLowerCase = sortKey.map(_.toLowerCase())
+    if ((sortKeyLowerCase).diff(sortKeyLowerCase.distinct).length > 0 ||
+      (sortKeyLowerCase.length > 1 && sortKeyLowerCase.contains(""))) {
       throw new MalformedCarbonCommandException(
         "SORT_COLUMNS Either having duplicate columns : " +
-        sortKey.diff(sortKey.distinct).mkString(",") + " or it contains 
illegal argumnet.")
+          sortKeyLowerCase.diff(sortKeyLowerCase.distinct).mkString(",") +
+          " or it contains illegal argument.")
 
 Review comment:
   `contains` to `contains an`

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to