[SPARK-22282][SQL] Rename OrcRelation to OrcFileFormat and remove ORC_COMPRESSION#19502
[SPARK-22282][SQL] Rename OrcRelation to OrcFileFormat and remove ORC_COMPRESSION#19502dongjoon-hyun wants to merge 6 commits intoapache:masterfrom dongjoon-hyun:SPARK-22282
Conversation
| @@ -256,9 +257,6 @@ private[orc] class OrcOutputWriter( | |||
| } | |||
|
|
|||
| private[orc] object OrcRelation extends HiveInspectors { | |||
There was a problem hiding this comment.
@dongjoon-hyun, mind changing this to OrcFileFormat while we are here (see #14529)?
There was a problem hiding this comment.
Sure. No problem. Thank you for review, @HyukjinKwon !
|
LGTM btw. |
|
Thank you, @HyukjinKwon ! |
| @@ -42,7 +44,7 @@ private[orc] class OrcOptions( | |||
| val compressionCodec: String = { | |||
| // `compression`, `orc.compress`, and `spark.sql.orc.compression.codec` are | |||
| // in order of precedence from highest to lowest. | |||
There was a problem hiding this comment.
Thank you for review, @gatorsmile .
The name orc.compress and precedence order is not changed. Which part do you want to change?
There was a problem hiding this comment.
COMPRESS.getAttribute is not in our code base. Please change it to
//
compression,orc.compress(i.e., OrcConf.COMPRESS), andspark.sql.orc.compression.codecare
|
Test build #82771 has finished for PR 19502 at commit
|
| @@ -180,7 +181,7 @@ class OrcQuerySuite extends QueryTest with BeforeAndAfterAll with OrcTest { | |||
| // Respect `orc.compress`. | |||
There was a problem hiding this comment.
Shall we change this comment too?
There was a problem hiding this comment.
Also the test name Respect orc.compress option when compression is unset.
|
Test build #82775 has finished for PR 19502 at commit
|
|
|
||
| import org.apache.orc.OrcConf.COMPRESS | ||
| import org.scalatest.BeforeAndAfterAll | ||
|
|
There was a problem hiding this comment.
Another test in OrcSourceSuite:
There was a problem hiding this comment.
This is case sensitivity test case. We should not change this.
There was a problem hiding this comment.
Oh, I was thinking something like COMPRESS.getAttribute.toUpperCase.
There was a problem hiding this comment.
If you want, no problem at all. :)
There was a problem hiding this comment.
Just like to be consistent. Thanks. :)
|
|
||
| private[orc] object OrcRelation extends HiveInspectors { | ||
| // The references of Hive's classes will be minimized. | ||
| val ORC_COMPRESSION = "orc.compress" |
There was a problem hiding this comment.
We have documented orc.compress as option name explicitly in
Now we depends on the configuration name from an external library. But I think the configuration name should not be changed at all. So looks should be fine.
There was a problem hiding this comment.
Yep. I agree. I don't think Apache ORC changes this in the future since this is a primitive configuration.
BTW, Thank you for pointing this doc. I'll fix some typos here.
|
Test build #82778 has finished for PR 19502 at commit
|
|
Test build #82782 has finished for PR 19502 at commit
|
|
Test build #82783 has finished for PR 19502 at commit
|
|
Test build #82781 has finished for PR 19502 at commit
|
|
retest this please |
|
Test build #82788 has finished for PR 19502 at commit
|
|
Thank you for retesting, @HyukjinKwon ! |
|
@HyukjinKwon , @gatorsmile , @viirya . |
|
Thanks! Merged to master. |
|
Thank you, @gatorsmile , @HyukjinKwon , and @viirya ! |
What changes were proposed in this pull request?
This PR aims to
OrcRelationtoOrcFileFormatobject.OrcRelation.ORC_COMPRESSIONwithorg.apache.orc.OrcConf.COMPRESS. Since SPARK-21422, we can useOrcConf.COMPRESSinstead of Hive's.How was this patch tested?
Pass the Jenkins with the existing and updated test cases.