[
https://issues.apache.org/jira/browse/PHOENIX-5257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
zhanghui updated PHOENIX-5257:
------------------------------
Issue Type: Wish (was: Bug)
> COALESCE t where the second param is any string fails
> ------------------------------------------------------
>
> Key: PHOENIX-5257
> URL: https://issues.apache.org/jira/browse/PHOENIX-5257
> Project: Phoenix
> Issue Type: Wish
> Reporter: zhanghui
> Priority: Major
>
> Error: ERROR 1018 (42Y27): Aggregate may not contain columns not in GROUP BY.
> COALESCE(DM_CA392E6297DCFF50, 'abc') (state=42Y27,code=1018)
> why '-' not support in phoenix as a param? I have to add GROUP BY ,but it
> support in mysql,hive,impala and so on
>
>
>
> SELECT
> COALESCE(sub_e43fcae758683b42.dm_ca392e6297dcff50,'-') AS
> dm_ca392e6297dcff50_1,
> COALESCE(sub_e43fcae758683b42.dm_a6d709d4c63c0c35,'-') AS
> dm_a6d709d4c63c0c35_1,
> count(*) AS total_rows__ FROM
> ( SELECT
> DIMMETRICS_ECOMPRODUCT.CATEGORY AS dm_ca392e6297dcff50,
> DIMMETRICS_ECOMPRODUCT.UNIT_PRICE AS dm_197e0f8ffdf1c93a,
> DIMMETRICS_ECOMPRODUCT.PRODUCT_NAME AS dm_a6d709d4c63c0c35,
> AVG(DIMMETRICS_ECOMPRODUCT.PRICE_SUM) AS me_cf17f092ad3c1d72
> FROM DIMMETRICS.ECOMPRODUCT DIMMETRICS_ECOMPRODUCT GROUP BY
> DIMMETRICS_ECOMPRODUCT.CATEGORY,
> DIMMETRICS_ECOMPRODUCT.UNIT_PRICE,
> DIMMETRICS_ECOMPRODUCT.PRODUCT_NAME)
> sub_e43fcae758683b42
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)