You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Lifu12 (via GitHub)" <gi...@apache.org> on 2023/07/20 05:25:09 UTC
[GitHub] [seatunnel] Lifu12 opened a new pull request, #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible wit…
Lifu12 opened a new pull request, #5120:
URL: https://github.com/apache/seatunnel/pull/5120
https://github.com/apache/seatunnel/issues/5110
…h CDC
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
## Purpose of this pull request
<!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
## Check list
* [ ] Code changed are covered with tests, or it does not need tests for reason:
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If you are contributing the connector code, please check that the following files are updated:
1. Update change log that in connector document. For more details you can refer to [connector-v2](https://github.com/apache/seatunnel/tree/dev/docs/en/connector-v2)
2. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
3. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
* [ ] Update the [`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Lifu12 commented on a diff in pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Lifu12 (via GitHub)" <gi...@apache.org>.
Lifu12 commented on code in PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#discussion_r1270298018
##########
seatunnel-connectors-v2/connector-jdbc/src/test/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/PostgresDialectFactoryTest.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect;
+
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.psql.PostgresDialectFactory;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.Optional;
+
+public class PostgresDialectFactoryTest {
+
+ @Test
+ public void testPostgresDialectCreate() {
+ PostgresDialectFactory postgresDialectFactory = new PostgresDialectFactory();
+ JdbcDialect postgresLow = postgresDialectFactory.create("postgresLow");
+ String[] fields = {"id", "name", "age"};
+ String[] uniqueKeyField = {"id"};
+ Optional<String> upsertStatement =
+ postgresLow.getUpsertStatement("test", "test_a", fields, uniqueKeyField);
+ System.out.println(upsertStatement);
Review Comment:
ok
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Hisoka-X commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643647231
cc @ic4y @hailin0
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Lifu12 commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Lifu12 (via GitHub)" <gi...@apache.org>.
Lifu12 commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1645214200
@Hisoka-X
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] TaoZex commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible wit…
Posted by "TaoZex (via GitHub)" <gi...@apache.org>.
TaoZex commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643318213
Thanks for your contribution. It would be better if you changed the title of this pr. Is there any mention of this in the PostgreSQL documentation?
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Lifu12 commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible wit…
Posted by "Lifu12 (via GitHub)" <gi...@apache.org>.
Lifu12 commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643416667
PostgreSql 9.5 version document https://www.postgresql.org/about/press/presskit95/ru/ mention
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Hisoka-X commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643645529
Can you add test case for this feature? Thanks
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Hisoka-X commented on a diff in pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on code in PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#discussion_r1270283067
##########
seatunnel-connectors-v2/connector-jdbc/src/test/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/PostgresDialectFactoryTest.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect;
+
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.psql.PostgresDialectFactory;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.Optional;
+
+public class PostgresDialectFactoryTest {
+
+ @Test
+ public void testPostgresDialectCreate() {
+ PostgresDialectFactory postgresDialectFactory = new PostgresDialectFactory();
+ JdbcDialect postgresLow = postgresDialectFactory.create("postgresLow");
+ String[] fields = {"id", "name", "age"};
+ String[] uniqueKeyField = {"id"};
+ Optional<String> upsertStatement =
+ postgresLow.getUpsertStatement("test", "test_a", fields, uniqueKeyField);
+ System.out.println(upsertStatement);
Review Comment:
Please use `assert`, not only print
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] TaoZex commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "TaoZex (via GitHub)" <gi...@apache.org>.
TaoZex commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643748982
Please fix code style. Refer : https://github.com/apache/seatunnel/blob/02114db626a290502d33797dfbe9a11ee5b52b6f/docs/en/contribution/coding-guide.md
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Lifu12 commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Lifu12 (via GitHub)" <gi...@apache.org>.
Lifu12 commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643899289
use mvn spotless:apply format code success,
add doc
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Lifu12 commented on pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Lifu12 (via GitHub)" <gi...@apache.org>.
Lifu12 commented on PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120#issuecomment-1643897044
update success
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] Hisoka-X merged pull request #5120: [Bug] [connector-v2] PostgreSQL versions below 9.5 are compatible use cdc sync problem
Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X merged PR #5120:
URL: https://github.com/apache/seatunnel/pull/5120
--
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: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org