You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metamodel.apache.org by Kasper Sørensen <i....@gmail.com> on 2013/07/25 15:52:09 UTC

[PATCH] Only use CSV count approximation when "where items" is empty

I accidentally discovered this bug today while working with the MetaModel
codebase.

It seems that when doing an "approximate COUNT" query on a CSV file we
don't check if there are any WHERE items present in the query also. I added
that as a check to return null when there are where items in the query
(indicating that the count query cannot be handled in a optimized fashion -
which will in turn cause a count to be made by actually counting all
records).

The patch is available here:
https://gist.github.com/kaspersorensen/6079811

Regards,
Kasper