Skip to content

Conversation

bpintea
Copy link
Contributor

@bpintea bpintea commented Sep 20, 2024

This will correct/switch "year" unit diffing from the current integer subtraction to a crono subtraction. Consequently, two dates are (at least) one year apart now if (at least) a full calendar year separates them. The previous implementation simply subtracted the year part of the dates.

Note: this parts with ES SQL's implementation of the same function, which itself is aligned with MS SQL's implementation, which works equivalent to an integer subtraction.

Fixes #112482.

(cherry picked from commit f7ff00f)

…ological (elastic#113103)

This will correct/switch "year" unit diffing from the current integer
subtraction to a crono subtraction. Consequently, two dates are (at
least) one year apart now if (at least) a full calendar year separates
them. The previous implementation simply subtracted the year part of the
dates.

Note: this parts with ES SQL's implementation of the same function,
which itself is aligned with MS SQL's implementation, which works
equivalent to an integer subtraction.

Fixes elastic#112482.

(cherry picked from commit f7ff00f)
@bpintea bpintea added backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Analytics/ES|QL AKA ESQL v8.16.0 labels Sep 20, 2024
@bpintea bpintea requested a review from a team as a code owner September 20, 2024 11:29
Copy link
Contributor

Documentation preview:

@elasticsearchmachine elasticsearchmachine merged commit 6e314d6 into elastic:8.x Sep 20, 2024
16 checks passed
@bpintea bpintea deleted the port/113103 branch September 20, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport v8.16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants