-
Notifications
You must be signed in to change notification settings - Fork 28k
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
[SPARK-20937][DOCS] Describe spark.sql.parquet.writeLegacyFormat property in Spark SQL, DataFrames and Datasets Guide #22453
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3af33a3
[SPARK-20937][DOCS] Describe spark.sql.parquet.writeLegacyFormat prop…
seancxmao e6f67c1
add more information: reasons, scenarios, etc
seancxmao 6e2680f
match the doc in SQLConf with programming guide
seancxmao 3e51bd9
make doc concise and to the point
seancxmao File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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.
This should go with the other parquet properties if anything, but, this one is so old I don't think it's worth documenting. It shouldn't be used today.
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.
@srowen, actually, this configuration specifically related with compatibility with other systems like Impala (not only old Spark ones) where decimals are written based on fixed binary format (nowdays it's written in int-based in Spark). If this configurations is not enabled, they are unable to read what Spark wrote.
Given https://stackoverflow.com/questions/44279870/why-cant-impala-read-parquet-files-after-spark-sqls-write and JIRA like SPARK-20297, I think this configuration is kind of important. I even expected more documentation about this configuration specifically at the first place.
Personally I have been thinking it would better to leave this configuration after 3.0 as well for better compatibility.
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.
This is, of course, something we should remove in long term but my impression is that it's better to expose and explicitly mention we deprecate this later, and the remove it out.
I already argued a bit (for instance in SPARK-20297) to explain how to workaround and why it is. Was thinking it's better document this and reduce such overhead at least.
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'd like to add my 2 cents. We use both Spark and Hive in our Hadoop/Spark clusters. And we have 2 types of tables, working tables and target tables. Working tables are only used by Spark jobs, while target tables are populated by Spark and exposed to downstream jobs including Hive jobs. Our data engineers frequently meet with this issue when they use Hive to read target tables. Finally we decided to set spark.sql.parquet.writeLegacyFormat=true as the default value for target tables and explicitly describe this in our internal developer guide.
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.
OK that sounds important to document. But the reasoning in this thread is also more useful information I think. Instead of describing it as a legacy format (implying it's not valid Parquet or something) and that it's required for Hive and Impala, can we mention or point to the specific reason that would cause you to need this? The value of the documentation here is in whether it helps the user know when to set it one way or the other.
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.
++1 for more information actually.
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.
OK, I will update the doc and describe scenarios and reasons why we need this flag.