Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5217

Incorrect result for COUNT DISTINCT limit

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.14.1
    • 4.15.0, 5.1.0, 4.14.2, 5.0.1
    • None
    • None
    • 4.14.1: incorrect

      4.6: correct.

       

    Description

      For table t1(pk1, col1, CONSTRAINT(pk1))

      upsert into "t1" values (1, 1);
      upsert into "t1" values (2, 2);

      sql A: select count("pk1") from "t1" limit 1, return 2 [correct]

      sql B: select count(disctinct("pk1")) from "t1" limit 1, return 1 [incorrect]

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            comnetwork chenglei
            fengchen8086 Chen Feng
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment