Skip to content

Commit 252f8ea

Browse files
author
pj.fanning
committed
[SPARK-20871][SQL] have just one format function with a default applied for maxLines
1 parent 2997ded commit 252f8ea

File tree

1 file changed

+1
-3
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen

1 file changed

+1
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeFormatter.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ import java.util.regex.Matcher
2828
object CodeFormatter {
2929
val commentHolder = """\/\*(.+?)\*\/""".r
3030

31-
def format(code: CodeAndComment): String = format(code, -1)
32-
33-
def format(code: CodeAndComment, maxLines: Int): String = {
31+
def format(code: CodeAndComment, maxLines: Int = -1): String = {
3432
val formatter = new CodeFormatter
3533
val lines = code.body.split("\n")
3634
val needToTruncate = maxLines >= 0 && lines.length > maxLines

0 commit comments

Comments
 (0)