Uh oh!
There was an error while loading. Please reload this page.
[SPARK-20682][SQL] Support a new faster ORC data source based on Apache ORC - #17924
[SPARK-20682][SQL] Support a new faster ORC data source based on Apache ORC#17924dongjoon-hyun wants to merge 3 commits into
Conversation
SparkQA
commented
May 9, 2017
Test build #76693 has finished for PR 17924 at commit
|
SparkQA
commented
May 9, 2017
Test build #76695 has finished for PR 17924 at commit
|
dongjoon-hyun
commented
May 9, 2017
Retest this please. |
SparkQA
commented
May 9, 2017
Test build #76699 has finished for PR 17924 at commit
|
SparkQA
commented
May 10, 2017
Test build #76705 has finished for PR 17924 at commit
|
| /** | ||
| * ColumnarBatch for vectorized execution by whole-stage codegen. | ||
| */ | ||
| private var columnarBatch: ColumnarBatch = _ |
There was a problem hiding this comment.
IIRC, @viirya also has a PR for vectorized orc reader. In that PR, we simply wrap the orc column batch to expose spark column batch interfaces, instead of writing orc column batch to spark column batch. I think that approach is more efficient.
There was a problem hiding this comment.
Oh, thank you for the comment. It sounds efficient. I'll take a look.
There was a problem hiding this comment.
More specially, we wrap Hive's ColumnVector in a batch to expose Spark's ColumnVector for constructing Spark's ColumnarBatch. So we don't need to move data from one vector format to another vector format.
viirya
commented
May 10, 2017
From the current benchmark, seems the performance has not obvious improvement, compared with the vectorized Hive ORC reader #13775. Maybe with more efficient batch approach as @cloud-fan suggested, it can perform better. Besides performance, getting rid of Hive dependency on ORC datasource is a great advantage for this. |
| } | ||
| private val SQL_ORC_FILE_FORMAT = "org.apache.spark.sql.execution.datasources.orc.OrcFileFormat" | ||
| private val HIVE_ORC_FILE_FORMAT = "org.apache.spark.sql.hive.orc.OrcFileFormat" |
There was a problem hiding this comment.
Will we keep current Hive ORC datasource even this is in Spark?
There was a problem hiding this comment.
We need to keep both versions before complete transition and for safety. Instead, we can make configurable which file format is used for orc data source string, e.g, USING ORC.
There was a problem hiding this comment.
So to avoid datasource name conflict, we may change Hive ORC datasource's shortName to other than "orc".
dongjoon-hyun
commented
May 10, 2017
@cloud-fan and @viirya . Shall we remove the vectorized part from this PR?
How do you think about that? |
viirya
commented
May 10, 2017
@dongjoon-hyun It is good for me. We can reduce the size of this PR too and mitigate review job. |
dongjoon-hyun
commented
May 10, 2017
Yep. Since this is an approach adding new dependency on Apache ORC, the non-vectorized PR also will need more supports(or approval) from the committers. I'll wait for more opinions at the current status for a while. |
Hi, @rxin , @marmbrus , @hvanhovell , @gatorsmile , @sameeragarwal . |
Hi, All. |
dongjoon-hyun
commented
May 15, 2017
Retest this please. |
SparkQA
commented
May 15, 2017
Test build #76920 has finished for PR 17924 at commit
|
dongjoon-hyun
commented
Aug 14, 2017
Retest this please. |
SparkQA
commented
Aug 14, 2017
Test build #80604 has finished for PR 17924 at commit
|
cenyuhai
commented
Sep 3, 2017
@dongjoon-hyun I have a question: does this orc data sources reader support a table contains multiple file format ParquetFileFormat doesn't support this feature. |
dongjoon-hyun
commented
Sep 3, 2017
Hi, I didn't try that, but that's not a concept of Spark data source table. Please don't expect that. :) |
dongjoon-hyun
commented
Sep 3, 2017
BTW, the latest version is maintained in #17980. |
dongjoon-hyun
commented
Sep 8, 2017
Please refer the superset in #17980 . |
## What changes were proposed in this pull request? This PR adds an ORC columnar-batch reader to native `OrcFileFormat`. Since both Spark `ColumnarBatch` and ORC `RowBatch` are used together, it is faster than the current Spark implementation. This replaces the prior PR, #17924. Also, this PR adds `OrcReadBenchmark` to show the performance improvement. ## How was this patch tested? Pass the existing test cases. Author: Dongjoon Hyun <dongjoon@apache.org> Closes#19943 from dongjoon-hyun/SPARK-16060. (cherry picked from commit f44ba91) Signed-off-by: Wenchen Fan <wenchen@databricks.com>
## What changes were proposed in this pull request? This PR adds an ORC columnar-batch reader to native `OrcFileFormat`. Since both Spark `ColumnarBatch` and ORC `RowBatch` are used together, it is faster than the current Spark implementation. This replaces the prior PR, #17924. Also, this PR adds `OrcReadBenchmark` to show the performance improvement. ## How was this patch tested? Pass the existing test cases. Author: Dongjoon Hyun <dongjoon@apache.org> Closes#19943 from dongjoon-hyun/SPARK-16060.
What changes were proposed in this pull request?
Since SPARK-2883, Apache Spark supports Apache ORC inside
sql/hivemodule with Hive dependency. This issue aims to add a new and faster ORC data source insidesql/coreand to replace the old ORC data source eventually. In this issue, the latest Apache ORC 1.4.0 (released yesterday) is used.There are four key benefits.
ColumnarBatchand ORCRowBatchtogether. This is faster than the current implementation in Spark.ORCdata sources without hive module, i.e,-Phive.The followings are two examples of comparisons in
OrcReadBenchmark.scala.How was this patch tested?
Pass the Jenkins tests with newly added test suites in
sql/core.