You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "itxiangkui (Jira)" <ji...@apache.org> on 2022/04/05 09:33:00 UTC

[jira] [Comment Edited] (CALCITE-5039) View:Timestamp cannot query Data:Long in GMT+8 TimeZone Env

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

itxiangkui edited comment on CALCITE-5039 at 4/5/22 9:32 AM:
-------------------------------------------------------------

Yes! [~wojustme]

 

My test case is the same as yours, and my query is also empty. I solved it by a particularly awkward processing method.

I remodeled the docking module of the query.
1. Process the parameters passed to me by RexNode: ts -= 8 * 60 * 60 * 1000;
2. Process the hit query result set and all ts: ts += 8 * 60 * 60 * 1000;

 

But...  :(


was (Author: JIRAUSER286541):
Yes! [~wojustme]

 

My test case is the same as yours, and my query is also empty. I solved it by a particularly awkward processing method.


I remodeled the docking module of the query.
1. Process the parameters passed to me by RexNode: ts -= 8 * 60 * 60 * 1000;
2. Process the hit query result set and all ts: ts += 8 * 60 * 60 * 1000;

 

但是...  :(

> View:Timestamp cannot query Data:Long in GMT+8 TimeZone Env
> -----------------------------------------------------------
>
>                 Key: CALCITE-5039
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5039
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core, jdbc-driver
>    Affects Versions: 1.29.0, 1.30.0
>            Reporter: itxiangkui
>            Priority: Major
>              Labels: TimeZone, Timestamp
>         Attachments: image-2022-03-15-17-07-39-917.png
>
>
> When I have a row like :
> |ts:TimeStamp|channel:String|pv:Long|
> |1647187200000|ios|10|
>  
> while 1647187200000 is a timestamp in TimeZone of "GMT+8",the datetime is "2022-03-14 00:00:00"
> but you can not query the data using a sql like :
> ```sql
> select * from table where ts='2022-03-14 00:00:00';
> select * from table where ts<'2022-03-14 00:00:01' and  ts>'2022-03-13 23:59:59'  and channel='ios';
> ```
> it is like the jdbc-fether will filter the data when match the timestampString,while the timestamp String looks like '2022-03-13 16:00:00' or '2022-03-14 08:00:00'
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)