Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

functions in group by clause aren't supported #858

Closed
rupal-bq opened this issue Nov 25, 2020 · 0 comments
Closed

functions in group by clause aren't supported #858

rupal-bq opened this issue Nov 25, 2020 · 0 comments

Comments

@rupal-bq
Copy link
Contributor

The query

SELECT DATE(`calcs`.`date2`) AS `TEMP(Test)(3817907367)(0)` FROM `calcs` GROUP BY DATE(`calcs`.`date2`)

returns the following error while using new engine.

{
    "error": {
        "type": "IllegalStateException",
        "reason": "Unsupported type DATE to construct expression value from object for field: DATE(calcs.date2), value: 1972-07-12.",
        "details": "Unsupported type DATE to construct expression value from object for field: DATE(calcs.date2), value: 1972-07-12."
    },
    "status": 503
}

After modifying the query to

 SELECT DATE(`calcs`.`date2`) AS `TEMP(Test)(3817907367)(0)` FROM `calcs` GROUP BY `calcs`.`date2`  

got the successful response as below.

{
    "schema": [
        {
            "name": "TEMP(Test)(3817907367)(0)",
            "alias": "TEMP(Test)(3817907367)(0)",
            "type": "date"
        }
    ],
    "datarows": [
        [
            "1972-07-12"
        ],
        [
            "1974-03-17"
        ],
        [
            "1974-05-03"
        ],
        [
            "1976-09-09"
        ],
        [
            "1977-02-08"
        ],
        [
            "1977-04-20"
        ],
        [
            "1980-07-26"
        ],
        [
            "1980-11-07"
        ],
        [
            "1988-01-05"
        ],
        [
            "1994-04-20"
        ],
        [
            "1995-06-04"
        ],
        [
            "1995-09-03"
        ],
        [
            "1997-05-30"
        ],
        [
            "1997-09-19"
        ],
        [
            "1998-08-12"
        ],
        [
            "2001-02-04"
        ],
        [
            "2002-04-27"
        ]
    ],
    "total": 17,
    "size": 17,
    "status": 200
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants