-
Notifications
You must be signed in to change notification settings - Fork 234
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
Add test cases for ORC writing according to options orc.compress and compression [databricks] #8785
Conversation
…compression Signed-off-by: Chong Gao <[email protected]>
build |
321cdh and 330cdh compile failed. Will fix later. |
build |
1 similar comment
build |
build |
build |
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.
Needs to be upmerged to solve merge conflicts but otherwise lgtm.
@@ -92,4 +102,76 @@ class OrcQuerySuite extends SparkQueryCompareTestSuite { | |||
) { | |||
frame => frame | |||
} | |||
|
|||
private def getOrcFilePostfix(compression: String): String = |
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.
private def getOrcFilePostfix(compression: String): String = | |
private def getOrcFileSuffix(compression: String): String = |
// the reader is not a AutoCloseable for Spark CDH, so use `withResourceIfAllowed` | ||
// 321cdh uses lower ORC: orc-core-1.5.1.7.1.7.1000-141.jar | ||
// 330cdh uses lower ORC: orc-core-1.5.1.7.1.8.0-801.jar | ||
withResourceIfAllowed(OrcFile.createReader(orcFilePath, conf)) { reader => |
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.
This is a useful utility. It makes the code quite streamlined.
checkCompressType(None, Some(orcCompress)) | ||
} | ||
|
||
// make paris, e.g.: [("UNCOMPRESSED", "NONE"), ("NONE", "SNAPPY"), ("SNAPPY", "ZSTD") ... ] |
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.
// make paris, e.g.: [("UNCOMPRESSED", "NONE"), ("NONE", "SNAPPY"), ("SNAPPY", "ZSTD") ... ] | |
// make pairs, e.g.: [("UNCOMPRESSED", "NONE"), ("NONE", "SNAPPY"), ("SNAPPY", "ZSTD") ... ] |
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.
Good stuff. Some minor nitpicks, but it looks pretty good to me.
build |
…compression [databricks] (NVIDIA#8785) Signed-off-by: Chong Gao <[email protected]>
closes #8781
closes #8782
ORC writing first honor "compression" option, then "orc.compress" option.
Signed-off-by: Chong Gao [email protected]