Pedro Silva
05/31/2021, 1:09 PMdateTimeFieldSpecs[{
"name": "dateOfBirth",
"dataType": "STRING",
"format": "1:DAYS:SIMPLE_DATE_FORMAT:yyyy-MM-dd'T'HH:mm:ss'Z'",
"granularity": "1:DAYS"
},...,]
Should you be able to apply datetime funcitons transformations at query time?
For example, retrieving the year of the field: select year("dateOfBirth") from ....
I'm getting parsing errors:
2021/05/31 12:52:50.536 ERROR [BaseCombineOperator] [pqw-1] Caught exception while executing operator of index: 0 (query: QueryContext{_tableName='HitExecutionView_REALTIME', _selectExpressions=[year(dateOfBirth)], _aliasList=[null], _filter=null, _groupByExpressions=null, _havingFilter=null, _orderByExpressions=null, _limit=10, _offset=0, _queryOptions={responseFormat=sql, groupByMode=sql, timeoutMs=9994}, _debugOptions=null, _brokerRequest=BrokerRequest(querySource:QuerySource(tableName:HitExecutionView_REALTIME), pinotQuery:PinotQuery(dataSource:DataSource(tableName:HitExecutionView_REALTIME), selectList:[Expression(type:FUNCTION, functionCall:Function(operator:YEAR, operands:[Expression(type:IDENTIFIER, identifier:Identifier(name:dateOfBirth))]))], orderByList:[], limit:10, queryOptions:{responseFormat=sql, groupByMode=sql, timeoutMs=9994}))})
java.lang.NumberFormatException: For input string: "1997-02-06T00:00:00Z"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_292]
at java.lang.Long.parseLong(Long.java:589) ~[?:1.8.0_292]
at java.lang.Long.parseLong(Long.java:631) ~[?:1.8.0_292]
Mayank
Pedro Silva
05/31/2021, 2:58 PMMayank
Pedro Silva
05/31/2021, 3:07 PMMayank
Pedro Silva
05/31/2021, 3:49 PMyear(field)
or month(field)
Select year(dateBirth), dateBirth from table where...
outputs:
1982 | 1982-02-13
Mayank
Pedro Silva
05/31/2021, 3:55 PM