yashmayya opened a new pull request, #14614: URL: https://github.com/apache/pinot/pull/14614
- The `NOW` scalar function returns a value of `LONG` type representing milliseconds since epoch. It was added before the `TIMESTAMP` data type was introduced to Pinot. - The function can't currently be used wherever timestamps are expected in the v2 engine because of the strong typing. For instance, the standard SQL function `TIMESTAMPADD` takes a datetime type as its third parameter (ex - `TIMESTAMPADD(day, 10, CAST('2024-12-01' AS TIMESTAMP)`). - In the v1 engine, `TIMESTAMPADD(day, 10, now())` (`LONG` / `TIMESTAMP` are interchangeable in v1 which is not strongly typed) works fine but it fails in the v2 engine with an error like - `Cannot apply 'TIMESTAMPADD' to arguments of type 'TIMESTAMPADD(<INTERVAL DAY>, <INTEGER>, <BIGINT>)'. Supported form(s): 'TIMESTAMPADD(<ANY>, <INTEGER>, <DATETIME>)' `. - Similar to `FROM_DATE_TIME`, we can add an override to the operator table to make sure that the return type for the `NOW` scalar function is defined as `TIMESTAMP` and it can be used as one (in terms of execution in the query engine, `TIMESTAMP` is represented as `LONG` internally so that isn't an issue here). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org