Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix serialization of time_zone field in CompositeDateHistogramAggregationSource #1362

Conversation

fcrespel
Copy link
Contributor

Description

This PR fixes the serialization of the time_zone field in CompositeDateHistogramAggregationSource. Previously, it was incorrectly serialized as zone_id, which does not exist server-side, and documented as required instead of optional. New timeZone() accessors are added for consistency with the field name, but old zoneId() ones are preserved with @Deprecated annotations for backward compatibility.

Issues Resolved

Closes #1142

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.

@fcrespel fcrespel force-pushed the fix-time-zone-in-compositedatehistogramaggregationsource branch from d787bc7 to 95a3949 Compare December 20, 2024 22:59
@reta
Copy link
Collaborator

reta commented Dec 21, 2024

@fcrespel thank you, could you please add some tests as well? thanks!

@fcrespel
Copy link
Contributor Author

@reta I added a simple deserialization/serialization test, is that OK?

@reta
Copy link
Collaborator

reta commented Dec 21, 2024

@reta I added a simple deserialization/serialization test, is that OK?

Yeah, thank you @fcrespel !

@reta reta merged commit 5aef053 into opensearch-project:main Dec 21, 2024
56 checks passed
@reta reta added the backport 2.x Backport to 2.x branch label Dec 21, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 21, 2024
…tionSource (#1362)

* Fix serialization of time_zone field in CompositeDateHistogramAggregationSource

Signed-off-by: Fabien Crespel <[email protected]>

* Add test for CompositeDateHistogramAggregationSource

Signed-off-by: Fabien Crespel <[email protected]>

---------

Signed-off-by: Fabien Crespel <[email protected]>
(cherry picked from commit 5aef053)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Dec 21, 2024
…tionSource (#1362) (#1363)

* Fix serialization of time_zone field in CompositeDateHistogramAggregationSource



* Add test for CompositeDateHistogramAggregationSource



---------


(cherry picked from commit 5aef053)

Signed-off-by: Fabien Crespel <[email protected]>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] timeZone not implemented in CompositeDateHistogramAggregationSource
2 participants