Skip to content

Commit

Permalink
Move changes to presto-native-sidecar-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pdabre12 authored and Pratik Joseph Dabre committed Aug 16, 2024
1 parent f5a7a9f commit bcb09bc
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 16 deletions.
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
<module>presto-singlestore</module>
<module>presto-hana</module>
<module>presto-openapi</module>
<module>presto-native-sidecar-plugin</module>
</modules>

<dependencyManagement>
Expand Down Expand Up @@ -892,6 +893,13 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-native-sidecar-plugin</artifactId>
<version>${project.version}</version>
</dependency>


<dependency>
<groupId>com.facebook.hive</groupId>
<artifactId>hive-dwrf</artifactId>
Expand Down
10 changes: 10 additions & 0 deletions presto-native-execution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@
<artifactId>opencsv</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-native-sidecar-plugin</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-native-sidecar-plugin</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void main(String[] args)

// Launch distributed runner.
DistributedQueryRunner queryRunner = (DistributedQueryRunner) PrestoNativeQueryRunnerUtils.createQueryRunner(false);
// todo: verify if these function should be added now
// todo: verify if this function should be added now
setupNativeFunctionNamespaceManager(queryRunner, "native");
Thread.sleep(10);
Logger log = Logger.get(DistributedQueryRunner.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import com.facebook.airlift.log.Logger;
import com.facebook.presto.functionNamespace.FunctionNamespaceManagerPlugin;
import com.facebook.presto.functionNamespace.json.JsonFileBasedFunctionNamespaceManagerFactory;
import com.facebook.presto.functionNamespace.prestissimo.NativeFunctionNamespaceManagerFactory;
import com.facebook.presto.functionNamespace.prestissimo.NativeFunctionNamespaceManagerPlugin;
import com.facebook.presto.hive.HiveQueryRunner;
import com.facebook.presto.iceberg.FileFormat;
import com.facebook.presto.sidecar.functionNamespace.NativeFunctionNamespaceManagerFactory;
import com.facebook.presto.sidecar.NativeSidecarPlugin;
import com.facebook.presto.testing.QueryRunner;
import com.facebook.presto.tests.DistributedQueryRunner;
import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -548,7 +548,7 @@ public static void setupJsonFunctionNamespaceManager(QueryRunner queryRunner, St

public static void setupNativeFunctionNamespaceManager(QueryRunner queryRunner, String catalogName)
{
queryRunner.installCoordinatorPlugin(new NativeFunctionNamespaceManagerPlugin());
queryRunner.installCoordinatorPlugin(new NativeSidecarPlugin());
queryRunner.loadNativeFunctionNamespaceManager(
NativeFunctionNamespaceManagerFactory.NAME,
catalogName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<version>0.289-SNAPSHOT</version>
</parent>

<artifactId>presto-native-plugin</artifactId>
<description>Presto - Session Property Managers</description>
<artifactId>presto-native-sidecar-plugin</artifactId>
<description>Presto - Native Sidecar Plugin</description>

<properties>
<air.main.basedir>${project.parent.basedir}</air.main.basedir>
Expand Down Expand Up @@ -119,9 +119,11 @@
<artifactId>testing</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-function-namespace-managers</artifactId>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar;

import com.facebook.presto.sidecar.functionNamespace.NativeFunctionNamespaceManagerFactory;
import com.facebook.presto.spi.CoordinatorPlugin;
import com.facebook.presto.spi.function.FunctionNamespaceManagerFactory;
import com.google.common.collect.ImmutableList;
Expand All @@ -25,4 +26,4 @@ public Iterable<FunctionNamespaceManagerFactory> getFunctionNamespaceManagerFact
{
return ImmutableList.of(new NativeFunctionNamespaceManagerFactory());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* limitations under the License.
*/

package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar.functionNamespace;

import com.facebook.presto.functionNamespace.UdfFunctionSignatureMap;
import com.facebook.presto.spi.NodeManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar.functionNamespace;

import com.facebook.airlift.json.JsonCodec;
import com.facebook.airlift.log.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar.functionNamespace;

import com.facebook.presto.common.CatalogSchemaName;
import com.facebook.presto.spi.function.FunctionKind;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar.functionNamespace;

import com.facebook.airlift.log.Logger;
import com.facebook.presto.common.CatalogSchemaName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar.functionNamespace;

import com.facebook.airlift.bootstrap.Bootstrap;
import com.facebook.presto.functionNamespace.execution.NoopSqlFunctionExecutorsModule;
import com.facebook.presto.sidecar.NativeSidecarPlugin;
import com.facebook.presto.spi.function.FunctionHandleResolver;
import com.facebook.presto.spi.function.FunctionNamespaceManager;
import com.facebook.presto.spi.function.FunctionNamespaceManagerContext;
Expand All @@ -28,7 +29,7 @@

/**
* Factory class to create instance of {@link NativeFunctionNamespaceManager}.
* This factor is registered in {@link com.facebook.presto.nativeFunctionNamespace.NativeSidecarPlugin#getFunctionNamespaceManagerFactories()}.
* This factor is registered in {@link NativeSidecarPlugin#getFunctionNamespaceManagerFactories()}.
*/
public class NativeFunctionNamespaceManagerFactory
implements FunctionNamespaceManagerFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.facebook.presto.nativeFunctionNamespace;
package com.facebook.presto.sidecar.functionNamespace;

import com.facebook.airlift.json.JsonCodec;
import com.facebook.airlift.json.JsonCodecFactory;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
com.facebook.presto.sidecar.NativeSidecarPlugin
19 changes: 18 additions & 1 deletion presto-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,11 @@
<artifactId>javax.servlet-api</artifactId>
</dependency>

<dependency>
<groupId>com.facebook.airlift</groupId>
<artifactId>jaxrs</artifactId>
</dependency>

<!-- used by tests but also needed transitively -->
<dependency>
<groupId>com.facebook.airlift</groupId>
Expand Down Expand Up @@ -277,6 +282,18 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-native-sidecar-plugin</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.facebook.airlift</groupId>
<artifactId>jaxrs-testing</artifactId>
<scope>test</scope>
</dependency>

<!-- for benchmarks -->
<dependency>
<groupId>org.openjdk.jmh</groupId>
Expand Down Expand Up @@ -322,7 +339,7 @@
<scope>runtime</scope>
<optional>true</optional>
</dependency>

</dependencies>

<build>
Expand Down

0 comments on commit bcb09bc

Please sign in to comment.