You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/07/21 07:11:51 UTC
[GitHub] [hudi] liujinhui1994 opened a new pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
liujinhui1994 opened a new pull request #3317:
URL: https://github.com/apache/hudi/pull/3317
## *Tips*
- *Thank you very much for contributing to Apache Hudi.*
- *Please review https://hudi.apache.org/contributing.html before opening a pull request.*
## What is the purpose of the pull request
OverwriteWithLatestAvroPayload.
When the orderingVal is the same, select the later data
## Brief change log
org.apache.hudi.common.model.OverwriteWithLatestAvroPayload.class
org.apache.hudi.common.model.TestOverwriteWithLatestAvroPayload.class
## Committer checklist
- [ ] Has a corresponding JIRA in PR title & commit
- [ ] Commit message is descriptive of the change
- [ ] CI is green
- [ ] Necessary doc changes done or have another open PR
- [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883959527
@wangxianghu please help review
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883950618
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070",
"triggerID" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"triggerType" : "PUSH"
}, {
"hash" : "1279f1e8d8fb04b2f3de55fda8010fdf4097178d",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1074",
"triggerID" : "1279f1e8d8fb04b2f3de55fda8010fdf4097178d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070)
* 1279f1e8d8fb04b2f3de55fda8010fdf4097178d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1074)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot 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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883950618
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"status" : "DELETED",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070",
"triggerID" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"triggerType" : "PUSH"
}, {
"hash" : "1279f1e8d8fb04b2f3de55fda8010fdf4097178d",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1074",
"triggerID" : "1279f1e8d8fb04b2f3de55fda8010fdf4097178d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 1279f1e8d8fb04b2f3de55fda8010fdf4097178d Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1074)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot 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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883950618
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070",
"triggerID" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot 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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] wangxianghu commented on a change in pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
wangxianghu commented on a change in pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#discussion_r673783221
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java
##########
@@ -49,7 +49,7 @@ public OverwriteWithLatestAvroPayload(Option<GenericRecord> record) {
@Override
public OverwriteWithLatestAvroPayload preCombine(OverwriteWithLatestAvroPayload another) {
// pick the payload with greatest ordering value
- if (another.orderingVal.compareTo(orderingVal) > 0) {
+ if (another.orderingVal.compareTo(orderingVal) > 0 || another.orderingVal.compareTo(orderingVal) == 0) {
Review comment:
use `>= 0`
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot commented on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883950618
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot 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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883950618
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"status" : "PENDING",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070",
"triggerID" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot 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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on a change in pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#discussion_r673784231
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java
##########
@@ -49,7 +49,7 @@ public OverwriteWithLatestAvroPayload(Option<GenericRecord> record) {
@Override
public OverwriteWithLatestAvroPayload preCombine(OverwriteWithLatestAvroPayload another) {
// pick the payload with greatest ordering value
- if (another.orderingVal.compareTo(orderingVal) > 0) {
+ if (another.orderingVal.compareTo(orderingVal) > 0 || another.orderingVal.compareTo(orderingVal) == 0) {
Review comment:
hahah,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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
danny0405 commented on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-884051312
I actually have a similar PR https://github.com/apache/hudi/pull/3267 but have no time to finish it yet, you can take 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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] danny0405 commented on a change in pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#discussion_r673824944
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java
##########
@@ -49,7 +49,7 @@ public OverwriteWithLatestAvroPayload(Option<GenericRecord> record) {
@Override
public OverwriteWithLatestAvroPayload preCombine(OverwriteWithLatestAvroPayload another) {
// pick the payload with greatest ordering value
- if (another.orderingVal.compareTo(orderingVal) > 0) {
+ if (another.orderingVal.compareTo(orderingVal) >= 0) {
return another;
Review comment:
The original logic is actually right, because the passed in `another` is the old existing value.
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] hudi-bot edited a comment on pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#issuecomment-883950618
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070",
"triggerID" : "b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6",
"triggerType" : "PUSH"
}, {
"hash" : "1279f1e8d8fb04b2f3de55fda8010fdf4097178d",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "1279f1e8d8fb04b2f3de55fda8010fdf4097178d",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* b4fd6b64bb1d56a35b06f0dcc7e8a7b18710bbf6 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1070)
* 1279f1e8d8fb04b2f3de55fda8010fdf4097178d UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run travis` re-run the last Travis build
- `@hudi-bot 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.
To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 commented on a change in pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
liujinhui1994 commented on a change in pull request #3317:
URL: https://github.com/apache/hudi/pull/3317#discussion_r673833060
##########
File path: hudi-common/src/main/java/org/apache/hudi/common/model/OverwriteWithLatestAvroPayload.java
##########
@@ -49,7 +49,7 @@ public OverwriteWithLatestAvroPayload(Option<GenericRecord> record) {
@Override
public OverwriteWithLatestAvroPayload preCombine(OverwriteWithLatestAvroPayload another) {
// pick the payload with greatest ordering value
- if (another.orderingVal.compareTo(orderingVal) > 0) {
+ if (another.orderingVal.compareTo(orderingVal) >= 0) {
return another;
Review comment:
> I actually have a similar PR #3267 but have no time to finish it yet, you can take it.
OK, thanks I will close this PR
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [hudi] liujinhui1994 closed pull request #3317: [HUDI-2203] When the orderingVal is the same, take the latest one
Posted by GitBox <gi...@apache.org>.
liujinhui1994 closed pull request #3317:
URL: https://github.com/apache/hudi/pull/3317
--
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@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org