Skip to content

Commit 175ee15

Browse files
authored
Merge branch 'main' into fix_array_of_strings_summary
2 parents ae40261 + b1d07af commit 175ee15

File tree

5 files changed

+172
-127
lines changed

5 files changed

+172
-127
lines changed

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
root = true
19+
20+
[*]
21+
end_of_line = lf
22+
indent_style = space
23+
insert_final_newline = true
24+
trim_trailing_whitespace = true
25+
26+
[*.java]
27+
indent_size = tab
28+
tab_width = 2

.github/workflows/javadoc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
java-version: '25'
3232
distribution: 'temurin'
33-
cache: 'maven'
33+
cache: 'maven'
3434

3535
- name: Build and Generate Javadoc # POM is configured to output to target/site/apidocs
3636
run: mvn javadoc:javadoc
@@ -80,4 +80,3 @@ jobs:
8080
- name: Confirm Deployment
8181
if: success()
8282
run: echo "Javadoc for ${{ github.event.inputs.tag_ref }} is now live on gh-pages."
83-

src/main/java/org/apache/datasketches/tdigest/TDigestDouble.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public static TDigestDouble heapify(final MemorySegment seg, final boolean isFlo
426426
return new TDigestDouble(reverseMerge, k, value, value, new double[] {value}, new long[] {1}, 1, null);
427427
}
428428
final int numCentroids = posSeg.getInt();
429-
posSeg.getInt(); // unused
429+
final int numBuffered = posSeg.getInt();
430430
final double min;
431431
final double max;
432432
if (isFloat) {
@@ -444,7 +444,11 @@ public static TDigestDouble heapify(final MemorySegment seg, final boolean isFlo
444444
weights[i] = isFloat ? posSeg.getInt() : posSeg.getLong();
445445
totalWeight += weights[i];
446446
}
447-
return new TDigestDouble(reverseMerge, k, min, max, means, weights, totalWeight, null);
447+
final double[] buffered = new double[numBuffered];
448+
for (int i = 0; i < numBuffered; i++) {
449+
buffered[i] = isFloat ? posSeg.getFloat() : posSeg.getDouble();
450+
}
451+
return new TDigestDouble(reverseMerge, k, min, max, means, weights, totalWeight, buffered);
448452
}
449453

450454
// compatibility with the format of the reference implementation

0 commit comments

Comments
 (0)