-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29685][SQL] Adds format to the spark-sql output like its implemented by Dataset showString #26698
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
…t schema name in operations with no results
…plementation using the spark-sql client
|
Can one of the admins verify this patch? |
dongjoon-hyun
left a comment
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.
Thank you for making a PR, @javierivanov .
GitHub Action seems to complain about the Scala coding style.
Could you run dev/scalastyle and fix all of them?
|
Thanks for the quick response @dongjoon-hyun. All good now. |
| """select 'Test3', "\';";""" -> "Test3\t';", | ||
| """select 'Test1', "^;^";""" -> "Test1|^;^", | ||
| """select 'Test2', "\";";""" -> "Test2| \";", | ||
| """select 'Test3', "\';";""" -> "Test3| ';", |
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 think the output was matched to Hive's intentionally.
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.
Do you mean the extra space? the minimun col width is 3
|
Hi @javierivanov Are you interested in implementing a new Spark CLI similar to |
|
Yeah, sure. The idea is to have a pure Scala implementation ? |
What changes were proposed in this pull request?
This PR adds a formatted print method like it is provided in the showString implementation from Dataset while using the spark-sql client.
Actual Spark-sql client
Spark Dataset show
Why are the changes needed?
To have a consistent output between Dataset show and spark-sql interfaces.
Does this PR introduce any user-facing change?
No
How was this patch tested?
org.apache.spark.sql.hive.thriftserver.CliSuite.scala was adapted for the new fortmat. Code compiles and pass tests.