https://github.com/apache/spark
Revision a3fef2c02f93b48c15feec21515567d6fded19f1 authored by Yin Huai on 02 March 2015, 15:18:07 UTC, committed by Cheng Lian on 02 March 2015, 15:18:31 UTC
Always set `containsNull = true` when infer the schema of JSON datasets. If we set `containsNull` based on records we scanned, we may miss arrays with null values when we do sampling. Also, because future data can have arrays with null values, if we convert JSON data to parquet, always setting `containsNull = true` is a more robust way to go.

JIRA: https://issues.apache.org/jira/browse/SPARK-6052

Author: Yin Huai <yhuai@databricks.com>

Closes #4806 from yhuai/jsonArrayContainsNull and squashes the following commits:

05eab9d [Yin Huai] Change containsNull to true.

(cherry picked from commit 3efd8bb6cf139ce094ff631c7a9c1eb93fdcd566)
Signed-off-by: Cheng Lian <lian@databricks.com>
1 parent c59871c
History
Tip revision: a3fef2c02f93b48c15feec21515567d6fded19f1 authored by Yin Huai on 02 March 2015, 15:18:07 UTC
[SPARK-6052][SQL]In JSON schema inference, we should always set containsNull of an ArrayType to true
Tip revision: a3fef2c

README.md

back to top