-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-11352] [SQL] Escape */ in the generated comments. #10072
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
Conversation
@@ -95,7 +95,7 @@ abstract class Expression extends TreeNode[Expression] { | |||
ctx.subExprEliminationExprs.get(this).map { subExprState => | |||
// This expression is repeated meaning the code to evaluated has already been added | |||
// as a function and called in advance. Just use it. | |||
val code = s"/* $this */" | |||
val code = s"/* ${this.toString.replace("*/", "\\*\\/")} */" |
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.
Should we put this as a utility in ctx?
Maybe. def escapeComment(< thing to put inside /* */>)
This seems easy to get wrong in the future too.
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.
Yeah. Let me do that.
Test build #46981 has finished for PR 10072 at commit
|
We should backport this into 1.5 as well. |
sure |
LGTM |
Test build #46997 has finished for PR 10072 at commit
|
Merging to master, branch 1.6, and branch 1.5. |
https://issues.apache.org/jira/browse/SPARK-11352 Author: Yin Huai <yhuai@databricks.com> Closes #10072 from yhuai/SPARK-11352. (cherry picked from commit 5872a9d) Signed-off-by: Yin Huai <yhuai@databricks.com>
I will have a pr for branch 1.5. The current on conflicts a lot with branch 1.5. |
https://issues.apache.org/jira/browse/SPARK-11352 This one backports #10072 to branch 1.5. Author: Yin Huai <yhuai@databricks.com> Closes #10084 from yhuai/SPARK-11352-branch-1.5.
https://issues.apache.org/jira/browse/SPARK-11352