diff options
author | wangfei <wangfei1@huawei.com> | 2015-01-29 15:44:53 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-01-29 15:44:53 -0800 |
commit | fbaf9e08961551d3ae5c3629eca01e839b001b8e (patch) | |
tree | 1b62e0e56ddd3924747bbbc3d794014e11deb4b2 /sql/hive | |
parent | de221ea03288fb9fb7c14530425f4a9414b1088f (diff) | |
download | spark-fbaf9e08961551d3ae5c3629eca01e839b001b8e.tar.gz spark-fbaf9e08961551d3ae5c3629eca01e839b001b8e.tar.bz2 spark-fbaf9e08961551d3ae5c3629eca01e839b001b8e.zip |
[SPARK-5367][SQL] Support star expression in udf
now spark sql does not support star expression in udf, run the following sql by spark-sql will get error
```
select concat(*) from src
```
Author: wangfei <wangfei1@huawei.com>
Author: scwf <wangfei1@huawei.com>
Closes #4163 from scwf/udf-star and squashes the following commits:
9db7b39 [wangfei] addressed comments
da1da09 [scwf] minor fix
f87b5f9 [scwf] added test case
587bf7e [wangfei] compile fix
eb93c16 [wangfei] fix star resolve issue in udf
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala index 42819e3584..60619f5d99 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala @@ -509,6 +509,11 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter { assert(sql("select key from src having key > 490").collect().size < 100) } + test("SPARK-5367: resolve star expression in udf") { + assert(sql("select concat(*) from src limit 5").collect().size == 5) + assert(sql("select array(*) from src limit 5").collect().size == 5) + } + test("Query Hive native command execution result") { val tableName = "test_native_commands" |