You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/05/29 22:56:00 UTC
[jira] [Comment Edited] (CALCITE-2334) Extend simplification of
expressions with CEIL function over date types
[ https://issues.apache.org/jira/browse/CALCITE-2334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16494421#comment-16494421 ]
Julian Hyde edited comment on CALCITE-2334 at 5/29/18 10:55 PM:
----------------------------------------------------------------
Also, CEIL and FLOOR are duals, because CEIL\(x) === -FLOOR(-x). So, I would be surprised if there were rewrites that apply to one but not the other.
was (Author: julianhyde):
Also, CEIL and FLOOR are duals, because CEIL(x) === -FLOOR(-x). So, I would be surprised if there were rewrites that apply to one but not the other.
> Extend simplification of expressions with CEIL function over date types
> -----------------------------------------------------------------------
>
> Key: CALCITE-2334
> URL: https://issues.apache.org/jira/browse/CALCITE-2334
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.17.0
> Reporter: Jesus Camacho Rodriguez
> Assignee: Julian Hyde
> Priority: Minor
>
> CALCITE-2332 disables simplification of CEIL function due to correctness issues.
> {{FLOOR}} and {{CEIL}} cannot be handled with the same logic. For instance, {{CEIL(CEIL(x TO HOUR) TO YEAR)}} cannot be simplified, e.g., '2011-12-31 23:59:59', while {{FLOOR(FLOOR(x TO HOUR) TO YEAR)}} can be simplified. Hence, we need new logic to enable simplification of CEIL function on date types.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)