advancedxy commented on code in PR #211:
URL:
https://github.com/apache/arrow-datafusion-comet/pull/211#discussion_r1536653339
##########
common/src/main/scala/org/apache/comet/vector/NativeUtil.scala:
##########
@@ -46,29 +48,27 @@ class NativeUtil {
* the output stream
*/
def serializeBatches(batches: Iterator[ColumnarBatch], out: OutputStream):
Long = {
- var schemaRoot: Option[VectorSchemaRoot] = None
- var writer: Option[ArrowStreamWriter] = None
+ var writer: Option[CometArrowStreamWriter] = None
var rowCount = 0
batches.foreach { batch =>
val (fieldVectors, batchProviderOpt) = getBatchFieldVectors(batch)
- val root = schemaRoot.getOrElse(new
VectorSchemaRoot(fieldVectors.asJava))
+ val root = new VectorSchemaRoot(fieldVectors.asJava)
val provider = batchProviderOpt.getOrElse(dictionaryProvider)
Review Comment:
Hmm. It seems `getBatchFieldVectors` only checks same dictionary provider
across arrays but not batches. Maybe we should add that too? Anyway, it's kind
of out of this PR's scope. Maybe in a separate issue to track that.
--
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]