Hi there,
I'm really a user of HaskellDB, but am trying to mine the source code
for my own work. In reviewing the optimizations, I've stumbled upon
this code:
removeEmpty
= foldPrimQuery (Empty, BaseTable, project, restrict, binary, group, special)
where
-- Messes up queries without a table, e.g. constant queries
-- disabled by Bjorn Bringert 2004-04-08
--project assoc Empty = Empty
project assoc query | null assoc = Empty
| otherwise = Project assoc query
I'm wondering this is true: My understanding of Empty is that it
represents a nullary relation with a single element. (This is necessary
to it can be the identity wrt. cartesian product, I think.) If that's
the case, this transformation is incorrect, as `project [] query' should
return as many rows as query, not just one. Or am I overlooking
something?
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
|