-
Notifications
You must be signed in to change notification settings - Fork 409
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
[#3630] feat(trino-connector): Support insert and select operation on Gravitino catalog #3631
[#3630] feat(trino-connector): Support insert and select operation on Gravitino catalog #3631
Conversation
"https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.26/mysql-connector-java-8.0.26.jar"; | ||
|
||
private static final String DOWNLOAD_POSTGRESQL_JDBC_DRIVER_URL = | ||
"https://jdbc.postgresql.org/download/postgresql-42.7.0.jar"; |
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.
why don't we need this before?
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'm not sure at the moment. I disable the tester of TrinoConnectorIT
.
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.
what's the bug directory means?
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.
The EXPLAIN command cannot show the scanner details about query optimization. I will debug the problem.
integration-test/trino-it/init/trino/config/catalog/gravitino.properties
Outdated
Show resolved
Hide resolved
...-connector/src/main/java/com/datastrato/gravitino/trino/connector/GravitinoColumnHandle.java
Outdated
Show resolved
Hide resolved
...ion-test-common/src/test/java/com/datastrato/gravitino/integration/test/util/AbstractIT.java
Outdated
Show resolved
Hide resolved
JdbcDriverDownloader.downloadJdbcDriver(DOWNLOAD_JDBC_DRIVER_URL, tmpPath.toString()); | ||
Path tmpPath = Paths.get(gravitinoHome, relativeDeployLibsPath); | ||
JdbcDriverDownloader.downloadJdbcDriver(DOWNLOAD_MYSQL_JDBC_DRIVER_URL, tmpPath.toString()); | ||
JdbcDriverDownloader.downloadJdbcDriver( |
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.
You should remove other download actions in the sub-classes
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.
Ok
import org.junit.jupiter.api.Test; | ||
|
||
@Disabled |
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.
why disable this test? please add a todo comment or open a new issue to track this
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.
It's not work now. i will fix later
@@ -92,24 +93,36 @@ public static GravitinoConnectorPluginManager instance(ClassLoader classLoader) | |||
} | |||
synchronized (GravitinoConnectorPluginManager.class) { | |||
if (instance == null) { | |||
if (!APP_CLASS_LOADER_NAME.equals(classLoader.getName())) { |
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.
Is the name AppClassLoader
app
?
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.
Yes
@@ -0,0 +1,48 @@ | |||
/* | |||
* Copyright 2023 Datastrato Pvt Ltd. |
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 check the version wholely
} | ||
} | ||
|
||
static TypeManager createTypeManger(ClassLoader classLoader) { |
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.
Manger -> Manager
|
||
objectMapper.registerModule(module); | ||
return objectMapper; | ||
} catch (Exception e) {; |
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.
;
objectMapper.registerModule(new RecordAutoDetectModule()); | ||
|
||
// Handle serialization for plugin classes | ||
registerHandleSerializationModule(objectMapper, classLoader); |
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.
Unused classloader
@@ -141,40 +155,40 @@ private void loadPlugin(String pluginPath, String pluginName) { | |||
"org.openjdk.jol.", | |||
"io.opentelemetry.api.", | |||
"io.opentelemetry.context.")); | |||
pluginClassLoaders.put(pluginName, (ClassLoader) pluginClassLoader); | |||
|
|||
ServiceLoader<Plugin> serviceLoader = |
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.
Why move this logic here? It's in the createConnector
before.
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.
Previously, the class only supported loading plugins from a directory, but in the test environment, we don't have a plugin directory. However, we can create a plugin immediately. Therefore, we have added a new interface, installPlugin(name, plugin)
, and then refactored the code to move the plugin loading from the createConnector
function.
…ion on Gravitino catalog (apache#3631) ### What changes were proposed in this pull request? 1. Support insert and select operation on Gravitino catalog 2. Support query optimize 3. Upgrade CI docker environment ### Why are the changes needed? Fix: apache#3630 ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? UT IT
…ion on Gravitino catalog (apache#3631) 1. Support insert and select operation on Gravitino catalog 2. Support query optimize 3. Upgrade CI docker environment Fix: apache#3630 NO UT IT
…ion on Gravitino catalog (apache#3631) 1. Support insert and select operation on Gravitino catalog 2. Support query optimize 3. Upgrade CI docker environment Fix: apache#3630 NO UT IT
…ion on Gravitino catalog (apache#3631) 1. Support insert and select operation on Gravitino catalog 2. Support query optimize 3. Upgrade CI docker environment Fix: apache#3630 NO UT IT
… Gravitino catalog (#3631) ### What changes were proposed in this pull request? 1. Support insert and select operation on Gravitino catalog 2. Support query optimize 3. Upgrade CI docker environment ### Why are the changes needed? Fix: #3630 ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? UT IT
…ion on Gravitino catalog (apache#3631) ### What changes were proposed in this pull request? 1. Support insert and select operation on Gravitino catalog 2. Support query optimize 3. Upgrade CI docker environment ### Why are the changes needed? Fix: apache#3630 ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? UT IT
What changes were proposed in this pull request?
Why are the changes needed?
Fix: #3630
Does this PR introduce any user-facing change?
NO
How was this patch tested?
UT IT