Skip to content
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

Test UDF functions are revealed #3094

Closed
MichaelDrogalis opened this issue Jul 18, 2019 · 2 comments · May be fixed by #3252
Closed

Test UDF functions are revealed #3094

MichaelDrogalis opened this issue Jul 18, 2019 · 2 comments · May be fixed by #3252
Assignees
Labels

Comments

@MichaelDrogalis
Copy link
Contributor

When I run describe functions, I get test UDFs like TEST_UDF and COMPLEXFUNCTION. These shouldn't be visible.

@stevenpyzhang
Copy link
Member

This is caused by #2804 . Will close this issue for now and hold off on doing any further work until there's further discussion for the other issue. There are some quick solutions that can address this, but it doesn't make sense to do them if resolving #2804 will fix this bug anyways.

I verified between the 5.2.x and 5.3.x branch that the functions only show up in the 5.3.x branch, which is when ksql-functional-tests were added. In total there are 6 functions that began showing up:

COMPLEXFUNCTION
CONFIGURABLEUDF
E2ECONFIGURABLEUDF
SOMEFUNCTION
TEST_UDAF
TEST_UDF

The reason why they show up is that in UdfLoader.java at line 140, fastClasspathScanner scans all jar files in the directory that contain "ksql-engine" in the path name so that it can find public internal UDF and UDAF to add to the functionRegistry. In ksql-functional-tests, there's a copy of the ksql-engine test-jar (contains the test UDF/UDAF) since that's a dependency for the functional tests. The scanner picks up on the test-jar, which results in the test functions being added to the function registry.

ksql-engine-5.4.0-SNAPSHOT-tests.jar

@big-andy-coates
Copy link
Contributor

Closing as duplicate of #2804

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

Successfully merging a pull request may close this issue.

3 participants