calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <els...@apache.org>
Subject Re: date function error
Date Wed, 16 Aug 2017 15:40:04 GMT
I'm not sure how to give you more context as I'm not familiar with how 
Kylin uses Calcite/Avatica.

Best suggestion I can give you is to look at the raw value (if you can?) 
and compare that to what you receive via your SQL query. This is likely 
a problem with either the TZ configuration when you wrote the record or 
when you are reading it back out. I'd suggest you play around with the 
TZ setting to see how it works.

On 8/16/17 3:04 AM, apache_dev@163.com wrote:
> HI,
> 
>   thinks .
> 
> 
>   Can you describe it clearer?
> 
>   Local server(linux)  timezone  is correct.
> 
>   ZONE="Asia/Shanghai"
> 
> 
> 
> apache_dev@163.com
>   
> From: Josh Elser
> Date: 2017-08-16 10:52
> To: dev
> Subject: Re: date function error
> Hi,
>   
> This sounds like a timezone issue to me. Depending on how you wrote the
> date, conversion from GMT into your local timezone can appear to
> "change" a date.
>   
> Can you try setting the timeZone[1] parameter in the JDBC URL?
>   
> [1] https://calcite.apache.org/avatica/docs/client_reference.html#timeZone
>   
> On 8/15/17 10:24 PM, apache_dev@163.com wrote:
>> Hi,
>>
>> when i run sql by kyline GUI,Right result is  2011-02-28,but i got  2011-03-01,is
bug?
>>
>> select cast('2011-03-31' as date)  - INTERVAL '1' month from KYLIN_CAL_DT
>>
>>
>>
>>
>> apache_dev@163.com
>>

Mime
View raw message