Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-49018

Fix approx_count_distinct not working correctly with collation

Rank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      When running in spark-shell:

      create table t(col string collate utf8_lcase)
      insert into t values 'a', 'a', 'A'
      select approx_count_distinct(col) from t 

      we get 2 as an answer, but it should be 1.

      Attachments

        Activity

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

          People

            viktor.lucic Viktor Lučić
            viktor.lucic Viktor Lučić
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment