Uploaded image for project: 'Apache MetaModel'
  1. Apache MetaModel
  2. METAMODEL-1

Only use CSV count approximation when "where items" is empty

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              kaspersor Kasper Sørensen
              Reporter:
              kaspersor Kasper Sørensen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: