Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.0
    • SQL
    • None

    Description

      Spark SQL exists a bug show below:

      spark.sql(
        " SELECT COUNT(DISTINCT 2), COUNT(DISTINCT 2, 3)")
        .show()
      +-----------------+--------------------+
      |count(DISTINCT 2)|count(DISTINCT 2, 3)|
      +-----------------+--------------------+
      |                1|                   1|
      +-----------------+--------------------+
      
      spark.sql(
        " SELECT COUNT(DISTINCT 2), COUNT(DISTINCT 3, 2)")
        .show()
      +-----------------+--------------------+
      |count(DISTINCT 2)|count(DISTINCT 3, 2)|
      +-----------------+--------------------+
      |                1|                   0|
      +-----------------+--------------------+
      

      Attachments

        Activity

          apachespark Apache Spark added a comment -

          User 'beliefer' has created a pull request for this issue:
          https://github.com/apache/spark/pull/29626

          apachespark Apache Spark added a comment - User 'beliefer' has created a pull request for this issue: https://github.com/apache/spark/pull/29626
          cloud_fan Wenchen Fan added a comment -

          Issue resolved by pull request 29626
          https://github.com/apache/spark/pull/29626

          cloud_fan Wenchen Fan added a comment - Issue resolved by pull request 29626 https://github.com/apache/spark/pull/29626

          People

            beliefer Jiaan Geng
            beliefer Jiaan Geng
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: