-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
implement rest endpoint #23214
base: master
Are you sure you want to change the base?
implement rest endpoint #23214
Conversation
...tion-namespace-managers/src/main/java/com/facebook/presto/functionNamespace/rest-openapi.yml
Outdated
Show resolved
Hide resolved
...tion-namespace-managers/src/main/java/com/facebook/presto/functionNamespace/rest-openapi.yml
Outdated
Show resolved
Hide resolved
8ddc7f8
to
aee25a0
Compare
...tion-namespace-managers/src/main/java/com/facebook/presto/functionNamespace/rest-openapi.yml
Outdated
Show resolved
Hide resolved
...tion-namespace-managers/src/main/java/com/facebook/presto/functionNamespace/rest-openapi.yml
Outdated
Show resolved
Hide resolved
aa6e1e4
to
6025e69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase your PR and add the OpenAPI documentation to the OpenAPI module
.../main/java/com/facebook/presto/functionNamespace/execution/rest/RestSqlFunctionExecutor.java
Outdated
Show resolved
Hide resolved
.../main/java/com/facebook/presto/functionNamespace/execution/rest/RestSqlFunctionExecutor.java
Outdated
Show resolved
Hide resolved
.../main/java/com/facebook/presto/functionNamespace/execution/rest/RestSqlFunctionExecutor.java
Outdated
Show resolved
Hide resolved
c4e4f41
to
345c4a9
Compare
.../main/java/com/facebook/presto/functionNamespace/execution/rest/RestSqlFunctionExecutor.java
Outdated
Show resolved
Hide resolved
cf6e164
to
443e3b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll need to create a test that proves this works. See an example here for expression evaluation that sets up a mock endpoint for evaluation: https://github.com/prestodb/presto/pull/23331/files#diff-48ca45cdbb379b0774a87a3b94925c737039a2975be40c8a282843c9b26717f2R118
Give it a try and let me know if you need help implementing it.
presto-main/src/main/java/com/facebook/presto/sql/planner/RowExpressionInterpreter.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/server/ServerConfig.java
Outdated
Show resolved
Hide resolved
@jkhaliqi : Please can you give more information about this PR and the functionality. Is this part of any RFC ? |
It's part of https://github.com/prestodb/rfcs/pull/25/files @jkhaliqi let's update the PR description to give more context. |
fadf190
to
7a0295c
Compare
b561100
to
7ef269c
Compare
@@ -149,6 +149,16 @@ | |||
<scope>provided</scope> | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>com.facebook.drift</groupId> | |||
<artifactId>drift-transport-netty</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this dependency? If so, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this dependency is needed for the MySqlFunctionNamespaceManagerFactory where it is creating a new DriftNettyClientModule(). I just changed the code position around because it was under the testing section so I put it above that section in the pom.xml file.
...ook/presto/functionNamespace/execution/rest/SimpleAddressRestSqlFunctionExecutorsModule.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/facebook/presto/functionNamespace/execution/rest/RestURIServerConfig.java
Outdated
Show resolved
Hide resolved
...ook/presto/functionNamespace/execution/rest/SimpleAddressRestSqlFunctionExecutorsModule.java
Outdated
Show resolved
Hide resolved
install(sqlFunctionExecutorModule); | ||
// for SqlFunctionExecutors | ||
binder.bind(SqlFunctionExecutors.class).in(SINGLETON); | ||
binder.bind(new TypeLiteral<Map<Language, FunctionImplementationType>>() {}).toInstance(languageImplementationTypeMap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this injected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is injected in SqlFunctionExecutors
@Inject
public SqlFunctionExecutors(Map<Language, FunctionImplementationType> supportedLanguages, SqlFunctionExecutor sqlFunctionExecutor)
{
this.supportedLanguages = requireNonNull(supportedLanguages, "supportedLanguages is null");
this.sqlFunctionExecutor = requireNonNull(sqlFunctionExecutor, "sqlFunctionExecutor is null");
}
.../main/java/com/facebook/presto/functionNamespace/execution/rest/RestSqlFunctionExecutor.java
Outdated
Show resolved
Hide resolved
.../main/java/com/facebook/presto/functionNamespace/execution/rest/RestSqlFunctionExecutor.java
Outdated
Show resolved
Hide resolved
066697a
to
afa8ed5
Compare
d8e2ed8
to
42700ba
Compare
b444c21
to
191c633
Compare
10fccd8
to
77f71ac
Compare
Description
Part of: https://github.com/prestodb/rfcs/pull/25/files
Conveniently right now we have java and c++ functions being called and most of the java functions work with cpp functions. Also the java function has to be identical to the cpp function for it to work. Now people have the choice to create their own functions and if someone creates a function that is not known to java we can either crash of have this method call so that it creates a function in cpp to be called and it does not crash. The point of those functions outside of java is to speed up planning of execution and nodes by these functions that are not there in java.
Motivation and Context
Open issue: https://github.ibm.com/lakehouse/tracker/issues/8413
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
If release note is NOT required, use: