Skip to content

Commit

Permalink
Disable sort optimization for HALF_FLOAT (#10999) (#11005)
Browse files Browse the repository at this point in the history
Signed-off-by: Chaitanya Gohel <gashutos@amazon.com>
  • Loading branch information
gashutos authored Oct 30, 2023
1 parent 3549fb3 commit ac4de44
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 ac4de44

Please sign in to comment.