Issue 19271: Fix DerivedFieldScript to support emitting Float type#19303
Merged
rishabhmaurya merged 3 commits intoopensearch-project:mainfrom Sep 17, 2025
Merged
Issue 19271: Fix DerivedFieldScript to support emitting Float type#19303rishabhmaurya merged 3 commits intoopensearch-project:mainfrom
rishabhmaurya merged 3 commits intoopensearch-project:mainfrom
Conversation
…object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com>
…object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com>
rishabhmaurya
approved these changes
Sep 15, 2025
Contributor
|
@ishag4 thank you for fixing it |
Contributor
|
❌ Gradle check result for 6566be6: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Contributor
|
❌ Gradle check result for 094b6ea: null Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
…pensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com>
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19303 +/- ##
============================================
+ Coverage 72.96% 73.00% +0.03%
- Complexity 69825 69829 +4
============================================
Files 5667 5667
Lines 320555 320557 +2
Branches 46348 46349 +1
============================================
+ Hits 233908 234008 +100
+ Misses 67769 67644 -125
- Partials 18878 18905 +27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6c4f3d8
into
opensearch-project:main
34 of 36 checks passed
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…pensearch-project#19303) * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for bug in DerivedFieldScript: support emitting Float type object opensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com> --------- Signed-off-by: ishag4 <isha26701@gmail.com> Signed-off-by: Isha Gupta <igupta24@apple.com> Co-authored-by: Isha Gupta <igupta24@apple.com>
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…pensearch-project#19303) * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for bug in DerivedFieldScript: support emitting Float type object opensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com> --------- Signed-off-by: ishag4 <isha26701@gmail.com> Signed-off-by: Isha Gupta <igupta24@apple.com> Co-authored-by: Isha Gupta <igupta24@apple.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
jainankitk
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 22, 2025
…pensearch-project#19303) * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for bug in DerivedFieldScript: support emitting Float type object opensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com> --------- Signed-off-by: ishag4 <isha26701@gmail.com> Signed-off-by: Isha Gupta <igupta24@apple.com> Co-authored-by: Isha Gupta <igupta24@apple.com> Signed-off-by: Ankit Jain <jainankitk@apache.org>
asimmahmood1
pushed a commit
to jainankitk/OpenSearch
that referenced
this pull request
Sep 23, 2025
…pensearch-project#19303) * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for bug in DerivedFieldScript: support emitting Float type object opensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com> --------- Signed-off-by: ishag4 <isha26701@gmail.com> Signed-off-by: Isha Gupta <igupta24@apple.com> Co-authored-by: Isha Gupta <igupta24@apple.com>
pranikum
pushed a commit
to pranikum/OpenSearch
that referenced
this pull request
Sep 23, 2025
…pensearch-project#19303) * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for bug in DerivedFieldScript: support emitting Float type object opensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com> --------- Signed-off-by: ishag4 <isha26701@gmail.com> Signed-off-by: Isha Gupta <igupta24@apple.com> Co-authored-by: Isha Gupta <igupta24@apple.com>
vinaykpud
pushed a commit
to vinaykpud/OpenSearch
that referenced
this pull request
Sep 26, 2025
…pensearch-project#19303) * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for Bug in DerivedFieldScript should support emitting Float type object: opensearch-project#19271 Signed-off-by: ishag4 <isha26701@gmail.com> * Fix for bug in DerivedFieldScript: support emitting Float type object opensearch-project#19271 Signed-off-by: Isha Gupta <igupta24@apple.com> --------- Signed-off-by: ishag4 <isha26701@gmail.com> Signed-off-by: Isha Gupta <igupta24@apple.com> Co-authored-by: Isha Gupta <igupta24@apple.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change addresses a bug in DerivedFieldScript where emitting Float values was not supported, even though the official OpenSearch documentation lists Float as a valid type for derived field scripts.
Issue: The getObjectByteSize method in DerivedFieldScript only accounted for Double, Integer, Long, Boolean, String, and Tuple types. Emitting a Float previously caused an IllegalArgumentException.
Fix: Added support for Float in getObjectByteSize so that scripts emitting Float values are handled correctly without errors.
Tests: A new test testEmittingFloatField has been added in DerivedFieldScriptTests to verify that Float values can be emitted successfully. Existing tests for Double, GeoPoint, multiple values, and byte-size limit continue to pass.
Related Issues
Resolves #19271
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.