Skip to content

MySQL function not implemented: SIGN #22935

Closed
Closed

Description

@dengn

Function Information

Function Name: SIGN
Category: numeric

MySQL Function Description

MySQL SIGN函数:
返回数字的符号。

语法: SIGN(X)

功能:
- 如果X为正数,返回1
- 如果X为0,返回0
- 如果X为负数,返回-1

Expected Behavior

预期行为:
- SIGN(5) 应返回 1
- SIGN(0) 应返回 0
- SIGN(-5) 应返回 -1
- SIGN(0.5) 应返回 1

Current Behavior in MatrixOne

This function is not implemented in MatrixOne.

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

Test Case

SELECT SIGN(5) AS result1

MySQL Documentation

Request

Please implement the SIGN 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. fengttt commented on Nov 24, 2025

    @fengttt
    Contributor

    Done

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