Weixin-Xu commented on code in PR #13492:
URL: https://github.com/apache/gluten/pull/13492#discussion_r4421413395
##########
backends-bolt/src/main/scala/org/apache/gluten/execution/ColumnarPartialGenerateExec.scala:
##########
@@ -335,24 +256,11 @@ case class ColumnarPartialGenerateExec(generateExec:
GenerateExec, child: SparkP
return Iterator.empty
}
- val colSizes = Array.fill(generateExec.generatorOutput.length)(0L)
- rowResults.foreach {
- row =>
- for (i <- variableWidthFields) {
- colSizes(i) = colSizes(i) + fieldsSizeGetter(i)(row, i)
- }
- }
-
- val rightResultVectors: Array[ArrowWritableColumnVector] =
- ArrowWritableColumnVector.allocateColumns(rowResults.length, colSizes,
rightSchema)
- val rightTargetRow = new ArrowColumnarRow(rightResultVectors)
-
- rowResults.foreach(row => writeRowUnsafe(row, rightTargetRow))
- rightTargetRow.finishWriteRow()
+ val rightTargetBatch = ArrowColumnVectors.fromRows(rightSchema,
rowResults.iterator)
Review Comment:
Added explicit fallback for SQL_SCALAR_PANDAS_ITER_UDF until row-based
input/output alignment is supported. This prevents iterator UDFs that combine
or split batches from entering the batch-index-based path. Regular scalar
pandas UDFs retain native execution, with a row-count check before joining.
--
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]