IceMimosa commented on a change in pull request #3430: [CARBONDATA-3565] Fix 
complex binary data broken issue when loading dataframe data
URL: https://github.com/apache/carbondata/pull/3430#discussion_r405238442
 
 

 ##########
 File path: 
integration/spark/src/main/scala/org/apache/carbondata/spark/rdd/NewCarbonDataLoadRDD.scala
 ##########
 @@ -386,10 +389,15 @@ class NewRddIterator(rddIter: Iterator[Row],
     val len = columns.length
     var i = 0
     while (i < len) {
-      columns(i) = CarbonScalaUtil.getString(row, i, carbonLoadModel, 
serializationNullFormat,
-        complexDelimiters, timeStampFormat, dateFormat,
-        isVarcharType = i < isVarcharTypeMapping.size && 
isVarcharTypeMapping(i),
-        isComplexType = i < isComplexTypeMapping.size && 
isComplexTypeMapping(i))
+      columns(i) = row.get(i) match {
+        case bs if bs.isInstanceOf[Array[Byte]] && isDefaultBinaryDecoder =>
+          bs.asInstanceOf[Array[Byte]]
 
 Review comment:
   Yes, in default binary decoder, `CarbonScalaUtil.getString` may destroy the 
byte[].

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


With regards,
Apache Git Services

Reply via email to