Login  Register

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #4139: [CARBONDATA-4191] update table for primitive column not working when complex child column name and primitive column name match

Posted by GitBox on May 25, 2021; 6:00am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-maheshrajus-opened-a-new-pull-request-4139-WIP-update-table-for-primitive-column-nh-tp108346p108358.html


ajantha-bhat commented on a change in pull request #4139:
URL: https://github.com/apache/carbondata/pull/4139#discussion_r638477137



##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/parser/CarbonSpark2SqlParser.scala
##########
@@ -257,6 +259,25 @@ class CarbonSpark2SqlParser extends CarbonDDLSqlParser {
     (SET ~> "(" ~> repsep(element, ",") <~ ")") ~
     ("=" ~> restInput) <~ opt(";") ^^ {
       case tab ~ columns ~ rest =>
+        // If update is received for complex data types then throw exception
+        var finalColumns = List.empty[String]
+        val updateColumns: java.util.List[String] = new util.ArrayList[String]()
+        columns.foreach { column =>
+          if (column.contains('.')) {
+            val columnFullName = column.split('.')
+            if (columnFullName.length >= 3) {

Review comment:
       can you add some comments about why are you checking with 3 here ?




--
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:
[hidden email]