Details
Description
I have some buckets with indexes, and some without.
I wrote a query to list buckets that have no indexes:
(select id keyspace_id from system:keyspaces) except (select indexes.keyspace_id from system:indexes);
This query worked correctly when some buckets have indexes. When I ran the query on a new machine with no indexes, however, it returns an empty set. I can replicate that incorrect result with the following query:
(select id keyspace_id from system:keyspaces) except (select indexes.keyspace_id from system:indexes where 1=0);
This returns empty results. It is subtracting an empty set from a non-empty set, so it should return the non-empty set.