You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "WencongLiu (via GitHub)" <gi...@apache.org> on 2023/04/14 03:56:59 UTC

[GitHub] [flink-connector-jdbc] WencongLiu opened a new pull request, #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

WencongLiu opened a new pull request, #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40

   _Remove the dependency on flink-shaded guava for flink-connector-jdbc._


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] zentol commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170185262


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   But you have to set up that relocation in the shade-plugin.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1174537463


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   cc @MartijnVisser 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1176297094


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   Done. I've remove all guava dependencies in this repo. 😊 @MartijnVisser 



##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   Done. I've removed all guava dependencies in this repo. 😊 @MartijnVisser 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] zentol commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170188117


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   Please also consider just not using guava; it seems we're using it in a very limited way that is easily replicated by either re-writing the code or copying a few methods.



##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   ~~But you have to set up that relocation in the shade-plugin.~~



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] zentol commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170188117


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   Please also consider just not using guava; it seems we're using it in a very limited way that is easily replicated (e.g., by copying a few methods).



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170177527


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   I think this import sentence will be replaced by `org.apache.flink.connector.jdbc.shaded.guava30` after being packaged by maven. Then other java projects which depend on jdbc-connector can import org.apache.flink.connector.jdbc.shaded.guava30. The logic is same with  [PR](https://github.com/apache/flink-connector-cassandra/pull/7) . WDYT? @MartijnVisser 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] zentol commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170193985


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   Like, `Lists.newArrayList` could just be replaced with `Arrays.asList`, whereas the ImmutableMap can be easily replaced by building a hashmap and wrapping it in Collections.unmodifiableMap.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] boring-cyborg[bot] commented on pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#issuecomment-1507890242

   Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] zentol commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170185262


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   ~~But you have to set up that relocation in the shade-plugin.~~
   
   The shading is correct.



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] MartijnVisser merged pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser merged PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1176132652


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   @MartijnVisser, Could you please review this pull request again ? πŸ˜ƒ



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1174537463


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   cc @MartijnVisser @zentol 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1174537463


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   cc @MartijnVisser @zentol 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170763515


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   Thanks for the replyπŸ˜ƒ .I think your idea is right: not using Guava directly is one approach. Although Guava is currently not widely used in the repo, it cannot be ruled out that Guava will not be used in the future. In any case, I think both approaches are feasible. If you can reach a consensus on your views, I will implement it according to your views. @MartijnVisser @zentol 



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] boring-cyborg[bot] commented on pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#issuecomment-1521895137

   Awesome work, congrats on your first merged pull request!
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#issuecomment-1508112898

   @MartijnVisser Thanks for your review 😊.
   
   > Shaded used 30, you're including 19
   
   the version has been updated.
   
   > we need to make sure that the added Guava dependency is shaded specifically for the Flink JDBC connector.:
   
   Do you mean we need to shade some class of the Guava dependency in the pom? Currently there is shade plugin but nothing is shaded.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] MartijnVisser commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1170164882


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   This means that we're still directly depending on Guava, not on a shaded version of Guava



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] MartijnVisser commented on a diff in pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser commented on code in PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#discussion_r1176273548


##########
flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/utils/JdbcTypeUtil.java:
##########
@@ -26,7 +26,7 @@
 import org.apache.flink.api.java.typeutils.ObjectArrayTypeInfo;
 import org.apache.flink.table.types.logical.LogicalTypeRoot;
 
-import org.apache.flink.shaded.guava30.com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap;

Review Comment:
   > Although Guava is currently not widely used in the repo, it cannot be ruled out that Guava will not be used in the future.
   
   I would prefer @zentol his approach. If we need Guava in the future, then let's introduce Guava in the future and remove it right now



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] MartijnVisser commented on pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "MartijnVisser (via GitHub)" <gi...@apache.org>.
MartijnVisser commented on PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#issuecomment-1509098543

   > Do you mean we need to shade some class of the Guava dependency in the pom? Currently there is a shade plugin but nothing is shaded.
   
   Yes indeed. So that it's not `import com.google.common.collect.ImmutableMap;` but something like `import org.apache.flink.connector.jdbc.shaded.guava30.com.google.common.collect.ImmutableMap;`


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink-connector-jdbc] WencongLiu commented on pull request #40: [FLINK-31793] remove dependency on flink-shaded guava for flink-connector-jdbc

Posted by "WencongLiu (via GitHub)" <gi...@apache.org>.
WencongLiu commented on PR #40:
URL: https://github.com/apache/flink-connector-jdbc/pull/40#issuecomment-1510169834

   Done. Thanks for your review! @MartijnVisser 


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org