Details
Description
ANSI SQL and several existing database engines support the SET [SESSION/LOCAL] TIME ZONE command that set the timezone for the session/current transaction. As Impala does not support transactions, I do not plan to support the SESSION/LOCAL options.
In addition to the ANSI SQL which only accepts offsets, Impala would also accept time zone names, similarly to PostgreSQL: https://www.postgresql.org/docs/9.1/static/sql-set.html
The planned implementation is to rely on TIMEZONE query option added in IMPALA-7362. So SET TIME ZONE x; would be the same as set TIMEZONE=x; on the server side. The difference on client side would be that SET TIME ZONE will set (and thus validate) the query option immediately on the server, while SET TIMEZONE (as other SET calls) are only sent the server at the next query, so the validation error can be only returned for the query.
The reason for relying on a query option is that query options already have some infrastructure to display there value or set a default value in a configuration file.
Attachments
Issue Links
- requires
-
IMPALA-7362 Add query option to set timezone
- Resolved