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
Implement timezone as a session property that is able to be set by client #22551
Comments
Example :
cc @tdcmeehan |
If the desire is for deterministic testing, then can't one simply set the timezone in the client? |
@tdcmeehan If we implement it in Presto as a session property, you can use it on presto-cli, presto c# driver, or any other driver, but this jvm way only works for java-based solution |
The timezone of the user is already a part of the session that is added through the |
If we make this timezone a session parameter, we will see its value from query JSONs, Presto UI, etc. If this is set using an HTTP header value, then there is no way we can see what time zone was used when running a query, which can be confusing when people need to troubleshoot. If we really do not want to expose this in the form of a session parameter, we probably should expose its value in the query JSON also Presto UI. @tdcmeehan |
Because the |
@tdcmeehan That sounds good to me! Is this something that @yhwang can help us get? |
Hi @yhwang, is there an issue for this work? |
@yzhang1991 nope, please feel free to open one and tag me. To clarify, the goal is to display the |
Currently timezone is not a session property when running
SHOW SESSION;
. Looking to implement being able to set timezone as a session property.Expected Behavior or Use Case
This will be useful when one is working with queries with timestamp with no timezone columns and want to get deterministic results when testing on machines with different timezones. Presto's current behavior when dealing with timestamp with no timezone column is to assume the current machine's timezone that the presto-cli is running on.
Presto Component, Service, or Connector
Session
Possible Implementation
Add timezone as a session property into presto-main/SystemSessionProperties.java and then have the query
SET SESSION timezone = 'UTC';
for example to route to call setTimeZoneKey() in presto-main/Session.javaExample Screenshots (if appropriate):
Context
The text was updated successfully, but these errors were encountered: