diff options
author | Liang-Chi Hsieh <viirya@gmail.com> | 2015-04-05 00:20:43 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2015-04-05 00:20:43 +0800 |
commit | 7bca62f79056e592cf07b49d8b8d04c59dea25fc (patch) | |
tree | dd8775fb9a5f8cf7f4d7784fbdfcd4d509888944 /yarn | |
parent | da25c86d64ff9ce80f88186ba083f6c21dd9a568 (diff) | |
download | spark-7bca62f79056e592cf07b49d8b8d04c59dea25fc.tar.gz spark-7bca62f79056e592cf07b49d8b8d04c59dea25fc.tar.bz2 spark-7bca62f79056e592cf07b49d8b8d04c59dea25fc.zip |
[SPARK-6607][SQL] Check invalid characters for Parquet schema and show error messages
'(' and ')' are special characters used in Parquet schema for type annotation. When we run an aggregation query, we will obtain attribute name such as "MAX(a)".
If we directly store the generated DataFrame as Parquet file, it causes failure when reading and parsing the stored schema string.
Several methods can be adopted to solve this. This pr uses a simplest one to just replace attribute names before generating Parquet schema based on these attributes.
Another possible method might be modifying all aggregation expression names from "func(column)" to "func[column]".
Author: Liang-Chi Hsieh <viirya@gmail.com>
Closes #5263 from viirya/parquet_aggregation_name and squashes the following commits:
2d70542 [Liang-Chi Hsieh] Address comment.
463dff4 [Liang-Chi Hsieh] Instead of replacing special chars, showing error message to user to suggest using Alias.
1de001d [Liang-Chi Hsieh] Replace special characters '(' and ')' of Parquet schema.
Diffstat (limited to 'yarn')
0 files changed, 0 insertions, 0 deletions