Pengcheng Xiong created CALCITE-1020:
----------------------------------------
Summary: Add MilliSecond in TimeUnit
Key: CALCITE-1020
URL: https://issues.apache.org/jira/browse/CALCITE-1020
Project: Calcite
Issue Type: Improvement
Reporter: Pengcheng Xiong
Assignee: Pengcheng Xiong
Attachments: CALCITE-1020.01.patch
{code}
select interval_day_time('2 1:2:3') from src limit 1;
{code}
Hive supports sub-millisecond intervals, i.e., nano-seconds. For example,
Hive will translate this into a RexLiteral of
176523000.000000, which is the millisecond representation of "2 1:2:3".
Then when it goes through the ReduceExpressionRule, RexReplacer will call
RexBuilder to make a cast. And in the L527 of RexBuilder, the value of
176523000.000000 will be divided by the multiplier and becomes the new
value. However, Hive does not want any multiplier as it is already in
millisecond format. Thus, a candidate solution here is to add a millisecond
time unit and make its multiplier as 1.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)