-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-23313][DOC] Add a migration guide for ORC #20484
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 14 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
20f99c6
[SPARK-23313][DOC] Add a migration guide for ORC
dongjoon-hyun 1bb23ef
fix.
dongjoon-hyun df08899
Address comments
dongjoon-hyun 0aecd5d
Remove spark.sql.orc.columnarReaderBatchSize
dongjoon-hyun 239714a
Update
dongjoon-hyun fc5b395
address comments.
dongjoon-hyun 7b3b0a4
Use <code>
dongjoon-hyun cb149f2
Split the table.
dongjoon-hyun 436c0f4
Address comments
dongjoon-hyun 354a525
Update link.
dongjoon-hyun d259d66
Add note for convertMetastoreXXX.
dongjoon-hyun a693446
Remove `spark.sql.hive.convertMetastoreOrc` and Hive ORC table stuff.
dongjoon-hyun 40c8e02
remove more.
dongjoon-hyun 59e957a
Add `USING` syntax recommendation.
dongjoon-hyun 6136d25
update
dongjoon-hyun f2bd2c8
Add USING HIVE OPTIONS description, too.
dongjoon-hyun 8ae87fc
fix
dongjoon-hyun 6887d19
Update the description.
dongjoon-hyun 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1776,6 +1776,35 @@ working with timestamps in `pandas_udf`s to get the best performance, see | |
|
|
||
| ## Upgrading From Spark SQL 2.2 to 2.3 | ||
|
|
||
| - Since Spark 2.3, Spark supports a vectorized ORC reader with a new ORC file format for ORC files. To do that, the following configurations are newly added or change their default values. For creating ORC tables, `USING ORC` or `USING HIVE` syntaxes are recommended. | ||
|
|
||
| - New configurations | ||
|
|
||
|
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. Shall we separate newly added configurations and changed ones?
Member
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. Yep. Now, we have two tables. |
||
| <table class="table"> | ||
| <tr><th><b>Property Name</b></th><th><b>Default</b></th><th><b>Meaning</b></th></tr> | ||
| <tr> | ||
| <td><code>spark.sql.orc.impl</code></td> | ||
| <td><code>native</code></td> | ||
| <td>The name of ORC implementation. It can be one of <code>native</code> and <code>hive</code>. <code>native</code> means the native ORC support that is built on Apache ORC 1.4.1. `hive` means the ORC library in Hive 1.2.1 which is used prior to Spark 2.3.</td> | ||
| </tr> | ||
| <tr> | ||
| <td><code>spark.sql.orc.enableVectorizedReader</code></td> | ||
| <td><code>true</code></td> | ||
| <td>Enables vectorized orc decoding in <code>native</code> implementation. If <code>false</code>, a new non-vectorized ORC reader is used in <code>native</code> implementation. For <code>hive</code> implementation, this is ignored.</td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| - Changed configurations | ||
|
|
||
| <table class="table"> | ||
| <tr><th><b>Property Name</b></th><th><b>Default</b></th><th><b>Meaning</b></th></tr> | ||
| <tr> | ||
| <td><code>spark.sql.orc.filterPushdown</code></td> | ||
| <td><code>true</code></td> | ||
| <td>Enables filter pushdown for ORC files. It is <code>false</code> by default prior to Spark 2.3.</td> | ||
| </tr> | ||
| </table> | ||
|
|
||
| - Since Spark 2.3, the queries from raw JSON/CSV files are disallowed when the referenced columns only include the internal corrupt record column (named `_corrupt_record` by default). For example, `spark.read.schema(schema).json(file).filter($"_corrupt_record".isNotNull).count()` and `spark.read.schema(schema).json(file).select("_corrupt_record").show()`. Instead, you can cache or save the parsed results and then send the same query. For example, `val df = spark.read.schema(schema).json(file).cache()` and then `df.filter($"_corrupt_record".isNotNull).count()`. | ||
| - The `percentile_approx` function previously accepted numeric type input and output double type results. Now it supports date type, timestamp type and numeric types as input types. The result type is also changed to be the same as the input type, which is more reasonable for percentiles. | ||
| - Since Spark 2.3, the Join/Filter's deterministic predicates that are after the first non-deterministic predicates are also pushed down/through the child operators, if possible. In prior Spark versions, these filters are not eligible for predicate pushdown. | ||
|
|
||
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.
When users create tables by
USING HIVE, we are using the ORC library in Hive 1.2.1 to read/write ORC tables unless they manually changespark.sql.hive.convertMetastoreOrctotrue.The last message is confusing to me.
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.
Hm. Right. What about mentioning
convertMetastoreOrcis safe withUSING HIVEthen?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.
Just describe the scenario in which the new vectorized ORC reader will be used. I think that will be enough.
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.
Okay. I see. Thanks!