Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
update #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
update #1
Changes from 1 commit
2b8d89e255b56fa7a9d1439ab87b16ef4d1ccd5ab592ef02696ba04b20424dafc4d057800ecff0c5c6a6e364348f0d880edc96536c7db2742c3566639b819386534d022649b684467462e6efca077f6334ce92cc7003c167c5fc28ee07541774142f3bc3f18e3d85b7fc47bb6ff511baf2eb84f95cf2030feb3492248891437dc8c94d1f467c7ce5410973272f4b1706ab96a62ac37db88a519de9b275bda50176e966284894d48f118c1c4a7c305b4fb25935a110da669e3f092ca9103072b9672cfb13f193312f68105d4dbabb3e5749a1dc0865b49b3612e021362cc82050492a195ef4ff008f51491d843014b124de596327199998efab190083c4755402cdc3e51499101cb9e7d58ff441772e3369f1957e1284771ea32f0fb82d209d0dacb1a5328c0a8d338f6c41fdf04415722580c701c0b47bac82fe47eb5bdcabaf9ce1f5d9beab27030978f2af5d88e6957058a53880eabe3822f330da07daa38d3c9e8e0fd6f6a1899c281189e25ec06fda47594bc3bb2adc8303dab3796d934801148af6008c095b25cad6a44460ba87738bfe09e18b3f6738267bd8e391f95044c47711158ad0b198df11866cf1fd2100221a8043733f167d9cf429a3dc55fdf8cd143a0bcbc12998e38236dfacac33cbbe139e2b55349f96ba6c3e5507dd8ae58aeae053c5559f84a98e7d5ba9fd82db05bf4e4066765d4fde28ca646a369862c61184048fe87075d2c0f7051c5555a6e821e3ac3440f74f82c741e0a21cc491f6acff9a71aad9112643e66d94f599d0ae3f369ec6781d70c4f82624e2b70bae45a826c063bdb1fc7b5201ee7f30809f7e45File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
This patch adds the ability to register lambda functions written in Python, Java or Scala as UDFs for use in SQL or HiveQL. Scala: ```scala registerFunction("strLenScala", (_: String).length) sql("SELECT strLenScala('test')") ``` Python: ```python sqlCtx.registerFunction("strLenPython", lambda x: len(x), IntegerType()) sqlCtx.sql("SELECT strLenPython('test')") ``` Java: ```java sqlContext.registerFunction("stringLengthJava", new UDF1<String, Integer>() { Override public Integer call(String str) throws Exception { return str.length(); } }, DataType.IntegerType); sqlContext.sql("SELECT stringLengthJava('test')"); ``` Author: Michael Armbrust <michael@databricks.com> Closes apache#1063 from marmbrus/udfs and squashes the following commits: 9eda0fe [Michael Armbrust] newline 747c05e [Michael Armbrust] Add some scala UDF tests. d92727d [Michael Armbrust] Merge remote-tracking branch 'apache/master' into udfs 005d684 [Michael Armbrust] Fix naming and formatting. d14dac8 [Michael Armbrust] Fix last line of autogened java files. 8135c48 [Michael Armbrust] Move UDF unit tests to pyspark. 40b0ffd [Michael Armbrust] Merge remote-tracking branch 'apache/master' into udfs 6a36890 [Michael Armbrust] Switch logging so that SQLContext can be serializable. 7a83101 [Michael Armbrust] Drop toString 795fd15 [Michael Armbrust] Try to avoid capturing SQLContext. e54fb45 [Michael Armbrust] Docs and tests. 437cbe3 [Michael Armbrust] Update use of dataTypes, fix some python tests, address review comments. 01517d6 [Michael Armbrust] Merge remote-tracking branch 'origin/master' into udfs 8e6c932 [Michael Armbrust] WIP 3f96a52 [Michael Armbrust] Merge remote-tracking branch 'origin/master' into udfs 6237c8d [Michael Armbrust] WIP 2766f0b [Michael Armbrust] Move udfs support to SQL from hive. Add support for Java UDFs. 0f7d50c [Michael Armbrust] Draft of native Spark SQL UDFs for Scala and Python.Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.