Uh oh!
There was an error while loading. Please reload this page.
[SPARK-21707][SQL]Improvement a special case for non-deterministic filters in optimizer - #18918
[SPARK-21707][SQL]Improvement a special case for non-deterministic filters in optimizer#18918heary-cao wants to merge 1 commit into
Conversation
4216b6c to
b79b9afComparegatorsmile
commented
Aug 11, 2017
ok to test |
gatorsmile
commented
Aug 11, 2017
How about data source tables? |
SparkQA
commented
Aug 11, 2017
Test build #80545 has finished for PR 18918 at commit
|
heary-cao
commented
Aug 12, 2017
@gatorsmile |
gatorsmile
commented
Aug 13, 2017
This is the plan of a Hive serde table. The fix should not be done in optimizer. We should fix it in the place that causes the issue. |
@gatorsmile the problem can be solved. but I'm not sure if it will cause other problems. Do you have any suggestions for that? this method is also applicable to #18892. thanks. |
There was a problem hiding this comment.
Why we can't remove the Project if the condition is not deterministic?
There was a problem hiding this comment.
When we split a project, pruning it here again.
There was a problem hiding this comment.
I don't get it from your explanation. If I understand it correctly, when there is a Project which selects subset of output from the LeafNode, if we remove it by the below pattern, we will retrieve all fields. Is it your purpose?
There was a problem hiding this comment.
Actually I don't get what the test title tries to say. Can you try to rephrase it?
b79b9af to
bf81c45CompareSparkQA
commented
Aug 14, 2017
Test build #80628 has finished for PR 18918 at commit
|
gatorsmile
commented
Aug 14, 2017
Yes. We should fix it in |
9f73949 to
4daec54Compare@gatorsmile |
SparkQA
commented
Aug 15, 2017
Test build #80670 has finished for PR 18918 at commit
|
4daec54 to
82b82afCompareSparkQA
commented
Aug 15, 2017
Test build #80681 has finished for PR 18918 at commit
|
82b82af to
df7ecaaCompareSparkQA
commented
Aug 15, 2017
Test build #80686 has finished for PR 18918 at commit
|
df7ecaa to
97a3270CompareSparkQA
commented
Aug 15, 2017
Test build #80693 has finished for PR 18918 at commit
|
3c73556 to
471d81cCompare471d81c to
20fc87aComparecc @cloud-fan@gatorsmile@viirya Could your take a look? |
| val p = path.getAbsolutePath | ||
| Seq(1 -> "a").toDF("a", "b").write.partitionBy("a").parquet(p) | ||
| val df = spark.read.parquet(p) | ||
| checkAnswer(df.filter(rand(10) <= 1.0).select($"a"), Row(1)) |
There was a problem hiding this comment.
this test can pass on current master.
cloud-fan
commented
Nov 16, 2017
what exactly are you proposing? |
AmplabJenkins
commented
Jun 9, 2018
Can one of the admins verify this patch? |
HyukjinKwon
commented
Jul 16, 2018
gentle ping @heary-cao |
Closesapache#17422Closesapache#17619Closesapache#18034Closesapache#18229Closesapache#18268Closesapache#17973Closesapache#18125Closesapache#18918Closesapache#19274Closesapache#19456Closesapache#19510Closesapache#19420Closesapache#20090Closesapache#20177Closesapache#20304Closesapache#20319Closesapache#20543Closesapache#20437Closesapache#21261Closesapache#21726Closesapache#14653Closesapache#13143Closesapache#17894Closesapache#19758Closesapache#12951Closesapache#17092Closesapache#21240Closesapache#16910Closesapache#12904Closesapache#21731Closesapache#21095 Added: Closesapache#19233Closesapache#20100Closesapache#21453Closesapache#21455Closesapache#18477 Added: Closesapache#21812Closesapache#21787 Author: hyukjinkwon <gurwls223@apache.org> Closesapache#21781 from HyukjinKwon/closing-prs.
What changes were proposed in this pull request?
Currently, Did a lot of special handling for non-deterministic projects and filters in optimizer. but not good enough. this patch add a new special case for non-deterministic filters.
in my spark-shell,execute the following SQL statement:
Before modified,
executed Plan:
FileScanRDD read userdata:
[0,0,0,4,0,3,0,6,4,2,b800000001,c000000001,c800000001,d000000001,d800000001,e000000001,0,0,0,4010000000000000,0,4008000000000000,0,30,30,30,34,30,33]After modified,
executed Plan:
FileScanRDD read userdata:
[0,2,0]So the PR description deal with that we only need to read needs fields.
In addition, we cluster in real environment. HiveTableScans also scan more columns according to the execution plan.
HadoopRDD also read more userdata:
{62340760016026144, 254850, 0, 64F00053E382D3AB, 3, , , null, 550667202, -78, -7.0, 6373, 152963, 114.13232277, 32.16357801, 2, 26, -116.657997, 21, 27, 15, 0.021978, -3, 3, -270543.0, 77187.0, 5041, 560, 7, 187, 003E3820BB8F8CA3, 9, 255, 2, 4, null, , , 101, 37.51, 202.74, , , , , , 39309, 610824, 52, 152, -117, 37900, 0, , , , , , , null, null, , null, null, null, null, null, null, null, null, 0, null, null, null, null, null, null, null, null, 0, 4, null, 26, 26, 20, 15, 15, null, 36, 350182624, 1039, 1, 430, 48, 0, -78, null, "5041,-27055,7719", "5041,-13528,3860", "5041,-5411,1544", "5041,-2706,772", "5041,-1353,386", null, 178, 4, 0.0, 0.0, 37.51, 202.74, 0, 30, 0, null, null, 687, 3696, 14768, 26300, 850.0, 125.0, 263, , 6.97, 3.77, null, null, null, null, 256, __, null, null, null, null, null, null, null, 254850_0, null, null, null, null, null, 0, 15, 0, 0, null, null, null, , -5411, 1544, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null}it will affect the performance of task.
How was this patch tested?
Should be covered existing test cases and add new test cases.