Can only count distinct 1 column
SELECT
COUNT(DISTINCT MerchantKey), count(*)
FROM “hive_source.sapo_dw”.“dimmerchant”
;
But when I tried with 2 or more columns, it didn’t work. While in other SQL engines like MySQL, Postgresql, MS SQL Server it works fine.
SELECT
COUNT(DISTINCT MerchantKey, MerchantId), count(*)
FROM “hive_source.sapo_dw”.“dimmerchant”
;
SQL Error: PLAN ERROR:
Failure finding function: count(int32, int32).
SQL Query
SELECT
COUNT(DISTINCT MerchantKey, MerchantId), count(*)
FROM “hive_source.sapo_dw”.“dimmerchant”
ErrorOrigin: COORDINATOR
[Error Id: 7e80c92d-10f0-417e-82cc-ae93a8040bd1 ]
(com.dremio.exec.exception.SchemaChangeException)
Failure finding function: count(int32, int32).
