GitHub user viirya opened a pull request:
https://github.com/apache/spark/pull/5263
[SPARK-6607][SQL] Aggregation attribute name including special chars '('
and ')' should be replaced before generating Parquet schema
'(' 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]".
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/viirya/spark-1 parquet_aggregation_name
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/5263.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #5263
----
commit 1de001d375d06ec681a2ac4eb3a62f01310af21d
Author: Liang-Chi Hsieh <[email protected]>
Date: 2015-03-30T11:05:26Z
Replace special characters '(' and ')' of Parquet schema.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]