diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-03-27 20:06:02 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-03-27 20:06:02 +0100 |
commit | cfcca732b403b1af406c2507f3efab928e8b9c6c (patch) | |
tree | de221cf5f17912c13097d50ce565906543d27372 /sql/README.md | |
parent | a01b6a92b5f0287a5236bddb1b817d13f320d489 (diff) | |
download | spark-cfcca732b403b1af406c2507f3efab928e8b9c6c.tar.gz spark-cfcca732b403b1af406c2507f3efab928e8b9c6c.tar.bz2 spark-cfcca732b403b1af406c2507f3efab928e8b9c6c.zip |
[MINOR][SQL] Fix substr/substring testcases.
## What changes were proposed in this pull request?
This PR fixes the following two testcases in order to test the correct usages.
```
checkSqlGeneration("SELECT substr('This is a test', 'is')")
checkSqlGeneration("SELECT substring('This is a test', 'is')")
```
Actually, the testcases works but tests on exceptional cases.
```
scala> sql("SELECT substr('This is a test', 'is')")
res0: org.apache.spark.sql.DataFrame = [substring(This is a test, CAST(is AS INT), 2147483647): string]
scala> sql("SELECT substr('This is a test', 'is')").collect()
res1: Array[org.apache.spark.sql.Row] = Array([null])
```
## How was this patch tested?
Pass the modified unit tests.
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #11963 from dongjoon-hyun/fix_substr_testcase.
Diffstat (limited to 'sql/README.md')
0 files changed, 0 insertions, 0 deletions