You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/03/06 09:47:28 UTC

[GitHub] [carbondata] ajantha-bhat commented on a change in pull request #3654: [CARBONDATA-3734] Fix insert failure on partition table when parition column is in sort column

ajantha-bhat commented on a change in pull request #3654: [CARBONDATA-3734] Fix insert failure on partition table when parition column is in sort column
URL: https://github.com/apache/carbondata/pull/3654#discussion_r388805463
 
 

 ##########
 File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/command/management/CommonLoadUtils.scala
 ##########
 @@ -503,7 +503,20 @@ object CommonLoadUtils {
       if (numPartitions <= 0) {
         numPartitions = partitionsLen
       }
-      val sortColumns = attributes.take(table.getSortColumns.size())
+      val sortColumns =
+      if (table.isHivePartitionTable) {
+        // In case of partition column as sort column, attribute will not have it in the front.
+        // so need to look up the attribute and prepare
+        var sortColsAttr: Seq[AttributeReference] = Seq.empty
 
 Review comment:
   ok. done

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services