Skip to content

Commit

Permalink
Remove redundant toDF() calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-torres committed Aug 29, 2017
1 parent feda29f commit 28aad0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ abstract class Optimizer(sessionCatalog: SessionCatalog)
rule: Rule[LogicalPlan]): Unit = {
assert(
result.isStreaming == original.isStreaming,
s"Rule ${rule.ruleName} changed isStreaming from original ${original.isStreaming}:" +
s"Rule ${rule.ruleName} changed isStreaming from original ${original.isStreaming}: " +
s"original:\n$original\nnew:\n$result")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ class TextSocketSource(host: String, port: Int, includeTimestamp: Boolean, sqlCo
// Underlying MemoryStream has schema (String, Timestamp); strip out the timestamp
// if requested.
if (includeTimestamp) {
rawBatch.toDF("value", "timestamp")
rawBatch.select("value", "timestamp")
} else {
// Strip out timestamp
rawBatch.select("value").toDF()
rawBatch.select("value")
}
}

Expand Down

0 comments on commit 28aad0c

Please sign in to comment.