Details
Description
0: jdbc:phoenix:> create table bubu (df date primary key); No rows affected (0.689 seconds) 0: jdbc:phoenix:> select * from bubu where round(df,'YEAR',1)=DATE '2022-01-01 00:00:00'; java.lang.ArithmeticException: / by zero at org.apache.phoenix.expression.function.RoundDateExpression$1.getKeyRange(RoundDateExpression.java:272) ...
This is caused by getKeyRange not being updated when the Joda-based time units were added.
Also, the keyrange pushdown logic is just wrong, even for the non-joda cases.
Attachments
Issue Links
- is caused by
-
PHOENIX-2433 support additional time units (like week/month/year) in Trunc() round() and Ceil()
- Resolved
- is related to
-
PHOENIX-5066 The TimeZone is incorrectly used during writing or reading data
- Resolved
- relates to
-
PHOENIX-6822 Multiplier for Temporal round/floor/ceiling functions is not implemented and/or poorly defined
- Open
- links to