Skip to content

Commit

Permalink
fixes for byte
Browse files Browse the repository at this point in the history
Signed-off-by: Bharathwaj G <bharath78910@gmail.com>
  • Loading branch information
bharath-techie committed Sep 4, 2024
1 parent 747c06e commit 87abc91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,7 @@ public byte[] encodePoint(Number value) {

@Override
public double toDoubleValue(long value) {
byte[] bytes = new byte[8];
NumericUtils.longToSortableBytes(value, bytes, 0);
return NumericUtils.sortableLongToDouble(NumericUtils.sortableBytesToLong(bytes, 0));
return objectToDouble(value);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ public void testStarTreeDocValues() throws IOException {
StarTreeDocument[] starTreeDocuments = StarTreeTestUtils.getSegmentsStarTreeDocuments(
List.of(starTreeValues),
List.of(
StarTreeNumericType.DOUBLE,
StarTreeNumericType.LONG,
StarTreeNumericType.DOUBLE,
StarTreeNumericType.DOUBLE,
StarTreeNumericType.DOUBLE,
StarTreeNumericType.LONG,
StarTreeNumericType.DOUBLE,
StarTreeNumericType.DOUBLE,
StarTreeNumericType.LONG
NumberFieldMapper.NumberType.DOUBLE,
NumberFieldMapper.NumberType.LONG,
NumberFieldMapper.NumberType.DOUBLE,
NumberFieldMapper.NumberType.DOUBLE,
NumberFieldMapper.NumberType.DOUBLE,
NumberFieldMapper.NumberType.LONG,
NumberFieldMapper.NumberType.DOUBLE,
NumberFieldMapper.NumberType.DOUBLE,
NumberFieldMapper.NumberType.LONG
),
reader.maxDoc()
);
Expand Down

0 comments on commit 87abc91

Please sign in to comment.