Skip to content

Commit

Permalink
fix thrift remote funciton
Browse files Browse the repository at this point in the history
  • Loading branch information
wills-feng authored and aditi-pandit committed Jul 19, 2024
1 parent 7bd2b82 commit 30c4804
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion presto-function-namespace-managers/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
<dependency>
<groupId>com.facebook.drift</groupId>
<artifactId>drift-transport-netty</artifactId>
<scope>test</scope>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
package com.facebook.presto.functionNamespace.mysql;

import com.facebook.airlift.bootstrap.Bootstrap;
import com.facebook.drift.transport.netty.client.DriftNettyClientModule;
import com.facebook.presto.functionNamespace.execution.SimpleAddressSqlFunctionExecutorsModule;
import com.facebook.presto.spi.function.FunctionHandleResolver;
import com.facebook.presto.spi.function.FunctionNamespaceManager;
Expand Down Expand Up @@ -50,6 +51,7 @@ public FunctionNamespaceManager<?> create(String catalogName, Map<String, String
{
try {
Bootstrap app = new Bootstrap(
new DriftNettyClientModule(),
new MySqlFunctionNamespaceManagerModule(catalogName),
new MySqlConnectionModule(),
new SimpleAddressSqlFunctionExecutorsModule());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public static void start(Map<String, String> properties)
.add(new DriftNettyServerModule())
.add(new TestingThriftUdfServerModule())
.build());
app.setRequiredConfigurationProperties(properties).initialize();
if (!properties.isEmpty()) {
app.setRequiredConfigurationProperties(properties);
}
app.initialize();
}

public static void main(String[] args)
Expand Down

0 comments on commit 30c4804

Please sign in to comment.