GitHub user chenghao-intel opened a pull request:
https://github.com/apache/spark/pull/7034
[SPARK-8653][SPARK-8245][SQL] Add DataTypeConstraint Support for Expression
Add Data Type Constraint Support for expression, this aim to merge the
function of
`Expression.checkInputDataTypes()` and the trait `ExpectsInputTypes`,
besides, also provide an opportunity for expression itself to do the proper
expression conversion, other than a general rule.
https://issues.apache.org/jira/browse/SPARK-8653
https://issues.apache.org/jira/browse/SPARK-8245
I enabled the feature in expression `Length` and `FormatNumber` for the
example, and probably more expressions will take that as enhancement.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chenghao-intel/spark expression
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/7034.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 #7034
----
commit f251638837b465003934b4759ad4d93c1d0d927e
Author: Cheng Hao <[email protected]>
Date: 2015-06-26T01:49:06Z
Add AcceptType and update the StringLength => Length
commit d233f995cae3a888660877165cc672bae9ef414d
Author: Cheng Hao <[email protected]>
Date: 2015-06-26T06:46:01Z
Add FormatNumber Support & the DataType Constraint
commit aa16d12eb451236b0a4692a08f593492119d4dee
Author: Cheng Hao <[email protected]>
Date: 2015-06-26T06:53:59Z
Update the comments accordingly
----
---
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]