Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

gitbase dies for query with WHERE NOT <not boolean value> #726

Closed
zurk opened this issue May 24, 2019 · 1 comment · Fixed by #731
Closed

gitbase dies for query with WHERE NOT <not boolean value> #726

zurk opened this issue May 24, 2019 · 1 comment · Fixed by #731
Assignees
Labels
bug Something isn't working

Comments

@zurk
Copy link

zurk commented May 24, 2019

If you try to query something like:

select repository_id, commit_author_when, commit_parents from commits WHERE NOT commit_parents

gitbase dies. It is not a valid SQL query, because commit_parents type is not boolean, but I expect that gitbase remains available for new queries.

It is useful to have some general check if gitbase fails to process the query and do not shut down if the query was bad.

@kuba-- kuba-- self-assigned this May 25, 2019
@kuba-- kuba-- transferred this issue from src-d/gitbase May 25, 2019
@kuba-- kuba-- added the bug Something isn't working label May 25, 2019
@smola
Copy link
Collaborator

smola commented May 27, 2019

I think it's ok to just check for bool on evaluation if you introduce the right CAST during analysis.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants