Uh oh!
There was an error while loading. Please reload this page.
[SPARK-21783][SQL] Turn on ORC filter push-down by default - #18991
[SPARK-21783][SQL] Turn on ORC filter push-down by default#18991dongjoon-hyun wants to merge 1 commit into
Conversation
SparkQA
commented
Aug 18, 2017
Test build #80834 has finished for PR 18991 at commit
|
dongjoon-hyun
commented
Aug 18, 2017
Hi, @cloud-fan, @gatorsmile , @sameeragarwal , @rxin . |
dongjoon-hyun
commented
Aug 21, 2017
Hi, @cloud-fan, @gatorsmile , @sameeragarwal , @rxin , @mridulm . |
dongjoon-hyun
commented
Aug 21, 2017
Retest this please. |
SparkQA
commented
Aug 21, 2017
Test build #80934 has finished for PR 18991 at commit
|
dongjoon-hyun
commented
Aug 23, 2017
Hi, @cloud-fan, @gatorsmile , @sameeragarwal , @rxin , @mridulm . |
dongjoon-hyun
commented
Aug 25, 2017
Retest this please. |
dongjoon-hyun
commented
Aug 25, 2017
Hi, @cloud-fan, @gatorsmile , @sameeragarwal , @rxin , @mridulm . |
SparkQA
commented
Aug 25, 2017
Test build #81114 has finished for PR 18991 at commit
|
dongjoon-hyun
commented
Aug 25, 2017
Hi, @gatorsmile . |
If ORC incorrectly filters out the extra rows, we might get incorrect results. In addition, we do not know whether the push down could get the performance gain. We saw the performance regression when we push down the filters to Parquet in some cases. To ensure the code quality and result correctness, we need to port the end-to-end test cases from Apache ORC/Parquet. This will also help the community in the long term. If you have a bandwidth, you can make an attempt. These tests should cover most built-in data sources. I will review them at first. Also cc @cloud-fan@sameeragarwal |
dongjoon-hyun
commented
Aug 25, 2017
Thank you for the comments and directions. Definitely, I'll try! |
Since I saw you are also working on the enhancement of ORC reader/writer, we need to check all the limits (e.g., value ranges). I am not sure how good Apache ORC/Parquet did in their test case coverage. Hopefully, they already have good enough end-to-end test cases, and then we can directly import them. Otherwise, we have to build our own framework for it. For examples, below is the limit of DB2 z/OS. |
Wow. It's real commercial spec. Thank you! I understand. |
gatorsmile
commented
Aug 25, 2017
Yes. The commercial DBMS products have a very good/comprehensive test coverage. So far, it is missing in Apache Spark. Basically, we simply trust the underlying data sources, which are maintained by separate communities. Some of them are good, but the others might not be stable enough. Without a good enough test case coverage, anything we did is risky, especially when we upgrading the releases of these built-in data sources. If the bug is from Apache Spark, we can simply fix it. However, if ORC/Parquet has a serious bug, we are unable to fix them for our users. Thus, a comprehensive test case coverage improvement is a must to have for Apache Spark. |
dongjoon-hyun
commented
Aug 25, 2017
+1, I cannot agree anymore. |
Hi, @gatorsmile . orc_create.q and orc_people_create.txt seems to be used before for some end-to-end test. Do you think SQLQueryTestSuite is suitable for the datasource end-to-end test in general? Of course, Predicate Push Down should be handled differently. |
dongjoon-hyun
commented
Aug 26, 2017
Hi, @gatorsmile . |
orc_create.q and orc_people_create.txt are from Hive. Writing test cases is pretty time consuming. I still hope we can get the test cases from the other open source project, instead of writing all of them by ourselves. |
dongjoon-hyun
commented
Sep 1, 2017
Hi, @gatorsmile , @cloud-fan, @rxin , and @omalley . #19060 shows that the behavior of Apache ORC 1.4.0 predicate push-down is correct. #19060 will add more test cases for data source certification. Especially, if you want me to add more test cases on ORC predicate push-down, please let me know. So, back to the original this issue, I'm not aware of the old case which old ORC incorrectly filters out the extra rows, but new Apache ORC 1.4.0 looks ready for this now. Can we turn on ORC predicate push-down by default in Apache Spark? Enabling by default will give more opportunity for users to test it before Apache Spark 2.3.0 (on December). I'm sure that Apache ORC community will help us to ensure this feature and to get benefits from this feature. |
dongjoon-hyun
commented
Sep 5, 2017
Hi, @liancheng , @gatorsmile , @cloud-fan , @rxin , and @omalley . |
gatorsmile
commented
Sep 5, 2017
Left a few comments in the another PR: #19060 (comment). I think it is a right time to improve the test case coverage before turning ORC PPD on by default. We can target the ORC PPD to 2.3.0. |
dongjoon-hyun
commented
Sep 5, 2017
The test case coverage parity between Parquet and ORC should be the criteria for this, right? |
dongjoon-hyun
commented
Sep 5, 2017
To be more clear, I mean the existing Parquet coverage in Apache Spark code base. |
gatorsmile
commented
Sep 5, 2017
To avoid duplicating the efforts, we should have a unified testing framework for covering the PPD of all the sources. Parquet and ORC should be part of it. In the future, when we add the other sources with PPD capability, we can directly plug them in. |
Is the plan aligned with the ongoing Data Source V2 ? |
gatorsmile
commented
Sep 5, 2017
If you want to hold, we can wait for the completion of data source API v2. Otherwise, we can start it now and change it if needed. Conceptually, the test coverage improvement should be not related to how we implement the source APIs. |
Of course, I want to proceed in any part of ORC! |
dongjoon-hyun
commented
Sep 6, 2017
Maybe, this seems not a scope on Apache Spark 2.3.0 because it's a debut of Apache ORC 1.4.0. I'll close this PR. Thank you all for giving advice on this PR. |
dongjoon-hyun
commented
Jan 9, 2018
I reopen it to re-test the master branch with this option before Apache Spark 2.3. |
SparkQA
commented
Jan 9, 2018
Test build #85868 has finished for PR 18991 at commit
|
cloud-fan
commented
Jan 10, 2018
why it's still WIP? |
dongjoon-hyun
commented
Jan 10, 2018
Ur, originally, it's not accepted by @gatorsmile due to lack of test cases. |
I expect we can port more test cases to Spark, instead of relying on quality assurance of external data sources. |
gatorsmile
commented
Jan 10, 2018
Any perf number ? |
cloud-fan
commented
Jan 10, 2018
I'd expect orc has same test coverage as parquet, is it true? |
dongjoon-hyun
commented
Jan 10, 2018
Yes, @cloud-fan . I added the same test coverage for ORC in Apache Spark. |
What is the performance number when turning it on, compared with the off mode? Do we have a micro-benchmark suite? |
@gatorsmile . I don't have any numbers for PPD=false. Do you want to add some? |
cloud-fan
commented
Jan 11, 2018
Yea let's add some, I'm curious to see how well PPD works in ORC, since for parquet PPD doesn't work well and we disable record level filtering for parquet. |
dongjoon-hyun
commented
Jan 11, 2018
Ur, it's not record-level filtering. Maybe, it's because I explained it too abstractly here. It's stripe-level. So, the current ORC in Spark works in the same way with the current Parquet's behavior in Spark. Spark's assumption is just giving a hint to underlying data formats with If both of you requires that, let's revisit later in 2.4 timeframe. When I reopened this two days ago, the purpose is just to make it sure for that option in Apache. |
cloud-fan
commented
Jan 12, 2018
I think we still have time for 2.3? I'm not worried about correctness, but we should show people how much it improves. |
dongjoon-hyun
commented
Jan 12, 2018
Oh, do we have time for 2.3? |
cloud-fan
commented
Jan 13, 2018
conventionally rc1 would fail so we still have time :) |
gatorsmile
commented
Jan 13, 2018
Yes. Please work on the perf tests and the benchmark test suite. I think the priority of this PR is much higher than the test-only PR you are working on |
I see. I opened a new PR, #20265, for that. |
What changes were proposed in this pull request?
ORC filter push-down is disabled by default from the beginning, SPARK-2883
Now, Apache Spark starts to depend on Apache ORC 1.4.0. For Apache Spark 2.3, this PR turns on ORC filter push-down by default like Parquet (SPARK-9207) as a part of SPARK-20901, "Feature parity for ORC with Parquet".
How was this patch tested?
Pass the Jenkins with the existing tests.