Wild card projection returning fewer results than specific one

I think I may have come across a strange corner case. Either that or something were someone is going to have to explain to me some esoteric section of the specs.

The following query returns no results

select * where { } values ?test {"one" "two"}

while this one where I replace the wild card with a specific projection does

select ?test where { } values ?test {"one" "two"}

returns

+-------+
| test  |
+-------+
| "one" |
| "two" |
+-------+

Yes, completely contrived query that you'd never do but it was surprising. I was going to use it to play around with UNNEST and SET to test some things to see if it worked the way I thought that it did.

If you move the values inside it works as expected. I guess the projection is applied before the values

select * where { values ?test {"one" "two"}}
+-------+
| test  |
+-------+
| "one" |
| "two" |
+-------+

Yes, it's a bug. Indeed specific to the rare situation when VALUES appears outside of WHERE. Will be fixed in 7.3.1.

Thanks,
Pavel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.