tristaZero commented on a change in pull request #6366:
URL: https://github.com/apache/shardingsphere/pull/6366#discussion_r456189574
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/metadata/util/JdbcUtil.java
##########
@@ -36,7 +36,7 @@ public static String getSchema(final Connection connection,
final String databas
String result = null;
try {
if ("Oracle".equals(databaseType)) {
Review comment:
Hi ``
Maybe we can consider something like the following statement. I mean, we had
better avoid the comparison of the absolute characters, like `"Oracle"`.
> connection.getMetaData().getDatabaseProductName().equals(databaseType).
It is not hard, could you give it a change?
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/test/java/org/apache/shardingsphere/sql/parser/binder/metadata/table/SchemaMetaDataLoaderTest.java
##########
@@ -0,0 +1,108 @@
+package org.apache.shardingsphere.sql.parser.binder.metadata.table;
+
+import
org.apache.shardingsphere.sql.parser.binder.metadata.schema.SchemaMetaDataLoader;
+import org.junit.Test;
+
+import javax.sql.DataSource;
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.LinkedList;
+import java.util.logging.Logger;
+
+public final class SchemaMetaDataLoaderTest {
+ private static int minIdleCount = 3;
+ private static int maxIdleCount = 10;
+ private static int currentIdleCount = 0;
+ private static final LinkedList<Connection> connectionsPool = new
LinkedList<Connection>();
+
+ @Test
+ public void assertloadAllTableNamesForOracle() throws SQLException {
+ System.out.println("Start...");
+ LiteDatasource dataSource = new LiteDatasource();
+ SchemaMetaDataLoader.load(dataSource,5,"Oracle");
+ }
+
+ class LiteDatasource implements DataSource{
+ private String url = "jdbc:oracle:thin:@192.168.1.1:1521/orcl";
Review comment:
Hi, Please firstly look at the CI test, which showed there is something
wrong with your PR. I presume it is about check style here.
Besides, I hope there is no Oracle database instance required for your unit
test. Otherwise, It is supposed to be removed.
I know those comments may frustrate you somehow, but what you did is
entirely open to the whole community. I believe you also want to be a
significant part of this community as well, don't you?
If you need any help, please contact me. :-)
Best,
Trista
I am sorry
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]