Skip to content
Snippets Groups Projects
Commit dd6d55d5 authored by Eric Liang's avatar Eric Liang Committed by Reynold Xin
Browse files

[SPARK-20398][SQL] range() operator should include cancellation reason when killed

## What changes were proposed in this pull request?

https://issues.apache.org/jira/browse/SPARK-19820 adds a reason field for why tasks were killed. However, for backwards compatibility it left the old TaskKilledException constructor which defaults to "unknown reason".
The range() operator should use the constructor that fills in the reason rather than dropping it on task kill.

## How was this patch tested?

Existing tests, and I tested this manually.

Author: Eric Liang <ekl@databricks.com>

Closes #17692 from ericl/fix-kill-reason-in-range.
parent 39e303a8
No related branches found
No related tags found
No related merge requests found
......@@ -463,9 +463,7 @@ case class RangeExec(range: org.apache.spark.sql.catalyst.plans.logical.Range)
| $number = $batchEnd;
| }
|
| if ($taskContext.isInterrupted()) {
| throw new TaskKilledException();
| }
| $taskContext.killTaskIfInterrupted();
|
| long $nextBatchTodo;
| if ($numElementsTodo > ${batchSize}L) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment