Skip to content
Closed
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 @@ -37,6 +37,7 @@ case class LocalTableScanExec(
"numOutputRows" -> SQLMetrics.createMetric(sparkContext, "number of output rows"))

@transient private lazy val unsafeRows: Array[InternalRow] = {
assert(rows != null)
if (rows.isEmpty) {
Array.empty
} else {
Expand All @@ -59,7 +60,9 @@ case class LocalTableScanExec(
}

override protected def stringArgs: Iterator[Any] = {
if (rows.isEmpty) {
if (rows == null) {
Iterator("<unknown>", output)
} else if (rows.isEmpty) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to return different values in a driver and executors? How about computing this value in a driver then passing into executors?

Copy link
Contributor Author

@HeartSaVioR HeartSaVioR Sep 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value except output should be meaningless, otherwise assumption in related comments goes wrong and we should serialize the rows. I guess that's only for visual.

Iterator("<empty>", output)
} else {
Iterator(output)
Expand Down