-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26504][SQL] Rope-wise dumping of Spark plans #23406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
de38cf8
af5c9ed
0a36a26
07ae72d
f621de7
ca4aed8
d727959
544b80e
059dcf4
fe3bbcf
707c80b
074e9b8
29b62bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,4 +87,26 @@ object StringUtils { | |
| } | ||
| funcNames.toSeq | ||
| } | ||
|
|
||
| class StringRope { | ||
| private var list = List.empty[String] | ||
|
||
| private var length: Int = 0 | ||
|
|
||
| def append(s: String): Unit = { | ||
| list = s :: list | ||
| length += s.length | ||
| } | ||
|
|
||
| override def toString: String = { | ||
| val buffer = new StringBuffer(length) | ||
| var reversed = list.reverse | ||
|
|
||
| while (!reversed.isEmpty) { | ||
| buffer.append(reversed.head) | ||
| reversed = reversed.tail | ||
| } | ||
|
|
||
|
||
| buffer.toString | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.