Skip to content

Commit

Permalink
Disable sort optimization for HALF_FLOAT (opensearch-project#10999)
Browse files Browse the repository at this point in the history
Signed-off-by: Chaitanya Gohel <[email protected]>
  • Loading branch information
gashutos committed Oct 30, 2023
1 parent 3549fb3 commit a2e1880
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Removed

### Fixed
- [BUG] Disable sort optimization for HALF_FLOAT ([#10999](https://github.com/opensearch-project/OpenSearch/pull/10999))

### Security

[Unreleased 2.11]: https://github.com/opensearch-project/OpenSearch/compare/2.11...2.11
[Unreleased 2.11]: https://github.com/opensearch-project/OpenSearch/compare/2.11...2.11

Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private XFieldComparatorSource comparatorSource(
assert !targetNumericType.isFloatingPoint();
source = new IntValuesComparatorSource(this, missingValue, sortMode, nested);
}
if (targetNumericType != getNumericType()) {
if (targetNumericType != getNumericType() || getNumericType() == NumericType.HALF_FLOAT) {
source.disableSkipping(); // disable skipping logic for cast of sort field
}
return source;
Expand Down

0 comments on commit a2e1880

Please sign in to comment.