GitHub user wangyum opened a pull request:
https://github.com/apache/spark/pull/18527
[SPARK-21101][SQL] Catch IllegalStateException when CREATE TEMPORARY
FUNCTION
## What changes were proposed in this pull request?
It must `override` [`public StructObjectInspector
initialize(ObjectInspector[]
argOIs)`](https://github.com/apache/hive/blob/release-2.0.0/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTF.java#L70)
when create a UDTF.
If you `override` [`public StructObjectInspector
initialize(StructObjectInspector
argOIs)`](https://github.com/apache/hive/blob/release-2.0.0/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDTF.java#L49),
`IllegalStateException` will throw. per:
[HIVE-12377](https://issues.apache.org/jira/browse/HIVE-12377).
This PR catch `IllegalStateException` and point user to `override` `public
StructObjectInspector initialize(ObjectInspector[] argOIs)`.
## How was this patch tested?
manual tests
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wangyum/spark SPARK-21101
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18527.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 #18527
----
commit a3bd52b6d96ca3b339402047ca612f638fa1e9fb
Author: Yuming Wang <[email protected]>
Date: 2017-07-04T12:59:21Z
catch AnalysisException
----
---
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]