linkedin / transport

A framework for writing performant user-defined functions (UDFs) that are portable across a variety of engines including Apache Spark, Apache Hive, and Presto.
BSD 2-Clause "Simplified" License
297 stars 73 forks source link

Loading Transport classes from the jars packaged in TransportTrinoPlugin #152

Closed yiqiangin closed 1 year ago

yiqiangin commented 1 year ago

Code Change As the package of TransportTrinoPlugin already includes some Transport jars as follows:

transportable-udfs-trino which class path is com.linkedin.transport.trino
transportable-udfs-utils which class path is com.linkedin.transport.utils
transportable-udfs-type-system which class path is com.linkedin.transport.typesystem

PluginClassLoader in Trino which is the parent class loader of TransportUDFClassLoader can be used to load the classes from these jars, so TransportUDFClassLoader does not have to load them from the jars in UDF MP package, and UDF MP package does not need these jars. The only jars needed in UDF MP package are:

udfname-trino-thin.jar
udfname.jar

Tests cd transport ./gradlew clean build

manual test in a local Trino server.