PG_SQL - Internal error: Unsupported CAST from Interval(DayTime) to Timestamp(Nanosecond, None) / Data type Interval(DayTime) not supported for binary operation 'multiply' on primitive arrays
Describe the bug Cube PG SQL unable to add interval for datetime
To Reproduce Steps to reproduce the behavior:
DBeaver connect Cube postgres SQL
run below query works fine
select * from ( select cast('2023-03-03 00:00:00' as timestamp) - interval '1 day' startdate ) tQuery Result:
run below query cause error
select *, startdate - interval '1 day' from ( select cast('2023-03-03 00:00:00' as timestamp) startdate ) tQuery Result:
run below query works fine
select cast('2023-03-22 00:00:00' as timestamp) + (interval '1 day') * 19Query Result:
run below query cause error
select cast('2023-03-22 00:00:00' as timestamp) + (interval '1 day') * datediff(day, cast('2023-03-03 00:00:00' as timestamp), cast('2023-03-22 00:00:00' as timestamp))Query Result:
Expected behavior Should not cause errors and able to query
Screenshots


Version: v0.32.9
Source: cube-js/cube