Apache Drill: UNSUPPORTED_OPERATION ERROR: Hash aggregate does not support schema change

Trying to run this query, brings the error Hash aggregate does not support schema change

SELECT 
CAST (reporting_date as DATE) AS Datum,
Max(calc) AS max_calc
from TABLE
group by reporting_date 

have any one faced similar issue .?

Upvotes: 1

Views: 389

Answers (1)

NickW
NickW

Reputation: 9768

When you use GROUP BY the columns in your SELECT that aren't aggregated need to match the columns in your GROUP BY exactly.

You have "CAST (reporting_date as DATE)" in your SELECT but "reporting_date" in your GROUP BY

Upvotes: 1

Related Questions