You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "wunan1210 (via GitHub)" <gi...@apache.org> on 2023/06/25 09:04:10 UTC

[GitHub] [seatunnel] wunan1210 opened a new pull request, #4972: [Improve][Connector-V2][Mongodb]allow null value fields

wunan1210 opened a new pull request, #4972:
URL: https://github.com/apache/seatunnel/pull/4972

   <!--
   
   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.
   
   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] wunan1210 commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "wunan1210 (via GitHub)" <gi...@apache.org>.
wunan1210 commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1608556805

   > 
   
   
   
   > Example:https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-mongodb-e2e
   
   would you please tell me how to run e2e locally? error happened when using ` mvn test -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-mongodb-e2e -am -T 1C`
   
   ```
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  10.319 s (Wall Clock)
   [INFO] Finished at: 2023-06-27T09:10:49+08:00
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile (default-testCompile) on project seatunnel-config-shade: Compilation failure: Compilation failure: 
   [ERROR] /home/ubuntu/seatunnel/seatunnel-config/seatunnel-config-shade/src/test/java/org/apache/seatunnel/config/JsonFormatTest.java:[20,53] error: cannot find symbol
   [ERROR]   symbol:   class Config
   [ERROR]   location: package org.apache.seatunnel.shade.com.typesafe.config
   [ERROR] /home/ubuntu/seatunnel/seatunnel-config/seatunnel-config-shade/src/test/java/org/apache/seatunnel/config/JsonFormatTest.java:[21,53] error: cannot find symbol
   ```


-- 
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] MonsterChenzhuo commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "MonsterChenzhuo (via GitHub)" <gi...@apache.org>.
MonsterChenzhuo commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1607052649

   LGTM


-- 
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] liugddx commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1606602777

   @MonsterChenzhuo PTAL


-- 
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] EricJoy2048 commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1610635293

   > 
   
   I think you need run `./mvnw -U -T 1C clean install -DskipTests -D"maven.test.skip"=true -D"maven.javadoc.skip"=true -D"checkstyle.skip"=true -D"license.skipAddThirdParty"` first.


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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-2167719362

   @chl-wxp 


-- 
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] MonsterChenzhuo commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "MonsterChenzhuo (via GitHub)" <gi...@apache.org>.
MonsterChenzhuo commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1607065567

   Example:https://github.com/apache/incubator-seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-mongodb


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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-2219346260

   fixed by #6967


-- 
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] liugddx commented on a diff in pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#discussion_r1241134019


##########
seatunnel-connectors-v2/connector-mongodb/src/main/java/org/apache/seatunnel/connectors/seatunnel/mongodb/config/MongodbConfig.java:
##########
@@ -104,6 +104,12 @@ public class MongodbConfig {
                     .withDescription(
                             "By utilizing flatSyncString, only one field attribute value can be set, and the field type must be a String. This operation will perform a string mapping on a single MongoDB data entry.");
 
+    public static final Option<Boolean> ALLOW_NULL =
+            Options.key("allow-null")
+                    .booleanType()
+                    .defaultValue(false)
+                    .withDescription("allow null value when fields reading is null");
+
     // --------------------------------------------------------------------

Review Comment:
   Please describe this parameter in the documentation.
   https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/source/MongoDB.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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "Hisoka-X (via GitHub)" <gi...@apache.org>.
Hisoka-X closed pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields
URL: https://github.com/apache/seatunnel/pull/4972


-- 
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] ic4y commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1666454938

   "==> expected: <0> but was: <1>
   at org.apache.seatunnel.e2e.connector.v2.mongodb.MongodbIT.testMongodbNullValue(MongodbIT.java:149)
   
   Please fix the e2e issue.


-- 
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] liugddx commented on a diff in pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx commented on code in PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#discussion_r1241453030


##########
docs/en/connector-v2/source/MongoDB.md:
##########
@@ -85,6 +85,7 @@ Source Options
 | fetch.size           | Int     | No       | 2048             | Set the number of documents obtained from the server for each batch. Setting the appropriate batch size can improve query performance and avoid the memory pressure caused by obtaining a large amount of data at one time.                                                                                    |
 | max.time-min         | Long    | No       | 600              | This parameter is a MongoDB query option that limits the maximum execution time for query operations. The value of maxTimeMin is in Minute. If the execution time of the query exceeds the specified time limit, MongoDB will terminate the operation and return an error.                                     |
 | flat.sync-string     | Boolean | No       | true             | By utilizing flatSyncString, only one field attribute value can be set, and the field type must be a String. This operation will perform a string mapping on a single MongoDB data entry.                                                                                                                      |
+| allow-null           | Boolean | No       | false            | If set to true, exceptions will be ignored if a null value is encountered.                                                                                                                                                                                                                                     |

Review Comment:
   `allow.null` is better.



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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1797857824

   Hi, Are there any latest developments regarding this PR? At present, it has been at least two weeks without any new changes


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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "bulolo (via GitHub)" <gi...@apache.org>.
bulolo commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1879926207

   any process?


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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-2167719729

   @chl-wxp 


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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "FuYouJ (via GitHub)" <gi...@apache.org>.
FuYouJ commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-2216466796

   If this problem still exists, I will try to fix it


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


Re: [PR] [Improve][Connector-V2][Mongodb]allow null value fields [seatunnel]

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1780782962

   Please fix conflicts


-- 
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] MonsterChenzhuo commented on pull request #4972: [Improve][Connector-V2][Mongodb]allow null value fields

Posted by "MonsterChenzhuo (via GitHub)" <gi...@apache.org>.
MonsterChenzhuo commented on PR #4972:
URL: https://github.com/apache/seatunnel/pull/4972#issuecomment-1607063782

   Please add the corresponding e2e test.


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