Skip to content

Commit 082fbaf

Browse files
dibakchcopybara-github
authored andcommitted
Make check for algorithm in Merge() backwards compatible
PiperOrigin-RevId: 817225028
1 parent c240793 commit 082fbaf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cc/algorithms/quantile-tree.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ class QuantileTree {
110110
}
111111

112112
absl::Status Merge(const BoundedQuantilesSummary& summary) {
113-
if (summary.algorithm() != BoundedQuantilesSummary::TREE) {
113+
if (summary.has_algorithm() &&
114+
summary.algorithm() != BoundedQuantilesSummary::TREE) {
114115
return absl::InternalError("Algorithm type mismatch. Expected TREE");
115116
}
116117
if (static_cast<double>(lower_) != summary.lower() ||

0 commit comments

Comments
 (0)