[ 
https://issues.apache.org/jira/browse/HIVE-15850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15859845#comment-15859845
 ] 

Jesus Camacho Rodriguez commented on HIVE-15850:
------------------------------------------------

[~bslim], that's a fair point.

That logic is independent from this code and somehow more related to the change 
in HIVE-15863.

This problem should not exist since Calcite cannot fold 
{{to_utc_timestamp(timestamp, string timezone)}} (the UDF is a black box). In 
turn, it relies on the Hive expression folding logic, which needs to go through 
the Calcite to Hive expression translation, and thus, will have the right 
literal in timestamp (for more details, check the changes in 
ExprNodeConverter.java in HIVE-15863).

> Proper handling of timezone in Druid storage handler
> ----------------------------------------------------
>
>                 Key: HIVE-15850
>                 URL: https://issues.apache.org/jira/browse/HIVE-15850
>             Project: Hive
>          Issue Type: Bug
>          Components: Druid integration
>    Affects Versions: 2.2.0
>            Reporter: Jesus Camacho Rodriguez
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Critical
>         Attachments: HIVE-15850.patch
>
>
> We need to make sure that filters on timestamp are passed to Druid with 
> correct timezone.
> After CALCITE-1617, Calcite will generate a Druid query with intervals 
> without timezone specification. In Druid, these intervals will be assumed to 
> be in UTC (if Druid is running in UTC, which is currently the 
> recommendation). However, in Hive, those intervals should be assumed to be in 
> the user timezone. Thus, we should respect Hive semantics and include the 
> user timezone in the intervals passed to Druid.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to