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

"BETWEEN start_date, end_date" should return an error if "start_date > end_date" #140

Open
rogerlucena opened this issue Aug 26, 2020 · 0 comments

Comments

@rogerlucena
Copy link
Contributor

When using the BETWEEN keyword, if a sloppy user miswrite the start date in a way it becomes a date past the given end date of that interval, BW should return an error warning the user about it instead of silently returning an empty result (as it is the case nowadays, which is a little misleading).

To illustrate, given the query below:

SELECT ?p, ?o
FROM ?test
WHERE {
  /u<peter> ?p ?o
}
BETWEEN 2016-04-01T00:00:00-08:00, 2016-02-01T00:00:00-08:00;

And a ?test graph with triples:

/u<peter> "bought"@[2016-01-01T00:00:00-08:00] /c<mini>
/u<peter> "bought"@[2016-03-01T00:00:00-08:00] /c<model s>

The query nowadays just silently returns an empty result:

Result:
OK

Which can be misleading for the user as it will make she believe that the given interval is valid and there are no triples in the ?test graph satisfying it, whereas the truth is that the typed interval is not valid (which should be pointed as an error) as the user miswrote something while typing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant