Skip to content

MySQL function not implemented: SUBTIME #22982

Closed
Closed

Description

@dengn

Function Information

Function Name: SUBTIME
Category: date

MySQL Function Description

MySQL SUBTIME function:
SUBTIME(expr1, expr2) - SUBTIME() returns expr1 - expr2 expressed as a time value.

Expected Behavior

Expected behavior:
According to MySQL documentation, the function should return correct results.

Current Behavior in MatrixOne

This function is not implemented in MatrixOne.

Error Message: (20105, "not supported: function or operator 'subtime'")

Test Case

SELECT SUBTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002') AS result1

MySQL Documentation

Request

Please implement the SUBTIME function to improve MySQL compatibility.

Activity

  1. added
    priority/p0
    kind/compatibility
    ai-easy
    on Nov 21, 2025
  2. added this to the MO-202511 milestone on Nov 21, 2025
  3. added a commit that references this issue on Nov 21, 2025
  4. fengttt commented on Nov 22, 2025

    @fengttt
    Contributor

    See #22964

  5. XuPeng-SH commented on Nov 25, 2025

    @XuPeng-SH
    Contributor

    MatrixOne:

    SELECT SUBTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002') AS result1;
    +---------+
    | result1 |
    +---------+
    | NULL    |
    +---------+

    MySQL:

    SELECT SUBTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002') AS result1;
    +----------------------------+
    | result1                    |
    +----------------------------+
    | 2007-12-30 22:58:58.999997 |
    +----------------------------+
  6. XuPeng-SH commented on Nov 26, 2025

    @XuPeng-SH
    Contributor

    fixed

  7. Repository owner unassigned on Dec 5, 2025
  8. Ariznawlll commented on Jan 7, 2026

    @Ariznawlll
    Collaborator

    由#23464 跟踪

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

Metadata

Metadata

Assignees

Labels

ai-easykind/compatibilitypriority/p0

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions