wchevreuil commented on code in PR #169:
URL: https://github.com/apache/hbase-connectors/pull/169#discussion_r4231452525


##########
spark4/hbase-spark4/src/main/scala/org/apache/hadoop/hbase/spark/datasources/HBasePartitionReader.scala:
##########
@@ -282,6 +283,19 @@ class HBasePartitionReader(
         DateTimeUtils.fromJavaTimestamp(t)
       case dt: DecimalType =>
         Decimal(value.asInstanceOf[java.math.BigDecimal], dt.precision, 
dt.scale)
+      case structType: StructType =>
+        val row = value.asInstanceOf[Row]
+        val values = new Array[Any](structType.length)
+        var i = 0
+        while (i < structType.length) {
+          if (row.isNullAt(i)) {
+            values(i) = null
+          } else {
+            values(i) = convertToInternalRow(row.get(i), 
structType.fields(i).dataType)

Review Comment:
   Addressing in next commit. Added recursive ArrayType and MapType cases to 
convertToInternalRow that wrap values in GenericArrayData and ArrayBasedMapData.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to