Skip to content
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

order by __time and TIME_PARSE bug. #15740

Open
limhwanhee opened this issue Jan 23, 2024 · 1 comment
Open

order by __time and TIME_PARSE bug. #15740

limhwanhee opened this issue Jan 23, 2024 · 1 comment

Comments

@limhwanhee
Copy link

Please provide a detailed title (e.g. "Broker crashes when using TopN query with Bound filter" instead of just "Broker crashes").

Affected Version

24.0.0

Description

I have a Table like the one below.

__time test1 test2 start_time value
2024-01-23T00:00:00.000Z A C 2024/01/23 00:00:00 1
2024-01-23T00:00:00.100Z A C 2024/01/23 00:00:00 2
2024-01-23T00:00:00.200Z B C 2024/01/23 00:00:00 3
... ... ... ... ...
2024-01-23T00:01:00.000Z A C 2024/01/23 00:00:00 1
2024-01-23T00:01:00.100Z A C 2024/01/23 00:00:00 2
2024-01-23T00:01:00.200Z B C 2024/01/23 00:00:00 3
... ... ... ... ...

Write the query statement as follows.

select * from (SELECT __time, test1, test2, TIME_PARSE("start_time", 'yyyy/MM/dd HH:mm:ss') as "stime", value from test_table order by __time)
where "stime" >= TIMESTAMP '2024-01-24 00:00:00'
order by __time

The correct answer I expect is

__time test1 test2 stime value
2024-01-24T00:00:00.000Z C A 2024-01-24T00:00:00Z 1
2024-01-24T00:00:00.100Z C A 2024-01-24T00:00:00Z 2
2024-01-24T00:00:00.200Z C A 2024-01-24T00:00:00Z 3
... ... ... ... ...
2024-01-24T00:01:00.000Z F X 2024-01-24T00:00:00Z 1
2024-01-24T00:01:00.100Z F X 2024-01-24T00:00:00Z 2
2024-01-24T00:01:00.200Z F X 2024-01-24T00:00:00Z 3
... ... ... ... ...

However, the result is shown below.

__time test1 test2 stime value
2024-01-24T00:00:00.000Z C A 2024-01-24T23:56:xxZ 1
2024-01-24T00:00:00.100Z C A 2024-01-24T23:xx:xxZ 2
2024-01-24T00:00:00.200Z C A 2024-01-24T23:59:xxZ 3
... ... ... ... ...
2024-01-24T00:01:00.000Z F X 2024-01-24T23:xx:xxZ 1
2024-01-24T00:01:00.100Z F X 2024-01-24T23:xx:xxZ 2
2024-01-24T00:01:00.200Z F X 2024-01-24T23:xx:xxZ 3
... ... ... ... ...

The original table has a normal start_time.
What could be the cause?

Copy link

This issue has been marked as stale due to 280 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@druid.apache.org list.
Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant