Skip to content

Conversation

@zero323
Copy link
Member

@zero323 zero323 commented Feb 1, 2017

What changes were proposed in this pull request?

Add support for data type string as a return type argument of UserDefinedFunction:

f = udf(lambda x: x, "integer")
 f.returnType

## IntegerType

How was this patch tested?

Existing unit tests, additional unit tests covering new feature.

@SparkQA
Copy link

SparkQA commented Feb 1, 2017

Test build #72252 has finished for PR 16769 at commit 0c851db.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Feb 1, 2017

Test build #72254 has finished for PR 16769 at commit 8ea92be.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

@nchammas nchammas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM and brings UDFs more in line with other parts of the DataFrame API where you can specify types as a string.

cc @holdenk @davies @rxin (related to your comment here)

@holdenk
Copy link
Contributor

holdenk commented Feb 13, 2017

LGTM

@holdenk
Copy link
Contributor

holdenk commented Feb 13, 2017

Thanks, merged to master.

@asfgit asfgit closed this in ab88b24 Feb 13, 2017
cmonkey pushed a commit to cmonkey/spark that referenced this pull request Feb 15, 2017
…rgument of UDF

## What changes were proposed in this pull request?

Add support for data type string as a return type argument of `UserDefinedFunction`:

```python
f = udf(lambda x: x, "integer")
 f.returnType

## IntegerType
```

## How was this patch tested?

Existing unit tests, additional unit tests covering new feature.

Author: zero323 <zero323@users.noreply.github.com>

Closes apache#16769 from zero323/SPARK-19427.
@zero323 zero323 deleted the SPARK-19427 branch April 6, 2017 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants