Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1826

Jdbc dialect specific FLOOR fails when in GROUP BY

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.14.0
    • jdbc-adapter
    • None

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              chris-baynes Chris Baynes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: