[GitHub] [carbondata] Karan980 commented on a change in pull request #3979: [Carbondata-3954] Fix insertion from ORC table into carbon table when sort scope is global sort

Posted by GitBox on
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/GitHub-carbondata-Karan980-opened-a-new-pull-request-3979-WIP-Fix-insertion-from-ORC-table-into-carbt-tp101671p101719.html


Karan980 commented on a change in pull request #3979:
URL: https://github.com/apache/carbondata/pull/3979#discussion_r503140543



##########
File path: integration/spark/src/main/scala/org/apache/carbondata/spark/util/CommonUtil.scala
##########
@@ -1011,38 +1011,46 @@ object CommonUtil {
       objectDataType: DataType): AnyRef = {
     objectDataType match {
       case _: ArrayType =>
-        val arrayDataType = objectDataType.asInstanceOf[ArrayType]
-        val arrayData = data.asInstanceOf[UnsafeArrayData]
-        val size = arrayData.numElements()
-        val childDataType = arrayDataType.elementType
-        val arrayChildObjects = new Array[AnyRef](size)
-        var i = 0
-        while (i < size) {
-          arrayChildObjects(i) = convertSparkComplexTypeToCarbonObject(arrayData.get(i,
-            childDataType), childDataType)
-          i = i + 1
+        if (data == null) {

Review comment:
       For dateType if data is null that is handled by some other way which is not returning null. That's why i didn't put it after line 1011




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