Skip to content

Commit 8721082

Browse files
Disable sort optimization for HALF_FLOAT (#10999) (#11004)
(cherry picked from commit 448635f) Signed-off-by: Chaitanya Gohel <gashutos@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 4fd7ee8 commit 8721082

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4141
- Add telemetry tracer/metric enable flag and integ test. ([#10395](https://github.com/opensearch-project/OpenSearch/pull/10395))
4242
- Performance improvement for Datetime field caching ([#4558](https://github.com/opensearch-project/OpenSearch/issues/4558))
4343
- Add instrumentation for indexing in transport bulk action and transport shard bulk action. ([#10273](https://github.com/opensearch-project/OpenSearch/pull/10273))
44+
- [BUG] Disable sort optimization for HALF_FLOAT ([#10999](https://github.com/opensearch-project/OpenSearch/pull/10999))
4445

4546
### Deprecated
4647

server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private XFieldComparatorSource comparatorSource(
242242
assert !targetNumericType.isFloatingPoint();
243243
source = new IntValuesComparatorSource(this, missingValue, sortMode, nested);
244244
}
245-
if (targetNumericType != getNumericType()) {
245+
if (targetNumericType != getNumericType() || getNumericType() == NumericType.HALF_FLOAT) {
246246
source.disableSkipping(); // disable skipping logic for cast of sort field
247247
}
248248
return source;

0 commit comments

Comments
 (0)