-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26103][SQL] Added maxDepth to limit the length of text plans #23076
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
adc4f8e
Added maxDepth to treeString which limits the depth of the printed st…
DaveDeCaprio 3a9743f
Added maxDepth to treeString which limits the depth of the printed st…
DaveDeCaprio 0681f05
Removed outdated changes to QueryExecution
DaveDeCaprio c4cef02
Whitespace changes
DaveDeCaprio a3ef2ba
Remove tabs
DaveDeCaprio 7c178ab
Remove tabs
DaveDeCaprio 45d4693
Corrected test condition
DaveDeCaprio 42e4fcf
Reenabled file-based tests
DaveDeCaprio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added maxDepth to treeString which limits the depth of the printed st…
…ring.
- Loading branch information
commit 3a9743fbc89358055c37cc45437f191fc5f15957
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -455,8 +455,9 @@ case class InputAdapter(child: SparkPlan) extends UnaryExecNode with CodegenSupp | |||||
| writer: Writer, | ||||||
| verbose: Boolean, | ||||||
| prefix: String = "", | ||||||
| addSuffix: Boolean = false): Unit = { | ||||||
| child.generateTreeString(depth, lastChildren, writer, verbose, prefix = "", addSuffix = false) | ||||||
| addSuffix: Boolean = false, | ||||||
| maxDepth: Int = TreeNode.maxTreeToStringDepth): Unit = { | ||||||
| child.generateTreeString(depth, lastChildren, writer, verbose, prefix, addSuffix, maxDepth) | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefix and addSuffix are ignored in the original code but I can't tell why. Seems like they should be passed through from parent to child here. I adjusted, but it might not be a bug or maybe should go in a separate PR
Suggested change
|
||||||
| } | ||||||
|
|
||||||
| override def needCopyResult: Boolean = false | ||||||
|
|
@@ -731,8 +732,16 @@ case class WholeStageCodegenExec(child: SparkPlan)(val codegenStageId: Int) | |||||
| writer: Writer, | ||||||
| verbose: Boolean, | ||||||
| prefix: String = "", | ||||||
| addSuffix: Boolean = false): Unit = { | ||||||
| child.generateTreeString(depth, lastChildren, writer, verbose, s"*($codegenStageId) ", false) | ||||||
| addSuffix: Boolean = false, | ||||||
| maxDepth: Int = TreeNode.maxTreeToStringDepth): Unit = { | ||||||
| child.generateTreeString( | ||||||
| depth, | ||||||
| lastChildren, | ||||||
| writer, | ||||||
| verbose, | ||||||
| s"*($codegenStageId) ", | ||||||
| false, | ||||||
| maxDepth) | ||||||
| } | ||||||
|
|
||||||
| override def needStopCheck: Boolean = true | ||||||
|
|
||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure where to put this code, so made a TreeNode companion object. If there is a better place let me know.