Skip to content

JDBC driver ADDDATE and SUBDATE issue[BUG] #291

Closed

Description

Describe the bug
ADDDATE and SUBDATE results in null if the timestamp time result is 00:00:00.

To Reproduce
Steps to reproduce the behavior:

  1. SELECT SUBDATE(TIMESTAMP('2010-04-12 01:00:00'), INTERVAL 0 HOUR)
  2. See result being 2010-04-12 01:00:00
  3. SELECT SUBDATE(TIMESTAMP('2010-04-12 01:00:00'), INTERVAL 1 HOUR)
  4. See result being null

Expected behavior
Expected result should be 2010-04-12 00:00:00 or 2010-04-12.

Additional context
image
It returns a date when calling DATE() when we know that the result of the argument is null from the image above.
image
SQL plugin returns datetime without time:
image

Activity

  1. ghost added on Nov 18, 2021
  2. ghost added
    bug
    on Nov 18, 2021
  3. added a commit that references this issue on Dec 13, 2021
  4. added a commit that references this issue on Mar 9, 2022
  5. dai-chen commented on Dec 14, 2022

    @dai-chen
    Collaborator

    Can we close this now?

  6. Yury-Fridlyand commented on Dec 15, 2022

    @Yury-Fridlyand
    Collaborator

    Fix is coming from Bit-Quill#122. I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugv2.6.0

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions