Did you try EXTRACT(MONTH FROM $DATE_COLUMN)
EXTRACT is standard (unlike MONTH) and is implemented already. Julian > On Dec 4, 2015, at 8:55 AM, deepak pushpakar <[email protected]> > wrote: > > Hello Calcite Developers, > > We are using Calcite for validation and parsing of hive queries. When we > try to include a MONTH() function in one of the select columns the query, > the query fails telling that it is not expected. I went through the code > base of 1.4.0 and 1.50 trying to understand what I can do myself by doing > some change and building it. I also found that MONTH function is not yet > implemented (mentioned in the calcite website. > Any help appreciated. > Example query: > SELECT MONTH($DATE_COLUMN) AS MONTH_ID, COUNT($DATA_COLUMN) AS NUM_RECORDS > FROM $RECORDS_TABLE WHERE $COL1 = 'SOME_VALUE' GROUP BY MONTH_ID ORDER BY > NUM_RECORDS; > > > Thanks > Deepak Pushpakar
