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 results in empty results, cmd query tool #438

Closed
mwyvr opened this issue Dec 22, 2021 · 2 comments
Closed

ORDER BY results in empty results, cmd query tool #438

mwyvr opened this issue Dec 22, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@mwyvr
Copy link

mwyvr commented Dec 22, 2021

What version of Genji are you using?

$ genji version
Genji v0.14.0
Genji CLI v0.14.0

Same behaviour with Boltdb/Badgerdb. To be clear, this is only in the genji cmd tool; I'm not seeing issues using the Genji API.

What did you do?

Using the command line query tool:

Example data:

select * from person limit 1;
{
"sid": "af879a5vfpdad6wd",
"firstname": "Bolt0",
"lastname": "Smith",
"primaryemail": "foo-0@example.com"
}

Example query without ORDER BY
genji> select sid, firstname from person limit 5;
{
"sid": "af879a5vfpdad6wd",
"firstname": "Bolt0"
}
{
"sid": "af879a5vfpdad6we",
"firstname": "Bolt1"
}
{
"sid": "af879a5vftdad6wf",
"firstname": "Bolt2"
}

What did you expect to see?

5 documents, ordered ASC or DESC

What did you see instead?

FAILing query - it doesn't matter what field or direction the order by is issued, always empty N results.
genji> select sid, firstname from person ORDER BY sid limit 5;
{}
{}
{}
{}
{}

@mwyvr mwyvr added the bug Something isn't working label Dec 22, 2021
@asdine
Copy link
Collaborator

asdine commented Dec 22, 2021

Thanks for reporting, I managed to reproduce it. I'll investigate and release a fix soon

@asdine
Copy link
Collaborator

asdine commented Dec 22, 2021

This has been fixed by v0.14.1, you can run:

go get github.com/genjidb/genji@latest
go install github.com/genjidb/genji/cmd/genji@latest

@asdine asdine closed this as completed Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants