Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
reflect feedbacks
  • Loading branch information
HeartSaVioR committed Sep 14, 2022
commit beecc9e66fab4ffeda2f64381297e502532bc0d8
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import org.apache.spark.{SparkEnv, TaskContext}
import org.apache.spark.api.python.{BasePythonRunner, PythonRDD}
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.execution.arrow.ArrowWriter
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.types.StructType
import org.apache.spark.sql.util.ArrowUtils
import org.apache.spark.util.Utils
Expand All @@ -36,8 +35,6 @@ import org.apache.spark.util.Utils
* JVM (an iterator of internal rows + additional data if required) to Python (Arrow).
*/
private[python] trait PythonArrowInput[IN] { self: BasePythonRunner[IN, _] =>
protected val sqlConf = SQLConf.get

protected val workerConf: Map[String, String]

protected val schema: StructType
Expand Down Expand Up @@ -112,10 +109,10 @@ private[python] trait BasicPythonArrowInput extends PythonArrowInput[Iterator[In
self: BasePythonRunner[Iterator[InternalRow], _] =>

protected def writeIteratorToArrowStream(
root: VectorSchemaRoot,
writer: ArrowStreamWriter,
dataOut: DataOutputStream,
inputIterator: Iterator[Iterator[InternalRow]]): Unit = {
root: VectorSchemaRoot,
writer: ArrowStreamWriter,
dataOut: DataOutputStream,
inputIterator: Iterator[Iterator[InternalRow]]): Unit = {
val arrowWriter = ArrowWriter.create(root)

while (inputIterator.hasNext) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ private[python] trait BasicPythonArrowOutput extends PythonArrowOutput[ColumnarB
self: BasePythonRunner[_, ColumnarBatch] =>

protected def deserializeColumnarBatch(
batch: ColumnarBatch,
schema: StructType): ColumnarBatch = batch
batch: ColumnarBatch,
schema: StructType): ColumnarBatch = batch
}