GitHub user x1- opened a pull request:
https://github.com/apache/spark/pull/7106
[SPARK-8450][SQL]If column type is BigDecimal, the column should be
converted to Decimal.
### abstract
When `createDataFrame` is called(via **PySpark**), `CatalystTypeConverters`
convert `Decimal` to `java.math.BigDecimal`.
see:
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala#L71
But, when `write.parque` is called, `MutableRowWriteSupport` force to cast
to `Decimal`.
So, `Exception` occured.
Thus, this PR add method to convert `java.math.BigDecimal` to `Decimal`.
### issue
* [SPARK-8450 PySpark write.parquet raises Unsupported datatype
DecimalType()](https://issues.apache.org/jira/browse/SPARK-8450)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/x1-/spark SPARK-8450
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7106.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 #7106
----
commit 1db8482c6fd88f125821a5b1a89f01301543a804
Author: x1- <[email protected]>
Date: 2015-06-29T11:10:03Z
if instance is BigDecimal, the instance be converted to Decimal.
----
---
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]