-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
SQL: Fix issue with timezone for JDBC pagination #52080
Conversation
Pinging @elastic/es-search (:Search/SQL) |
Previously, when the specified (or default) `fetchSize` led to subsequent HTTP requests and the usage of cursors, those subsequent cursor requests didn't use the `timezone` defined in the connection properties. Even though the query is executed once (with the correct timezone) the processing of the values returned by the `HitExtractors` in the next pages was done using the default timezone `Z`. This could lead to incorrect results. Fix the issue by passing the initially configured timezone to each subsequent cursor HTTP request. Add a note in the docs to clarify that when the REST endpoint is used, the user needs to keep passing the `time_zone` parameter to each subsequent request, as there is no notion of a user session through in the REST HTTP endpoint. Relates to: elastic#51258
4bc0ef8
to
c7f9719
Compare
@elasticmachine run elasticsearch-ci/packaging-sample-matrix-windows |
That's a bug - the HitExtractors are serialized in the cursor using the initial timezone - it's a bug to not use that timezone which is available from the stream ( |
Please remove version labels when closing a PR, as these are used to drive release notes |
Previously, when the specified (or default)
fetchSize
led tosubsequent HTTP requests and the usage of cursors, those subsequent
cursor requests didn't use the
timezone
defined in the connectionproperties. Even though the query is executed once (with the correct
timezone) the processing of the values returned by the
HitExtractors
in the next pages was done using the default timezone
Z
. This couldlead to incorrect results.
Fix the issue by passing the initially configured timezone to each
subsequent cursor HTTP request.
Add a note in the docs to clarify that when the REST endpoint is used,
the user needs to keep passing the
time_zone
parameter to eachsubsequent request, as there is no notion of a user session through in
the REST HTTP endpoint.
Relates to: #51258