diff options
author | Reynold Xin <rxin@databricks.com> | 2015-01-15 16:15:12 -0800 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-01-15 16:15:12 -0800 |
commit | 1881431dd50e93a6948e4966d33742727f27e917 (patch) | |
tree | 012aa377cb3d891ce563f5225407176b55936081 /sql/hive | |
parent | 3c8650c12ad7a97852e7bd76153210493fd83e92 (diff) | |
download | spark-1881431dd50e93a6948e4966d33742727f27e917.tar.gz spark-1881431dd50e93a6948e4966d33742727f27e917.tar.bz2 spark-1881431dd50e93a6948e4966d33742727f27e917.zip |
[SPARK-5274][SQL] Reconcile Java and Scala UDFRegistration.
As part of SPARK-5193:
1. Removed UDFRegistration as a mixin in SQLContext and made it a field ("udf").
2. For Java UDFs, renamed dataType to returnType.
3. For Scala UDFs, added type tags.
4. Added all Java UDF registration methods to Scala's UDFRegistration.
5. Documentation
Author: Reynold Xin <rxin@databricks.com>
Closes #4056 from rxin/udf-registration and squashes the following commits:
ae9c556 [Reynold Xin] Updated example.
675a3c9 [Reynold Xin] Style fix
47c24ff [Reynold Xin] Python fix.
5f00c45 [Reynold Xin] Restore data type position in java udf and added typetags.
032f006 [Reynold Xin] [SPARK-5193][SQL] Reconcile Java and Scala UDFRegistration.
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUdfSuite.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUdfSuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUdfSuite.scala index 5fc8d8dbe3..5dafcd6c0a 100644 --- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUdfSuite.scala +++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveUdfSuite.scala @@ -50,7 +50,7 @@ class HiveUdfSuite extends QueryTest { import TestHive._ test("spark sql udf test that returns a struct") { - registerFunction("getStruct", (_: Int) => Fields(1, 2, 3, 4, 5)) + udf.register("getStruct", (_: Int) => Fields(1, 2, 3, 4, 5)) assert(sql( """ |SELECT getStruct(1).f1, |