Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improve][Connector-V2][Mongodb]allow null value fields #4972

Closed
wants to merge 24 commits into from

Conversation

wunan1210
Copy link

Purpose of this pull request

Check list

Comment on lines 107 to 113
public static final Option<Boolean> ALLOW_NULL =
Options.key("allow-null")
.booleanType()
.defaultValue(false)
.withDescription("allow null value when fields reading is null");

// --------------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -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. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow.null is better.

liugddx
liugddx previously approved these changes Jun 26, 2023
Copy link
Member

@liugddx liugddx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liugddx
Copy link
Member

liugddx commented Jun 26, 2023

@MonsterChenzhuo PTAL

@MonsterChenzhuo
Copy link
Contributor

Please add the corresponding e2e test.

@MonsterChenzhuo
Copy link
Contributor

MonsterChenzhuo commented Jun 26, 2023

@wunan1210
Copy link
Author

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

@EricJoy2048
Copy link
Member

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.

lightzhao and others added 16 commits July 5, 2023 16:11
Co-authored-by: wsstony <tonymao777@163.com>
Co-authored-by: lightzhao <zhaolianyong777@gmail.com>
…he#4964)

* [Improve][Connector-V2][Jindo-Oss] Optimize jindo-oss connector

* [Improve][Connector-V2][Jindo-Oss] Update module name

* [Hotfix][Connector-V2][StarRocks] Fix code style
… SQL Transform plugin (apache#4991)

Co-authored-by: mcy <rewrma@163.com>
Co-authored-by: chenqqq11 <chenzy15@ziroom.com>
@ic4y
Copy link
Contributor

ic4y commented Aug 5, 2023

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

Please fix the e2e issue.

@EricJoy2048
Copy link
Member

Please fix conflicts

@EricJoy2048
Copy link
Member

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

@bulolo
Copy link

bulolo commented Jan 7, 2024

any process?

@EricJoy2048
Copy link
Member

@chl-wxp

1 similar comment
@EricJoy2048
Copy link
Member

@chl-wxp

@FuYouJ
Copy link
Contributor

FuYouJ commented Jul 9, 2024

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

@Hisoka-X
Copy link
Member

fixed by #6967

@Hisoka-X Hisoka-X closed this Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.