-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[fix](statistics) correct update rows when doing multi-table load #35474
Conversation
rows of only one table is updated correctly, need to merge all table commit infos.
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 41574 ms
|
TPC-DS: Total hot run time: 171552 ms
|
ClickBench: Total hot run time: 30.63 s
|
orgSet.addAll(newSet); | ||
return orgSet; | ||
}); | ||
beIdToBaseTabletIds.putIfAbsent(beId, newSet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is line 311 necessary?
The lib says that for computeIfPresent
If the specified key is not already associated with a value (or is mapped to null), attempts to compute its value using the given mapping function and enters it into this map unless null.
If the function returns null no mapping is recorded. If the function itself throws an (unchecked) exception, the exception is rethrown, and no mapping is recorded. The most common usage is to construct a new object serving as an initial mapped value or memoized result, as in:
map.computeIfAbsent(key, k -> new Value(f(k)));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default V computeIfPresent(K key,
BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
Objects.requireNonNull(remappingFunction);
V oldValue;
if ((oldValue = get(key)) != null) {
V newValue = remappingFunction.apply(key, oldValue);
if (newValue != null) {
put(key, newValue);
return newValue;
} else {
remove(key);
return null;
}
} else {
return null;
}
}
Look at the outer else branch, it seems like we need to keep line 311. Because it doesn't put new value to the map when the key doesn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
orgSet.addAll(newSet); | ||
return orgSet; | ||
}); | ||
beIdToBaseTabletIds.putIfAbsent(beId, newSet); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default V computeIfPresent(K key,
BiFunction<? super K, ? super V, ? extends V> remappingFunction) {
Objects.requireNonNull(remappingFunction);
V oldValue;
if ((oldValue = get(key)) != null) {
V newValue = remappingFunction.apply(key, oldValue);
if (newValue != null) {
put(key, newValue);
return newValue;
} else {
remove(key);
return null;
}
} else {
return null;
}
}
Look at the outer else branch, it seems like we need to keep line 311. Because it doesn't put new value to the map when the key doesn't exist.
PR approved by at least one committer and no changes requested. |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
1 similar comment
PR approved by anyone and no changes requested. |
…5474) rows of only one table is updated correctly, need to merge all table commit infos. ## Proposed changes Issue Number: close #xxx <!--Describe your changes.--> ## Further comments If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
rows of only one table is updated correctly, need to merge all table commit infos.
Proposed changes
Issue Number: close #xxx
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...