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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org