Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Nov 26, 2024
1 parent 1321f08 commit 20aae2f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ abstract class ColumnarToRowExecBase(child: SparkPlan)

override def rowType0(): Convention.RowType = Convention.RowType.VanillaRow

override def requiredChildConvention(): Seq[ConventionReq] = {
List(
ConventionReq.ofBatch(
ConventionReq.BatchType.Is(BackendsApiManager.getSettings.primaryBatchType)))
}

override def doExecuteBroadcast[T](): Broadcast[T] = {
// Require for explicit implementation, otherwise throw error.
super.doExecuteBroadcast[T]()
Expand All @@ -56,10 +62,4 @@ abstract class ColumnarToRowExecBase(child: SparkPlan)
override def doExecute(): RDD[InternalRow] = {
doExecuteInternal()
}

override def requiredChildConvention(): Seq[ConventionReq] = {
List(
ConventionReq.ofBatch(
ConventionReq.BatchType.Is(BackendsApiManager.getSettings.primaryBatchType)))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.apache.gluten.execution

import org.apache.gluten.backendsapi.BackendsApiManager
import org.apache.gluten.extension.columnar.transition.Convention
import org.apache.gluten.extension.columnar.transition.{Convention, ConventionReq}

import org.apache.spark.broadcast
import org.apache.spark.rdd.RDD
Expand Down Expand Up @@ -49,6 +49,10 @@ abstract class RowToColumnarExecBase(child: SparkPlan)

override def rowType0(): Convention.RowType = Convention.RowType.None

override def requiredChildConvention(): Seq[ConventionReq] = {
Seq(ConventionReq.row)
}

final override def doExecute(): RDD[InternalRow] = {
child.execute()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ abstract class ColumnarWriteFilesExec protected (
override lazy val references: AttributeSet = AttributeSet.empty

override def requiredChildConvention(): Seq[ConventionReq] = {
List(
ConventionReq.ofBatch(
ConventionReq.BatchType.Is(BackendsApiManager.getSettings.primaryBatchType)))
val req = ConventionReq.ofBatch(
ConventionReq.BatchType.Is(BackendsApiManager.getSettings.primaryBatchType))
Seq.tabulate(2)(
_ => {
req
})
}

/**
Expand Down

0 comments on commit 20aae2f

Please sign in to comment.