Closed SolarLune closed 1 month ago
Hey, the default variable types are strings in RBQL for CSV and therefore the default sorting order is lexicographical, you need to convert to integer e.g. select * order by int(a.Number) desc
( use parseInt
with JS backend)
Ah, I see - thanks for letting me know~
Oh, I wanted to ask, is it planned to autodetect the variable types when all fields in a column are consistent so you don't have to cast for sorting, as an example?
Good idea, I think this can be done at least as an option, but the UI improvement should come first IMO - there must be a way to show each column type in the column header and possibly a dropdown box to manually switch between string/int/float as an alternative to doing it inside the query.
Hello, sorting doesn't seem to work correctly when done from an RBQL query. Here's an example dataset:
With the RBQL query:
I get the output:
This is with either Python or Javascript as the backend language. I'm going to guess sorting is done after converting the fields to string, which is why the sorting is possibly lexographical rather than numerical when possible?