You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chris Baynes (JIRA)" <ji...@apache.org> on 2017/07/05 13:58:00 UTC

[jira] [Commented] (CALCITE-1826) Jdbc dialect specific FLOOR fails when in GROUP BY

    [ https://issues.apache.org/jira/browse/CALCITE-1826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074797#comment-16074797 ] 

Chris Baynes commented on CALCITE-1826:
---------------------------------------

I've created a PR that fixes this: https://github.com/apache/calcite/pull/489

> Jdbc dialect specific FLOOR fails when in GROUP BY
> --------------------------------------------------
>
>                 Key: CALCITE-1826
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1826
>             Project: Calcite
>          Issue Type: Bug
>          Components: jdbc-adapter
>            Reporter: Chris Baynes
>            Assignee: Julian Hyde
>
> Currently the SqlFloorFunction sometimes modifies the operands in a SqlCall (i.e. replaceTimeUnitOperand). This is fine if the floor is only used in a project, but when used again in an aggregate this modification will change the aggregate, which will break the unparsing of it there.
> This can be reproduced by adding a "group by" to the RelToSqlConverterTest#testFloor.
> SqlBasicCall#clone is a shallow clone so cannot be used to fix the problem (since the underlying operands are not cloned).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)