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/10/12 08:52:51 UTC

[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

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



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