Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ case class SparkUDAFWrapperContext[B](serialized: ByteBuffer) extends Logging {
// initialize all nondeterministic children exprs
expr.foreach {
case nondeterministic: Nondeterministic =>
nondeterministic.initialize(TaskContext.get.partitionId())
nondeterministic.initialize(TaskContext.get match {
case tc: TaskContext => tc.partitionId()
case null => 0
})
case _ =>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ case class SparkUDFWrapperContext(serialized: ByteBuffer) extends Logging {
// initialize all nondeterministic children exprs
expr.foreach {
case nondeterministic: Nondeterministic =>
nondeterministic.initialize(TaskContext.get.partitionId())
nondeterministic.initialize(TaskContext.get match {
case tc: TaskContext => tc.partitionId()
case null => 0
})
case _ =>
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ case class SparkUDTFWrapperContext(serialized: ByteBuffer) extends Logging {
// initialize all nondeterministic children exprs
expr.foreach {
case nondeterministic: Nondeterministic =>
nondeterministic.initialize(TaskContext.get.partitionId())
nondeterministic.initialize(TaskContext.get match {
case tc: TaskContext => tc.partitionId()
case null => 0
})
case _ =>
}

Expand Down
Loading