Open jrmuizel opened 4 years ago
This query is asking to order by the constant string 'date'
. I'll have to think about what the semantics of that should be, but it's likely not what is intended. A more useful query would be select * from default where province = 'Ontario' order by date
but for some reason this fails to parse. I'm not sure why this is yet, the tests cover queries that are all but identical and work just fine.
I actually meant select * from default where province = 'Ontario' order by "date"
but that doesn't work either. I guess other databases let you quote column names by LocustDB treats it as a column of null.
select * from default where province = 'Ontario' order by date
probably doesn't work because of https://github.com/andygrove/sqlparser-rs/issues/168.
I think I found the bug, the double quotes are not getting removed by either the parser or LocustDB so they end as part of the column name which is why LocustDB doesn't find the column as assumes it as null. This should be an easy fix, PR incoming.
The query select * from default where province = 'Ontario' order by "date"
now succeeds on master, I'm kicking off a new release that has the fix (v0.3.3).
With https://flatteningthecurve.herokuapp.com/data/canadatesting