RocMarshal commented on code in PR #189:
URL: 
https://github.com/apache/flink-connector-jdbc/pull/189#discussion_r3070820816


##########
flink-connector-jdbc-postgres/src/test/java/org/apache/flink/connector/jdbc/postgres/database/catalog/PostgresCatalogTestBase.java:
##########
@@ -439,4 +465,33 @@ public static TestTable getNullUuidTable() {
                 "id INT, " + "uid_col UUID",
                 "1, NULL");
     }
+
+    public static String transformPGJsonb(String json) {
+        return json.replaceAll(":", ": ").replaceAll(",", ", ");
+    }
+
+    public static TestTable getJsonTable() throws JsonProcessingException {
+        ObjectMapper mapper = new ObjectMapper();
+        JsonNode jsonNode =
+                mapper.readTree(
+                        
"\"test1\":{\"test1-1\":\"testValue\",\"test1-2\":1,\"test1-3\":[\"test1-3-1\",\"test1-3-2\"]},
 2, \"test2\"");
+
+        return new TestTable(
+                Schema.newBuilder().column("json_col", 
DataTypes.STRING()).build(),
+                "json_col JSON",
+                String.format("'%s'", jsonNode.toString()));
+    }
+
+    public static TestTable getJsonbTable() throws JsonProcessingException {

Review Comment:
   ```suggestion
       static TestTable getJsonbTable() throws JsonProcessingException {
   ```



##########
flink-connector-jdbc-postgres/src/test/java/org/apache/flink/connector/jdbc/postgres/database/catalog/PostgresCatalogTestBase.java:
##########
@@ -439,4 +465,33 @@ public static TestTable getNullUuidTable() {
                 "id INT, " + "uid_col UUID",
                 "1, NULL");
     }
+
+    public static String transformPGJsonb(String json) {
+        return json.replaceAll(":", ": ").replaceAll(",", ", ");
+    }
+
+    public static TestTable getJsonTable() throws JsonProcessingException {

Review Comment:
   ```suggestion
       static TestTable getJsonTable() throws JsonProcessingException {
   ```



##########
flink-connector-jdbc-postgres/src/test/java/org/apache/flink/connector/jdbc/postgres/database/catalog/PostgresCatalogTestBase.java:
##########
@@ -439,4 +465,33 @@ public static TestTable getNullUuidTable() {
                 "id INT, " + "uid_col UUID",
                 "1, NULL");
     }
+
+    public static String transformPGJsonb(String json) {

Review Comment:
   ```suggestion
       static String transformPGJsonb(String json) {
   ```
   
   Could the method be removed into `PostgresCatalogITCase`?
   Because it's used by `PostgresCatalogITCase` only.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to