Re: Question about timestampdiff

2020-06-26 Thread Julian Hyde
Is your question about semantics or implementation? If it's semantics, it's useful if you provide an example where Calcite gives a different result than another DBMS. I find https://rextester.com/l/mysql_online_compiler useful for that. If it's implementation, you should know that YEAR and MONTH

Re: Question about timestampdiff

2020-06-21 Thread Rui Wang
I think it is because there is no clear mapping for how to convert a month (and then same to year) in interval to seconds/milliseconds. Does a month have 30 days, 31 days, 28 days or 29 days? (Probably can find an answer in SQL standard). -Rui On Sun, Jun 21, 2020 at 4:00 PM Rommel

Question about timestampdiff

2020-06-21 Thread Rommel Quintanilla
Hi, I'm investigating the behavior of the functions timestampdiff with different time-units. I found that in the case of the time-units: second, minute, hour, and day, the logical plan returned by Calcite is consistent. Since the input is a timestamp in milliseconds, in the same way, the