jackylee-ch commented on code in PR #8914:
URL: https://github.com/apache/incubator-gluten/pull/8914#discussion_r2016395751
##########
backends-velox/src/main/scala/org/apache/gluten/execution/ColumnarCollectLimitExec.scala:
##########
@@ -32,88 +32,101 @@ import org.apache.spark.sql.vectorized.ColumnarBatch
case class ColumnarCollectLimitExec(
limit: Int,
- child: SparkPlan
-) extends ColumnarCollectLimitBaseExec(limit, child) {
+ child: SparkPlan,
+ offset: Int = 0
+) extends ColumnarCollectLimitBaseExec(limit, child, offset) {
+
+ assert(limit >= 0 || (limit == -1 && offset > 0))
Review Comment:
nit: This should already checked in `CollectLimitExec`, we can remove this.
##########
gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/offload/OffloadSingleNodeRules.scala:
##########
@@ -344,9 +344,11 @@ object OffloadOthers {
child)
case plan: CollectLimitExec =>
logDebug(s"Columnar Processing for ${plan.getClass} is currently
supported.")
+ val offset =
SparkShimLoader.getSparkShims.getCollectLimitOffset(plan)
BackendsApiManager.getSparkPlanExecApiInstance.genColumnarCollectLimitExec(
plan.limit,
- plan.child
+ plan.child,
+ offset
Review Comment:
we can directlly use `plan.offset` here.
--
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]