comphead commented on issue #2292: URL: https://github.com/apache/datafusion-comet/issues/2292#issuecomment-3315104464
Test to reproduce ``` test("count distinct") { sql("drop table if exists t") sql("CREATE TABLE t(v VARCHAR(10), v1 VARCHAR(10), i INT) USING PARQUET") sql("INSERT INTO t VALUES ('c', 'a', 1)") sql("INSERT INTO t VALUES ('c1', 'a1', 1)") sql("INSERT INTO t VALUES ('c2', 'a2', 2)") sql("INSERT INTO t VALUES ('c3', 'a3', 2)") sql("INSERT INTO t VALUES ('c4', 'a4', 2)") sql("INSERT INTO t VALUES ('c', 'a', 1)") sql("INSERT INTO t VALUES ('c1', 'a1', 1)") sql("INSERT INTO t VALUES ('c2', 'a2', 2)") sql("INSERT INTO t VALUES ('c3', 'a3', 2)") sql("INSERT INTO t VALUES ('c4', 'a4', 2)") sql("INSERT INTO t VALUES ('c', 'a', 1)") sql("INSERT INTO t VALUES ('c1', 'a1', 1)") sql("INSERT INTO t VALUES ('c2', 'a2', 2)") sql("INSERT INTO t VALUES ('c3', 'a3', 2)") sql("INSERT INTO t VALUES ('c4', 'a4', 2)") sql("select * from t").repartition(3).write.mode("overwrite").parquet("/tmp/test_11") // sql("SELECT i, count(distinct v), count(distinct v1) FROM t GROUP BY i").show(false) withSQLConf( CometConf.COMET_EXEC_SHUFFLE_ENABLED.key -> "true", CometConf.COMET_BATCH_SIZE.key -> "1", "spark.comet.cast.allowIncompatible" -> "true", "spark.comet.enabled" -> "true", "spark.comet.exec.replaceSortMergeJoin" -> "true", "spark.comet.exec.shuffle.enableFastEncoding" -> "true", "spark.comet.exec.shuffle.enabled" -> "true", "spark.comet.exec.shuffle.fallbackToColumnar" -> "true", "spark.comet.explain.native.enabled" -> "true", "spark.comet.explainFallback.enabled" -> "true", "spark.shuffle.manager" -> "org.apache.spark.sql.comet.execution.shuffle.CometShuffleManager", "spark.comet.logFallbackReasons.enabled" -> "true") { spark.read.parquet("/tmp/test_11").createOrReplaceTempView("t2") checkSparkAnswerAndOperator("SELECT i, v1, count(distinct v) FROM t2 GROUP BY i, v1") } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org