GitHub user rxin opened a pull request:
https://github.com/apache/spark/pull/21934
[SPARK-24951][SQL] Table valued functions should throw AnalysisException
## What changes were proposed in this pull request?
Previously TVF resolution could throw IllegalArgumentException if the data
type is null type. This patch replaces that exception with AnalysisException,
enriched with positional information, to improve error message reporting and to
be more consistent with rest of Spark SQL.
## How was this patch tested?
Updated the test case in table-valued-functions.sql.out, which is how I
identified this problem in the first place.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rxin/spark SPARK-24951
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21934.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 #21934
----
commit 08a6b7fc1d2a1a6149c4da2ca1657258347fd18f
Author: Reynold Xin <rxin@...>
Date: 2018-07-31T17:47:55Z
[SPARK-24951][SQL] Table valued functions should throw AnalysisException
commit 514fd77501194e43e8029734e4a3669f12fbf749
Author: Reynold Xin <rxin@...>
Date: 2018-07-31T17:53:21Z
Improve error message
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]