Skip to content

Conversation

@maropu
Copy link
Member

@maropu maropu commented Jan 26, 2017

What changes were proposed in this pull request?

This pr added a variable for a UDF name in ScalaUDF.
Then, if the variable filled, DataFrame#explain prints the name.

How was this patch tested?

Added a test in UDFSuite.

@rxin
Copy link
Contributor

rxin commented Jan 26, 2017

Maybe add a prefix so it is clear a UDF? e.g. UDF:func_name(...)

@maropu
Copy link
Member Author

maropu commented Jan 26, 2017

Aha, SGTM. I'll fix

@SparkQA
Copy link

SparkQA commented Jan 26, 2017

Test build #72013 has started for PR 16707 at commit 637a39d.

@rxin
Copy link
Contributor

rxin commented Jan 26, 2017

LGTM pending jenkins.

val dataType = ScalaReflection.schemaFor[RT].dataType
val inputTypes = Try(Nil).toOption
def builder(e: Seq[Expression]) = ScalaUDF(func, dataType, e, inputTypes.getOrElse(Nil))
def builder(e: Seq[Expression]) = ScalaUDF(func, dataType, e, inputTypes.getOrElse(Nil), Some(name))
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I remember I was told that we should remove or fix the comments above to generate this codes too.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, yea, you're right. Thanks! I'll fix

@SparkQA
Copy link

SparkQA commented Jan 26, 2017

Test build #72010 has finished for PR 16707 at commit 1b70561.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member Author

maropu commented Jan 26, 2017

It seems the latest test failure does not relate to this pr..., I'll test again.

@SparkQA
Copy link

SparkQA commented Jan 26, 2017

Test build #72014 has started for PR 16707 at commit 836f0fb.

Copy link
Member

@gatorsmile gatorsmile left a comment

Choose a reason for hiding this comment

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

LGTM pending jenkins.

@maropu
Copy link
Member Author

maropu commented Jan 26, 2017

Jenkins, retest this please.

@SparkQA
Copy link

SparkQA commented Jan 26, 2017

Test build #72018 has finished for PR 16707 at commit 836f0fb.

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

@maropu
Copy link
Member Author

maropu commented Jan 26, 2017

@gatorsmile @rxin okay, it seems ready to merge.

asfgit pushed a commit that referenced this pull request Jan 26, 2017
## What changes were proposed in this pull request?
This pr added a variable for a UDF name in `ScalaUDF`.
Then, if the variable filled, `DataFrame#explain` prints the name.

## How was this patch tested?
Added a test in `UDFSuite`.

Author: Takeshi YAMAMURO <[email protected]>

Closes #16707 from maropu/SPARK-19338.

(cherry picked from commit 9f523d3)
Signed-off-by: gatorsmile <[email protected]>
@gatorsmile
Copy link
Member

Thanks! Merging to master.

@asfgit asfgit closed this in 9f523d3 Jan 26, 2017
uzadude pushed a commit to uzadude/spark that referenced this pull request Jan 27, 2017
## What changes were proposed in this pull request?
This pr added a variable for a UDF name in `ScalaUDF`.
Then, if the variable filled, `DataFrame#explain` prints the name.

## How was this patch tested?
Added a test in `UDFSuite`.

Author: Takeshi YAMAMURO <[email protected]>

Closes apache#16707 from maropu/SPARK-19338.
cmonkey pushed a commit to cmonkey/spark that referenced this pull request Feb 15, 2017
## What changes were proposed in this pull request?
This pr added a variable for a UDF name in `ScalaUDF`.
Then, if the variable filled, `DataFrame#explain` prints the name.

## How was this patch tested?
Added a test in `UDFSuite`.

Author: Takeshi YAMAMURO <[email protected]>

Closes apache#16707 from maropu/SPARK-19338.
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.

5 participants