Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Impala can not understand sorting in tables

avatar
Contributor

I have some tables in impala and in the create tables statement they have sort by( timestamp column) but when I query them they are returning the data not sorted. Why is this happening?

 

For example 

2019-09-18 08:44:10
2020-08-05 13:15:48
2020-08-05 13:24:00
2020-10-15 18:29:34
2020-09-09 09:35:04

5 REPLIES 5

avatar
Explorer

can you share the screenshot? what are you running 

avatar
Contributor

The table properties include sort by in a timestamp column. So I am running after select * from db.table1 and it returns me the data like above.  

avatar
Explorer

Your given example is already sorted. I would like to see your query screen and shot and result displayed

avatar
Contributor

But it is not sorted 

2019-09-18 08:44:10
2020-08-05 13:15:48
2020-08-05 13:24:00
2020-10-15 18:29:34
2020-09-09 09:35:04

 

Supposed to be asc but its not

avatar
Explorer

2019-09-18 08:44:10
2020-08-05 13:15:48
2020-08-05 13:24:00
2020-10-15 18:29:34
2020-09-09 09:35:04

 

This is already in asc order. check it's format year/mm/dd