Uh oh!
There was an error while loading. Please reload this page.
[SPARK-11044][SQL] Parquet writer version fixed as version1 - #9060
[SPARK-11044][SQL] Parquet writer version fixed as version1#9060HyukjinKwon wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Yeap I just updated. Thanks.
JoshRosen
commented
Oct 18, 2015
/cc @liancheng |
HyukjinKwon
commented
Nov 7, 2015
@liancheng I assume you missed this. |
liancheng
commented
Nov 11, 2015
@HyukjinKwon Oh yeah, sorry. Finally got sometime to clean my review queue :) I wonder is there an easy way to add a test case for this? At first I thought |
liancheng
commented
Nov 11, 2015
ok to test |
HyukjinKwon
commented
Nov 11, 2015
I will try to find and test them first tommorow before adding a commit! |
SparkQA
commented
Nov 11, 2015
Test build #45626 has finished for PR 9060 at commit
|
HyukjinKwon
commented
Nov 12, 2015
@liancheng I gave some tries to figure out the version but.. as you said, it is pretty tricky to check the writer version as it only changes the version of data page which we could know only within the internal of Parquet. This is also because the writer version changes encoding types of each data page but this encoding type is only recorded in datapage header which is not the part of footer. Would this be too inappropriate if we write Parquet files with both version1 and version2 and then, check if the sizes of both are equal? Since encoding types are different, both the sizes should be also different. |
liancheng
commented
Nov 12, 2015
I think we can check for column encoding information, which is accessible from Parquet footers. For example, The parquet-meta CLI tool can be a reference for how to inspect related metadata. |
HyukjinKwon
commented
Nov 12, 2015
Thank you very much. I will try in that way. |
liancheng
commented
Nov 12, 2015
You may construct a Parquet file consists of a single column with dictionary encoding using: valpath="file:///tmp/parquet/dict"
sqlContext.range(1<<16).selectExpr("(id % 4) AS i").coalesce(1).write.mode("overwrite").parquet(path)And here are instructions of building and installing the parquet-tools CLI tool. Then you can inspect Parquet metadata using: The |
HyukjinKwon
commented
Nov 12, 2015
Thanks! I will follow the way. |
HyukjinKwon
commented
Nov 13, 2015
Fortunately, I worked around parquet tools once and looked through Parquet codes several times before :). Thank you very much for your help. This could be done much more easily than I though because of your help. |
SparkQA
commented
Nov 13, 2015
Test build #45810 has finished for PR 9060 at commit
|
SparkQA
commented
Nov 13, 2015
Test build #45811 has finished for PR 9060 at commit
|
SparkQA
commented
Nov 13, 2015
Test build #45831 has finished for PR 9060 at commit
|
There was a problem hiding this comment.
Nit: Remove this empty line.
liancheng
commented
Nov 13, 2015
LGTM except for a few minor styling issues. I can merge it right after you fix them. |
HyukjinKwon
commented
Nov 16, 2015
I accidentally saw I will also add this test in the following PR for using the overloaded |
SparkQA
commented
Nov 16, 2015
Test build #45964 has finished for PR 9060 at commit
|
liancheng
commented
Nov 16, 2015
@marmbrus Is this one OK for branch-1.6? |
liancheng
commented
Nov 16, 2015
@HyukjinKwon Thanks! I've merged this one to master. And yes, please feel free to add the decimal test case(s). |
marmbrus
commented
Nov 16, 2015
Sure |
liancheng
commented
Nov 16, 2015
Merging to branch-1.6. |
https://issues.apache.org/jira/browse/SPARK-11044 Spark writes a parquet file only with writer version1 ignoring the writer version given by user. So, in this PR, it keeps the writer version if given or sets version1 as default. Author: hyukjinkwon <gurwls223@gmail.com> Author: HyukjinKwon <gurwls223@gmail.com> Closes#9060 from HyukjinKwon/SPARK-11044. (cherry picked from commit 7f8eb3b) Signed-off-by: Cheng Lian <lian@databricks.com>
…metadata and add a test for FIXED_LEN_BYTE_ARRAY As discussed #9660#9060, I cleaned up unused imports, added a test for fixed-length byte array and used a common function for writing metadata for Parquet. For the test for fixed-length byte array, I have tested and checked the encoding types with [parquet-tools](https://github.com/Parquet/parquet-mr/tree/master/parquet-tools). Author: hyukjinkwon <gurwls223@gmail.com> Closes#9754 from HyukjinKwon/SPARK-11694-followup.
…metadata and add a test for FIXED_LEN_BYTE_ARRAY As discussed apache/spark#9660apache/spark#9060, I cleaned up unused imports, added a test for fixed-length byte array and used a common function for writing metadata for Parquet. For the test for fixed-length byte array, I have tested and checked the encoding types with [parquet-tools](https://github.com/Parquet/parquet-mr/tree/master/parquet-tools). Author: hyukjinkwon <gurwls223@gmail.com> Closes #9754 from HyukjinKwon/SPARK-11694-followup.
https://issues.apache.org/jira/browse/SPARK-11044
Spark writes a parquet file only with writer version1 ignoring the writer version given by user.
So, in this PR, it keeps the writer version if given or sets version1 as default.