Skip to content

Commit

Permalink
override toString method on SparkSession builders (#327)
Browse files Browse the repository at this point in the history
So that cells'output calling methods on builders look nicer
  • Loading branch information
alexarchambault committed Jun 20, 2023
1 parent 2a60af8 commit 73d5c21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class NotebookSparkSessionBuilder(implicit
commHandler: CommHandler
) extends AmmoniteSparkSessionBuilder {

override def toString = "NotebookSparkSessionBuilder"

override def printLine(line: String, htmlLine: String = null): Unit =
if (htmlLine == null)
publish.html(line + System.lineSeparator())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ class AmmoniteSparkSessionBuilder(implicit
replApi: ReplAPI
) extends SparkSession.Builder {

override def toString = "AmmoniteSparkSessionBuilder"

import AmmoniteSparkSessionBuilder.normalize

def printLine(line: String, htmlLine: String = null): Unit =
Expand Down

0 comments on commit 73d5c21

Please sign in to comment.