-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-37555][SQL] spark-sql should pass last unclosed comment to backend #34815
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 all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -620,4 +620,17 @@ class CliSuite extends SparkFunSuite with BeforeAndAfterAll with Logging { | |
| |""".stripMargin -> "SELECT 1" | ||
| ) | ||
| } | ||
|
|
||
| test("SPARK-37555: spark-sql should pass last unclosed comment to backend") { | ||
|
Contributor
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. @AngersZhuuuu This test is flaky, fails quite often on repeated runs. Here's a sample error:
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. Let me check it.
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. I have run this many times. Not failed.
Member
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. It fails on my PRs periodically too. For instance, see https://github.com/MaxGekk/spark/actions/runs/3383705774/jobs/5619867814: Maybe we don't wait for 2 minutes in real life.
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. ok, let me check again.
Contributor
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. Hey this also fails on my PR. Just FYI didn't meant to push!
Contributor
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. @AngersZhuuuu shall we increase the timeout? The github action machines are not stable.
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.
Yea, the logic should be ok... |
||
| runCliWithin(2.minute)( | ||
| // Only unclosed comment. | ||
| "/* SELECT /*+ HINT() 4; */;".stripMargin -> "mismatched input ';'", | ||
| // Unclosed nested bracketed comment. | ||
| "/* SELECT /*+ HINT() 4; */ SELECT 1;".stripMargin -> "1", | ||
| // Unclosed comment with query. | ||
| "/* Here is a unclosed bracketed comment SELECT 1;"-> "Unclosed bracketed comment", | ||
| // Whole comment. | ||
| "/* SELECT /*+ HINT() */ 4; */;".stripMargin -> "" | ||
| ) | ||
| } | ||
| } | ||
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.
what does this condition mean?
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.
Avoid pass an blank string to
processLine, although inprocessLineit will handle thisThere 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.
Also keep same cod with hive
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.
@AngersZhuuuu @cloud-fan Wondering why do we keep the
CLIin thehive-thriftserverpackage. It has nothing to do with ThriftServer.