diff options
author | petermaxlee <petermaxlee@gmail.com> | 2016-08-18 13:44:13 +0200 |
---|---|---|
committer | Herman van Hovell <hvanhovell@databricks.com> | 2016-08-18 13:44:13 +0200 |
commit | 68f5087d2107d6afec5d5745f0cb0e9e3bdd6a0b (patch) | |
tree | bf354d1a234d37e7458451000778ca9f474d07a7 /R/pkg/inst/tests/testthat/test_mllib.R | |
parent | 412dba63b511474a6db3c43c8618d803e604bc6b (diff) | |
download | spark-68f5087d2107d6afec5d5745f0cb0e9e3bdd6a0b.tar.gz spark-68f5087d2107d6afec5d5745f0cb0e9e3bdd6a0b.tar.bz2 spark-68f5087d2107d6afec5d5745f0cb0e9e3bdd6a0b.zip |
[SPARK-17117][SQL] 1 / NULL should not fail analysis
## What changes were proposed in this pull request?
This patch fixes the problem described in SPARK-17117, i.e. "SELECT 1 / NULL" throws an analysis exception:
```
org.apache.spark.sql.AnalysisException: cannot resolve '(1 / NULL)' due to data type mismatch: differing types in '(1 / NULL)' (int and null).
```
The problem is that division type coercion did not take null type into account.
## How was this patch tested?
A unit test for the type coercion, and a few end-to-end test cases using SQLQueryTestSuite.
Author: petermaxlee <petermaxlee@gmail.com>
Closes #14695 from petermaxlee/SPARK-17117.
Diffstat (limited to 'R/pkg/inst/tests/testthat/test_mllib.R')
0 files changed, 0 insertions, 0 deletions