viirya commented on code in PR #905:
URL: https://github.com/apache/datafusion-comet/pull/905#discussion_r1744021968


##########
common/src/main/scala/org/apache/comet/vector/NativeUtil.scala:
##########
@@ -110,12 +132,12 @@ class NativeUtil {
    * @return
    *   a list of Comet vectors
    */
-  def importVector(arrayAddress: Array[Long]): Seq[CometVector] = {
+  def importVector(arrayAddrs: Array[Long], schemaAddrs: Array[Long]): 
Seq[CometVector] = {
     val arrayVectors = mutable.ArrayBuffer.empty[CometVector]
 
-    for (i <- arrayAddress.indices by 2) {
-      val arrowSchema = ArrowSchema.wrap(arrayAddress(i + 1))
-      val arrowArray = ArrowArray.wrap(arrayAddress(i))
+    (0 until arrayAddrs.length).foreach { i =>
+      val arrowSchema = ArrowSchema.wrap(schemaAddrs(i))
+      val arrowArray = ArrowArray.wrap(arrayAddrs(i))

Review Comment:
   Good catch.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to