Uh oh!
There was an error while loading. Please reload this page.
[SPARK-2927][SQL] Add a conf to configure if we always read Binary columns stored in Parquet as String columns - #1855
[SPARK-2927][SQL] Add a conf to configure if we always read Binary columns stored in Parquet as String columns#1855yhuai wants to merge 5 commits into
Conversation
…n Parquet as string columns.
SparkQA
commented
Aug 8, 2014
QA tests have started for PR 1855. This patch merges cleanly. |
There was a problem hiding this comment.
Nit: the if here is redundant.
SparkQA
commented
Aug 8, 2014
QA results for PR 1855: |
marmbrus
commented
Aug 13, 2014
@yhuai can you maybe fix the if and then remove WIP? Is this ready to go then? |
yhuai
commented
Aug 13, 2014
Actually, it needs a unit test. Let me take a look at how to add one. |
SparkQA
commented
Aug 13, 2014
QA tests have started for PR 1855. This patch merges cleanly. |
SparkQA
commented
Aug 14, 2014
QA results for PR 1855: |
yhuai
commented
Aug 14, 2014
@marmbrus Can you take a look at the unit test? If it is ok, I think this PR is good to go. |
marmbrus
commented
Aug 14, 2014
Nice test. Will merge once jenkins is happy. |
marmbrus
commented
Aug 14, 2014
Jenkins, test this please. |
SparkQA
commented
Aug 14, 2014
QA tests have started for PR 1855. This patch merges cleanly. |
SparkQA
commented
Aug 14, 2014
QA tests have started for PR 1855. This patch merges cleanly. |
SparkQA
commented
Aug 14, 2014
QA results for PR 1855: |
SparkQA
commented
Aug 14, 2014
QA results for PR 1855: |
marmbrus
commented
Aug 14, 2014
Thanks! I've merged this to master and 1.1. |
…lumns stored in Parquet as String columns This PR adds a new conf flag `spark.sql.parquet.binaryAsString`. When it is `true`, if there is no parquet metadata file available to provide the schema of the data, we will always treat binary fields stored in parquet as string fields. This conf is used to provide a way to read string fields generated without UTF8 decoration. JIRA: https://issues.apache.org/jira/browse/SPARK-2927 Author: Yin Huai <huai@cse.ohio-state.edu> Closes#1855 from yhuai/parquetBinaryAsString and squashes the following commits: 689ffa9 [Yin Huai] Add missing "=". 80827de [Yin Huai] Unit test. 1765ca4 [Yin Huai] Use .toBoolean. 9d3f199 [Yin Huai] Merge remote-tracking branch 'upstream/master' into parquetBinaryAsString 5d436a1 [Yin Huai] The initial support of adding a conf to treat binary columns stored in Parquet as string columns. (cherry picked from commit add75d4) Signed-off-by: Michael Armbrust <michael@databricks.com>
There was a problem hiding this comment.
this patch will be great for impala users like us :) thanks, moreover, there is a getCreatedBy method in readMetaData(origPath, conf).getFileMetaData, and impala creates parquet files always with its own CreatedBy information (always contains string "impala"), so, maybe we can do some auto-detection like (https://github.com/apache/spark/pull/1599/files)
if (fileMetaData.getCreatedBy.contains("impala")) {
isBinaryAsString = true
log.info(s"Impala parquet file found, blabla...")
}
does this auto-detection make sense?
There was a problem hiding this comment.
My only concern with auto detection like this is, what happens when impala starts adding the correct annotation and supporting byte arrays?
There was a problem hiding this comment.
good question, such a auto detection brings confusion, this is a problem of impala, not spark sql, we are not going to make a impala file format corrector :)
…lumns stored in Parquet as String columns This PR adds a new conf flag `spark.sql.parquet.binaryAsString`. When it is `true`, if there is no parquet metadata file available to provide the schema of the data, we will always treat binary fields stored in parquet as string fields. This conf is used to provide a way to read string fields generated without UTF8 decoration. JIRA: https://issues.apache.org/jira/browse/SPARK-2927 Author: Yin Huai <huai@cse.ohio-state.edu> Closesapache#1855 from yhuai/parquetBinaryAsString and squashes the following commits: 689ffa9 [Yin Huai] Add missing "=". 80827de [Yin Huai] Unit test. 1765ca4 [Yin Huai] Use .toBoolean. 9d3f199 [Yin Huai] Merge remote-tracking branch 'upstream/master' into parquetBinaryAsString 5d436a1 [Yin Huai] The initial support of adding a conf to treat binary columns stored in Parquet as string columns.
This PR adds a new conf flag
spark.sql.parquet.binaryAsString. When it istrue, if there is no parquet metadata file available to provide the schema of the data, we will always treat binary fields stored in parquet as string fields. This conf is used to provide a way to read string fields generated without UTF8 decoration.JIRA: https://issues.apache.org/jira/browse/SPARK-2927