Skip to content

countRows does not work with distinct #157

@gkleen

Description

@gkleen

countRows is simply the string COUNT(*), makeSelect always emits SELECT DISTINCT. Thus the following invalid SQL is produced:

SELECT DISTINCT COUNT(*) FROM table;

Ideally makeSelect would be somewhat smart and automagically form the correct SELECT COUNT(DISTINCT *).

My guess is we would have to treat countRows somewhat more special, than we do currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions