You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/19 07:37:05 UTC
[GitHub] [flink] SteNicholas opened a new pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
SteNicholas opened a new pull request #14693:
URL: https://github.com/apache/flink/pull/14693
## What is the purpose of the change
*When `CanalJsonDeserializationSchema` deserializes the null field to be non-null, canal-json has a situation that -U and +U are equal. Because `deserializes` method has no distinction between null and empty field. `CanalJsonDeserializationSchema` distinguishes between null and empty field by field names through parsing `JsonNode`.*
## Brief change log
- *`CanalJsonDeserializationSchema` deserializes the record for distinguishing between null and empty field by field names with parsing `JsonNode`.*
## Verifying this change
- *Modify `canal-data-filter-table.txt` to build a test case which has a situation that canal-json has null and empty field in `old` field to verify the distinction between null and empty field.*
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
- The S3 file system connector: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no**)
- If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] SteNicholas commented on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-764594832
@wuchong , thanks for your detailed review. I have followed your comments. Please help to review 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
}, {
"hash" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228",
"triggerID" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 93d1e170043ced37964e3ace610762bc231d0ba6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
}, {
"hash" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 58b45f883dfd13a36efbf22b17a487fd28d94d90 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221)
* 93d1e170043ced37964e3ace610762bc231d0ba6 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
}, {
"hash" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228",
"triggerID" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"triggerType" : "PUSH"
}, {
"hash" : "5a0ef1e8ef927b234ce0917318f59552a249d833",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "5a0ef1e8ef927b234ce0917318f59552a249d833",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 93d1e170043ced37964e3ace610762bc231d0ba6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228)
* 5a0ef1e8ef927b234ce0917318f59552a249d833 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wuchong commented on a change in pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14693:
URL: https://github.com/apache/flink/pull/14693#discussion_r561709274
##########
File path: flink-formats/flink-json/src/test/resources/canal-data.txt
##########
@@ -1,5 +1,5 @@
{"data":[{"id":"101","name":"scooter","description":"Small 2-wheel scooter","weight":"3.14"},{"id":"102","name":"car battery","description":"12V car battery","weight":"8.1"},{"id":"103","name":"12-pack drill bits","description":"12-pack of drill bits with sizes ranging from #40 to #3","weight":"0.8"},{"id":"104","name":"hammer","description":"12oz carpenter's hammer","weight":"0.75"},{"id":"105","name":"hammer","description":"14oz carpenter's hammer","weight":"0.875"},{"id":"106","name":"hammer","description":"16oz carpenter's hammer","weight":"1.0"},{"id":"107","name":"rocks","description":"box of assorted rocks","weight":"5.3"},{"id":"108","name":"jacket","description":"water resistent black wind breaker","weight":"0.1"},{"id":"109","name":"spare tire","description":"24 inch spare tire","weight":"22.2"}],"database":"inventory","es":1589373515000,"id":3,"isDdl":false,"mysqlType":{"id":"INTEGER","name":"VARCHAR(255)","description":"VARCHAR(512)","weight":"FLOAT"},"old":null,"pkNames
":["id"],"sql":"","sqlType":{"id":4,"name":12,"description":12,"weight":7},"table":"products2","ts":1589373515477,"type":"INSERT"}
Review comment:
ditto.
##########
File path: flink-formats/flink-json/src/test/resources/canal-data-filter-table.txt
##########
@@ -1,5 +1,5 @@
{"data":[{"id":"101","name":"scooter","description":"Small 2-wheel scooter","weight":"3.14"},{"id":"102","name":"car battery","description":"12V car battery","weight":"8.1"},{"id":"103","name":"12-pack drill bits","description":"12-pack of drill bits with sizes ranging from #40 to #3","weight":"0.8"},{"id":"104","name":"hammer","description":"12oz carpenter's hammer","weight":"0.75"},{"id":"105","name":"hammer","description":"14oz carpenter's hammer","weight":"0.875"},{"id":"106","name":"hammer","description":"16oz carpenter's hammer","weight":"1.0"},{"id":"107","name":"rocks","description":"box of assorted rocks","weight":"5.3"},{"id":"108","name":"jacket","description":"water resistent black wind breaker","weight":"0.1"},{"id":"109","name":"spare tire","description":"24 inch spare tire","weight":"22.2"}],"database":"mydb","es":1598944132000,"id":1,"isDdl":false,"mysqlType":{"id":"int(11)","name":"varchar(255)","description":"varchar(512)","weight":"float"},"old":null,"pkNames":["i
d"],"sql":"","sqlType":{"id":4,"name":12,"description":12,"weight":7},"table":"product","ts":1598944146308,"type":"INSERT"}
Review comment:
```suggestion
{"data":[{"id":"101","name":"scooter","description":"Small 2-wheel scooter","weight":"3.14"},{"id":"102","name":"car battery","description":"12V car battery","weight":"8.1"},{"id":"103","name":"12-pack drill bits","description":"12-pack of drill bits with sizes ranging from #40 to #3","weight":"0.8"},{"id":"104","name":"hammer","description":"12oz carpenter's hammer","weight":"0.75"},{"id":"105","name":"hammer","description":"14oz carpenter's hammer","weight":"0.875"},{"id":"106","name":"hammer","description":null,"weight":"1.0"},{"id":"107","name":"rocks","description":"box of assorted rocks","weight":"5.3"},{"id":"108","name":"jacket","description":"water resistent black wind breaker","weight":"0.1"},{"id":"109","name":"spare tire","description":"24 inch spare tire","weight":"22.2"}],"database":"mydb","es":1598944132000,"id":1,"isDdl":false,"mysqlType":{"id":"int(11)","name":"varchar(255)","description":"varchar(512)","weight":"float"},"old":null,"pkNames":["id"],"sql":"","sqlTy
pe":{"id":4,"name":12,"description":12,"weight":7},"table":"product","ts":1598944146308,"type":"INSERT"}
```
I think you want to test the original `description` is null.
##########
File path: flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/canal/CanalJsonDeserializationSchema.java
##########
@@ -238,8 +244,9 @@ public void deserialize(@Nullable byte[] message, Collector<RowData> out) throws
// the underlying JSON deserialization schema always produce GenericRowData.
GenericRowData after = (GenericRowData) data.getRow(i, fieldCount);
GenericRowData before = (GenericRowData) old.getRow(i, fieldCount);
+ final JsonNode oldField = root.get(FIELD_OLD);
for (int f = 0; f < fieldCount; f++) {
- if (before.isNullAt(f)) {
+ if (before.isNullAt(f) && oldField.findValue(fieldNames.get(f)) == null) {
// not null fields in "old" (before) means the fields are changed
// null/empty fields in "old" (before) means the fields are not changed
Review comment:
```suggestion
// fields in "old" (before) means the fields are changed
// fields not in "old" (before) means the fields are not changed
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
}, {
"hash" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228",
"triggerID" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"triggerType" : "PUSH"
}, {
"hash" : "5a0ef1e8ef927b234ce0917318f59552a249d833",
"status" : "SUCCESS",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12329",
"triggerID" : "5a0ef1e8ef927b234ce0917318f59552a249d833",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 5a0ef1e8ef927b234ce0917318f59552a249d833 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12329)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] SteNicholas commented on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-764196958
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 58b45f883dfd13a36efbf22b17a487fd28d94d90 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 58b45f883dfd13a36efbf22b17a487fd28d94d90 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wuchong commented on a change in pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #14693:
URL: https://github.com/apache/flink/pull/14693#discussion_r561709274
##########
File path: flink-formats/flink-json/src/test/resources/canal-data.txt
##########
@@ -1,5 +1,5 @@
{"data":[{"id":"101","name":"scooter","description":"Small 2-wheel scooter","weight":"3.14"},{"id":"102","name":"car battery","description":"12V car battery","weight":"8.1"},{"id":"103","name":"12-pack drill bits","description":"12-pack of drill bits with sizes ranging from #40 to #3","weight":"0.8"},{"id":"104","name":"hammer","description":"12oz carpenter's hammer","weight":"0.75"},{"id":"105","name":"hammer","description":"14oz carpenter's hammer","weight":"0.875"},{"id":"106","name":"hammer","description":"16oz carpenter's hammer","weight":"1.0"},{"id":"107","name":"rocks","description":"box of assorted rocks","weight":"5.3"},{"id":"108","name":"jacket","description":"water resistent black wind breaker","weight":"0.1"},{"id":"109","name":"spare tire","description":"24 inch spare tire","weight":"22.2"}],"database":"inventory","es":1589373515000,"id":3,"isDdl":false,"mysqlType":{"id":"INTEGER","name":"VARCHAR(255)","description":"VARCHAR(512)","weight":"FLOAT"},"old":null,"pkNames
":["id"],"sql":"","sqlType":{"id":4,"name":12,"description":12,"weight":7},"table":"products2","ts":1589373515477,"type":"INSERT"}
Review comment:
ditto.
##########
File path: flink-formats/flink-json/src/test/resources/canal-data-filter-table.txt
##########
@@ -1,5 +1,5 @@
{"data":[{"id":"101","name":"scooter","description":"Small 2-wheel scooter","weight":"3.14"},{"id":"102","name":"car battery","description":"12V car battery","weight":"8.1"},{"id":"103","name":"12-pack drill bits","description":"12-pack of drill bits with sizes ranging from #40 to #3","weight":"0.8"},{"id":"104","name":"hammer","description":"12oz carpenter's hammer","weight":"0.75"},{"id":"105","name":"hammer","description":"14oz carpenter's hammer","weight":"0.875"},{"id":"106","name":"hammer","description":"16oz carpenter's hammer","weight":"1.0"},{"id":"107","name":"rocks","description":"box of assorted rocks","weight":"5.3"},{"id":"108","name":"jacket","description":"water resistent black wind breaker","weight":"0.1"},{"id":"109","name":"spare tire","description":"24 inch spare tire","weight":"22.2"}],"database":"mydb","es":1598944132000,"id":1,"isDdl":false,"mysqlType":{"id":"int(11)","name":"varchar(255)","description":"varchar(512)","weight":"float"},"old":null,"pkNames":["i
d"],"sql":"","sqlType":{"id":4,"name":12,"description":12,"weight":7},"table":"product","ts":1598944146308,"type":"INSERT"}
Review comment:
```suggestion
{"data":[{"id":"101","name":"scooter","description":"Small 2-wheel scooter","weight":"3.14"},{"id":"102","name":"car battery","description":"12V car battery","weight":"8.1"},{"id":"103","name":"12-pack drill bits","description":"12-pack of drill bits with sizes ranging from #40 to #3","weight":"0.8"},{"id":"104","name":"hammer","description":"12oz carpenter's hammer","weight":"0.75"},{"id":"105","name":"hammer","description":"14oz carpenter's hammer","weight":"0.875"},{"id":"106","name":"hammer","description":null,"weight":"1.0"},{"id":"107","name":"rocks","description":"box of assorted rocks","weight":"5.3"},{"id":"108","name":"jacket","description":"water resistent black wind breaker","weight":"0.1"},{"id":"109","name":"spare tire","description":"24 inch spare tire","weight":"22.2"}],"database":"mydb","es":1598944132000,"id":1,"isDdl":false,"mysqlType":{"id":"int(11)","name":"varchar(255)","description":"varchar(512)","weight":"float"},"old":null,"pkNames":["id"],"sql":"","sqlTy
pe":{"id":4,"name":12,"description":12,"weight":7},"table":"product","ts":1598944146308,"type":"INSERT"}
```
I think you want to test the original `description` is null.
##########
File path: flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/canal/CanalJsonDeserializationSchema.java
##########
@@ -238,8 +244,9 @@ public void deserialize(@Nullable byte[] message, Collector<RowData> out) throws
// the underlying JSON deserialization schema always produce GenericRowData.
GenericRowData after = (GenericRowData) data.getRow(i, fieldCount);
GenericRowData before = (GenericRowData) old.getRow(i, fieldCount);
+ final JsonNode oldField = root.get(FIELD_OLD);
for (int f = 0; f < fieldCount; f++) {
- if (before.isNullAt(f)) {
+ if (before.isNullAt(f) && oldField.findValue(fieldNames.get(f)) == null) {
// not null fields in "old" (before) means the fields are changed
// null/empty fields in "old" (before) means the fields are not changed
Review comment:
```suggestion
// fields in "old" (before) means the fields are changed
// fields not in "old" (before) means the fields are not changed
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 58b45f883dfd13a36efbf22b17a487fd28d94d90 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762660520
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 5a0ef1e8ef927b234ce0917318f59552a249d833 (Fri May 28 07:12:04 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</details>
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
}, {
"hash" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228",
"triggerID" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 58b45f883dfd13a36efbf22b17a487fd28d94d90 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221)
* 93d1e170043ced37964e3ace610762bc231d0ba6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot commented on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762660520
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 58b45f883dfd13a36efbf22b17a487fd28d94d90 (Tue Jan 19 07:39:02 UTC 2021)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] SteNicholas commented on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-764196958
@wuchong , could you please help to review this simple pull request if you are available?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] wuchong merged pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #14693:
URL: https://github.com/apache/flink/pull/14693
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [flink] flinkbot edited a comment on pull request #14693: [FLINK-19446][canal][json] canal-json has a situation that -U and +U are equal, when updating the null field to be non-null
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14693:
URL: https://github.com/apache/flink/pull/14693#issuecomment-762669697
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12221",
"triggerID" : "58b45f883dfd13a36efbf22b17a487fd28d94d90",
"triggerType" : "PUSH"
}, {
"hash" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228",
"triggerID" : "93d1e170043ced37964e3ace610762bc231d0ba6",
"triggerType" : "PUSH"
}, {
"hash" : "5a0ef1e8ef927b234ce0917318f59552a249d833",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12329",
"triggerID" : "5a0ef1e8ef927b234ce0917318f59552a249d833",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 93d1e170043ced37964e3ace610762bc231d0ba6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12228)
* 5a0ef1e8ef927b234ce0917318f59552a249d833 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12329)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org