Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-926] Support a UDF: URLDecoder #925

Merged
merged 9 commits into from
May 24, 2022
Merged

Conversation

PHILO-HE
Copy link
Collaborator

What changes were proposed in this pull request?

Support a UDF: URLDecoder.

How was this patch tested?

UT in native code & scala code.

@github-actions
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on Github Issues?

https://github.com/oap-project/native-sql-engine/issues

Then could you also rename commit message and pull request title in the following format?

[NSE-${ISSUES_ID}] ${detailed message}

See also:

@PHILO-HE
Copy link
Collaborator Author

This functionality depends on the row based UDF registering. Thus, the corresponding columnar expression can replace it. The jar contains the row based UDF implementation need be put in spark classpath.

This is an example:
spark.sql("CREATE TEMPORARY FUNCTION testUDF AS 'com.intel.test.URLDecoderNew';")

@PHILO-HE
Copy link
Collaborator Author

This PR depends on oap-project/arrow#105.

@PHILO-HE PHILO-HE changed the title Support a UDF: URLDecoder [NSE-926] Support a UDF: URLDecoder May 19, 2022
@github-actions
Copy link

#926

@PHILO-HE
Copy link
Collaborator Author

Jenkins UT and TPC-DS tests passed.

def create(children: Seq[Expression], original: Expression): Expression = {
original.prettyName match {
// Hive UDF.
case "UrlDecoder" =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this mean the UDF name is case sensitive? e.g., urlDecoder and UrlDecoder are different UDF

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just ignore case in the latest commit which has been validated by some simple tests.

@zhouyuan zhouyuan merged commit 32e2f70 into oap-project:main May 24, 2022
@zhouyuan
Copy link
Collaborator

note: the docs on UDF will be added in another PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants