You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/09/09 15:07:29 UTC

[GitHub] [shardingsphere] xbkaishui opened a new pull request #7367: Support oracle connect descriptor url see:https://docs.oracle.com/en/…

xbkaishui opened a new pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367


   Fixes #7195 
   
   Changes proposed in this pull request:
   - support oracle rac (connect descriptor url style) see [detail](https://docs.oracle.com/en/database/oracle/oracle-database/18/netag/identifying-and-accessing-database.html#GUID-2BDF9E52-4147-4F46-84E2-A5AE1018A373)
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-691032041






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486026155



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;
+    private String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."

Review comment:
       Could we merge two of the patterns?

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;

Review comment:
       Why did you remove the `final`?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] xbkaishui commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486033062



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;
+    private String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."

Review comment:
       hard be, this is refer to oracle JDBC driver's implementation 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-691032041


   Very appreciated your continued work. @xbkaishui Your contribution is exactly an important part of this community!
   Have a lovely weekend. 😉 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486742265



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);

Review comment:
       Hi, why did you rename it as `thinUrlPattern`? Did you quote it somewhere?

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);

Review comment:
       Hi, why did you rename it as `thinUrlPattern`? Did you quote it somewhere?

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls edited a comment on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-689656229


   ## Pull Request Test Coverage Report for [Build 14650](https://coveralls.io/builds/33361286)
   
   * **11** of **11**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
   * **7347** unchanged lines in **44** files lost coverage.
   * Overall coverage decreased (**-0.02%**) to **34.092%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/config/YamlReplicaRuleConfiguration.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-features%2Fshardingsphere-replica%2Fshardingsphere-replica-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Freplica%2Fyaml%2Fconfig%2FYamlReplicaRuleConfiguration.java#L40) | 1 | 66.67% |
   | [shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecuteGroupEngine.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-infra%2Fshardingsphere-infra-executor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fexecutor%2Fsql%2Fgroup%2FAbstractExecuteGroupEngine.java#L81) | 1 | 90.91% |
   | [shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-infra%2Fshardingsphere-infra-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Froute%2Fcontext%2FRouteContext.java#L76) | 1 | 88.89% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandler.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fsctl%2Fexplain%2FShardingCTLExplainBackendHandler.java#L57) | 1 | 95.0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/statement/SQLStatementContext.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2Fstatement%2FSQLStatementContext.java#L51) | 1 | 0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/sqlserver/dcl/SQLServerDenyUserStatement.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fdialect%2Fstatement%2Fsqlserver%2Fdcl%2FSQLServerDenyUserStatement.java#L32) | 1 | 0% |
   | [shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/rule/ReplicaRule.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-features%2Fshardingsphere-replica%2Fshardingsphere-replica-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Freplica%2Frule%2FReplicaRule.java#L52) | 2 | 88.89% |
   | [shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContext.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-infra%2Fshardingsphere-infra-executor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fexecutor%2Fsql%2Fcontext%2FExecutionContext.java#L42) | 2 | 0% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandler.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fadmin%2FBroadcastBackendHandler.java#L59) | 2 | 77.78% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandler.java](https://coveralls.io/builds/33361286/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fadmin%2FUseDatabaseBackendHandler.java#L61) | 2 | 77.78% |
   <!-- | **Total:** | **7347** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/33361286/badge)](https://coveralls.io/builds/33361286) |
   | :-- | --: |
   | Change from base [Build 14620](https://coveralls.io/builds/33334007): |  -0.02% |
   | Covered Lines: | 35469 |
   | Relevant Lines: | 104038 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486750589



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] xbkaishui commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486336047



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;
+    private String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."

Review comment:
       done

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;

Review comment:
       done




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls edited a comment on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-689656229


   ## Pull Request Test Coverage Report for [Build 14680](https://coveralls.io/builds/33382106)
   
   * **17** of **17**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
   * **7376** unchanged lines in **48** files lost coverage.
   * Overall coverage increased (+**0.02%**) to **34.133%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/config/YamlReplicaRuleConfiguration.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-features%2Fshardingsphere-replica%2Fshardingsphere-replica-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Freplica%2Fyaml%2Fconfig%2FYamlReplicaRuleConfiguration.java#L40) | 1 | 66.67% |
   | [shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecuteGroupEngine.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-infra%2Fshardingsphere-infra-executor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fexecutor%2Fsql%2Fgroup%2FAbstractExecuteGroupEngine.java#L81) | 1 | 90.91% |
   | [shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-infra%2Fshardingsphere-infra-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Froute%2Fcontext%2FRouteContext.java#L76) | 1 | 88.89% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandler.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fsctl%2Fexplain%2FShardingCTLExplainBackendHandler.java#L57) | 1 | 95.0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/statement/SQLStatementContext.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2Fstatement%2FSQLStatementContext.java#L51) | 1 | 0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/sqlserver/dcl/SQLServerDenyUserStatement.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fdialect%2Fstatement%2Fsqlserver%2Fdcl%2FSQLServerDenyUserStatement.java#L32) | 1 | 0% |
   | [shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/rule/ReplicaRule.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-features%2Fshardingsphere-replica%2Fshardingsphere-replica-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Freplica%2Frule%2FReplicaRule.java#L52) | 2 | 88.89% |
   | [shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContext.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-infra%2Fshardingsphere-infra-executor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fexecutor%2Fsql%2Fcontext%2FExecutionContext.java#L42) | 2 | 0% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandler.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fadmin%2FBroadcastBackendHandler.java#L59) | 2 | 77.78% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandler.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fadmin%2FUseDatabaseBackendHandler.java#L61) | 2 | 77.78% |
   <!-- | **Total:** | **7376** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/33382106/badge)](https://coveralls.io/builds/33382106) |
   | :-- | --: |
   | Change from base [Build 14620](https://coveralls.io/builds/33334007): |  0.02% |
   | Covered Lines: | 35533 |
   | Relevant Lines: | 104101 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-691032041


   Very appreciated your continued work. @xbkaishui Your contribution is exactly an important part of this community!
   Have a lovely weekend. 😉 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-691032041






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls edited a comment on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-689656229






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486742265



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);

Review comment:
       Hi, why did you rename it as `thinUrlPattern`? Did you quote it somewhere?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486750589



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -41,12 +41,23 @@
     
     private final String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."
+            + "((2(5[0-5]|[0-4]\\d))|[0-1]?\\d{1,2})){3}).*PORT\\s*=\\s*(\\d+).*SERVICE_NAME\\s*=\\s*(\\w+)\\)");
     
     public OracleDataSourceMetaData(final String url, final String username) {
-        Matcher matcher = pattern.matcher(url);
+        Matcher matcher = thinUrlPattern.matcher(url);
         if (!matcher.find()) {
-            throw new UnrecognizedDatabaseURLException(url, pattern.pattern());
+            matcher = connectDescriptorUrlPattern.matcher(url);
+            if (!matcher.find()) {
+                throw new UnrecognizedDatabaseURLException(url, connectDescriptorUrlPattern.pattern());

Review comment:
       It seems not so concise. How about this programing clip?
   ```java
   Collection<Matcher> matchers;
   for each `matchers`
   if each.find() {
   }
   end
   throw new Exception
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls edited a comment on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-689656229






----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] xbkaishui commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486033519



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;

Review comment:
       it is used in method matchWithConnectDescriptorPattern, which is not in constructor method




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls edited a comment on pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#issuecomment-689656229


   ## Pull Request Test Coverage Report for [Build 14680](https://coveralls.io/builds/33382106)
   
   * **17** of **17**   **(100.0%)**  changed or added relevant lines in **1** file are covered.
   * **7376** unchanged lines in **48** files lost coverage.
   * Overall coverage increased (+**0.02%**) to **34.133%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/yaml/config/YamlReplicaRuleConfiguration.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-features%2Fshardingsphere-replica%2Fshardingsphere-replica-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Freplica%2Fyaml%2Fconfig%2FYamlReplicaRuleConfiguration.java#L40) | 1 | 66.67% |
   | [shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/group/AbstractExecuteGroupEngine.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-infra%2Fshardingsphere-infra-executor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fexecutor%2Fsql%2Fgroup%2FAbstractExecuteGroupEngine.java#L81) | 1 | 90.91% |
   | [shardingsphere-infra/shardingsphere-infra-route/src/main/java/org/apache/shardingsphere/infra/route/context/RouteContext.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-infra%2Fshardingsphere-infra-route%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Froute%2Fcontext%2FRouteContext.java#L76) | 1 | 88.89% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/sctl/explain/ShardingCTLExplainBackendHandler.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fsctl%2Fexplain%2FShardingCTLExplainBackendHandler.java#L57) | 1 | 95.0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/statement/SQLStatementContext.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-binder%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fbinder%2Fstatement%2FSQLStatementContext.java#L51) | 1 | 0% |
   | [shardingsphere-sql-parser/shardingsphere-sql-parser-statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/dialect/statement/sqlserver/dcl/SQLServerDenyUserStatement.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-sql-parser%2Fshardingsphere-sql-parser-statement%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fsql%2Fparser%2Fsql%2Fdialect%2Fstatement%2Fsqlserver%2Fdcl%2FSQLServerDenyUserStatement.java#L32) | 1 | 0% |
   | [shardingsphere-features/shardingsphere-replica/shardingsphere-replica-common/src/main/java/org/apache/shardingsphere/replica/rule/ReplicaRule.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-features%2Fshardingsphere-replica%2Fshardingsphere-replica-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Freplica%2Frule%2FReplicaRule.java#L52) | 2 | 88.89% |
   | [shardingsphere-infra/shardingsphere-infra-executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/context/ExecutionContext.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-infra%2Fshardingsphere-infra-executor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Finfra%2Fexecutor%2Fsql%2Fcontext%2FExecutionContext.java#L42) | 2 | 0% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/BroadcastBackendHandler.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fadmin%2FBroadcastBackendHandler.java#L59) | 2 | 77.78% |
   | [shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/admin/UseDatabaseBackendHandler.java](https://coveralls.io/builds/33382106/source?filename=shardingsphere-proxy%2Fshardingsphere-proxy-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fproxy%2Fbackend%2Ftext%2Fadmin%2FUseDatabaseBackendHandler.java#L61) | 2 | 77.78% |
   <!-- | **Total:** | **7376** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/33382106/badge)](https://coveralls.io/builds/33382106) |
   | :-- | --: |
   | Change from base [Build 14620](https://coveralls.io/builds/33334007): |  0.02% |
   | Covered Lines: | 35533 |
   | Relevant Lines: | 104101 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] xbkaishui commented on a change in pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
xbkaishui commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486033744



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;
+    private String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."

Review comment:
       As you know. those are totally different, those have different patterns and different group counts




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero merged pull request #7367: Support oracle connect descriptor url

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367


   


----------------------------------------------------------------
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:
users@infra.apache.org