Uh oh!
There was an error while loading. Please reload this page.
[SPARK-22158][SQL] convertMetastore should not ignore table property - #19382
[SPARK-22158][SQL] convertMetastore should not ignore table property#19382dongjoon-hyun wants to merge 5 commits into
Conversation
SparkQA
commented
Sep 28, 2017
Test build #82283 has finished for PR 19382 at commit
|
| sql( | ||
| s""" | ||
| |CREATE TABLE t(id int) USING hive | ||
| |OPTIONS(fileFormat 'orc', compression 'Zlib') |
There was a problem hiding this comment.
It sounds like we have the same issue for parquet?
There was a problem hiding this comment.
Thank you for review, @gatorsmile . I'll check that, too.
| val serde = relation.tableMeta.storage.serde.getOrElse("").toLowerCase(Locale.ROOT) | ||
| if (serde.contains("parquet")) { | ||
| val options = Map(ParquetOptions.MERGE_SCHEMA -> | ||
| val options = relation.tableMeta.storage.properties + (ParquetOptions.MERGE_SCHEMA -> |
There was a problem hiding this comment.
Hi, @gatorsmile . It's the same in the Paquet. Without this, the test case for parquet fails.
| |LOCATION '${path.toURI}' | ||
| """.stripMargin) | ||
| |CREATE TABLE t(id int) USING hive | ||
| |OPTIONS(fileFormat 'parquet', compression 'gzip') |
There was a problem hiding this comment.
Could you combine these two test cases?
There was a problem hiding this comment.
Unfortunately, it's not feasible. First of all,
- Old ORC test case covers
convertMetastoreOrc=falseonly. So, I extended it to cover both. - New Parquet test case covers `convertMetastoreParquet=true (default) only because Parquet has another bug when convertMetastoreParquet=false.
Also, the compression codec check is quite different between ORC and Parquet. Please see line 1510.
There was a problem hiding this comment.
Still can create a common helper function, right?
There was a problem hiding this comment.
Try your best to reduce duplicate codes.
| sparkContext.hadoopConfiguration, | ||
| new Path(maybeParquetFile.get.getPath), | ||
| NO_FILTER) | ||
| assert("GZIP" === footer.getBlocks.get(0).getColumns().get(0).getCodec.toString) |
There was a problem hiding this comment.
It's for getting compression codec.
dongjoon-hyun
commented
Sep 29, 2017
@gatorsmile . |
SparkQA
commented
Sep 29, 2017
Test build #82324 has finished for PR 19382 at commit
|
dongjoon-hyun
commented
Sep 29, 2017
It fails due to |
dongjoon-hyun
commented
Sep 29, 2017
Retest this please |
dongjoon-hyun
commented
Sep 29, 2017
Retest this please. |
dongjoon-hyun
commented
Sep 29, 2017
I retriggered because I noticed that master branch is fixed after the previous triggering. |
SparkQA
commented
Sep 29, 2017
Test build #82327 has finished for PR 19382 at commit
|
SparkQA
commented
Sep 29, 2017
Test build #82332 has finished for PR 19382 at commit
|
dongjoon-hyun
commented
Oct 2, 2017
Retest this please |
SparkQA
commented
Oct 2, 2017
Test build #82391 has finished for PR 19382 at commit
|
SparkQA
commented
Oct 2, 2017
Test build #82395 has finished for PR 19382 at commit
|
LGTM Thanks! Merged to master. |
gatorsmile
commented
Oct 2, 2017
Please submit a separate PR to 2.2. Thanks! |
dongjoon-hyun
commented
Oct 3, 2017
Thank you, @gatorsmile . I'll. |
What changes were proposed in this pull request?
From the beginning, convertMetastoreOrc ignores table properties and use an empty map instead. This PR fixes that. For the diff, please see this. convertMetastoreParquet also ignore.
How was this patch tested?
Pass the Jenkins with an updated test suite.