Skip to content

[Bug]: RADIANS(x) math function not supported #24440

Closed

Description

@dengn

Branch Name

main (v3.0.10 release tag)

Commit ID

2c55016e89a957fcb6e7554cebcfd1e6f2f3cd13

Other Environment Information

  • Hardware parameters: n/a (release build)
  • OS type: n/a
  • Others: discovered via NL2SQL workload generating standard MySQL math functions

Actual Behavior

The standard MySQL RADIANS(x) math function (which converts degrees to radians) is reported as not supported.

ERROR 20105 (HY000): not supported: function or operator 'radians'

(also tested RADIAN(x) in case of a naming variant — same "not supported" error)

Expected Behavior

RADIANS(x) is a standard MySQL math function returning the radian value of x (where x is in degrees). MatrixOne, being MySQL-compatible, should support it. Companion DEGREES(x) should also be checked.

Reference: https://dev.mysql.com/doc/refman/8.0/en/mathematical-functions.html#function_radians

Steps to Reproduce

SELECT RADIANS(180);         -- expected ~3.141592653589793, fails with "not supported"
SELECT RADIANS(90);          -- expected ~1.5707963267948966
SELECT DEGREES(PI());        -- please also confirm whether the companion DEGREES() works

Additional information

Trigonometric / geospatial workloads (distance calculations, lat-lon, sensor azimuth) routinely use RADIANS() and DEGREES(). Their absence blocks any standard MySQL haversine-distance formula and other common spatial queries.

Related issue filed in the same session:

  • POW(x, y) not supported

Activity

  1. added
    severity/s0
    on Jun 2, 2026
  2. added theissue type on Jun 2, 2026
  3. added this to the MO-202606 milestone on Jun 2, 2026
  4. ULookup commented on Jun 2, 2026

    @ULookup
    Contributor

    This issue has been resolved. RADIANS() and DEGREES() are now available on all active branches:

    Branch Introduced by
    main #23051 "Adding curtime" (2025-11-23)
    4.0-dev #23051 "Adding curtime" (2025-11-23)
    3.0-dev #24609 "add degrees" + #24634 "add radians" (2026-05-27)

    Changes

    • pkg/sql/plan/function/function_id.go — Function ID constants and name-to-ID mappings
    • pkg/sql/plan/function/list_builtIn.go — Overload definitions
    • pkg/sql/plan/function/func_builtin.go — builtInDegrees() and builtInRadians()
    • pkg/sql/plan/function/func_builtin_test.go — Unit tests
    • test/distributed/cases/function/ — Integration tests
  5. modified the milestones: MO-202606, MO-202607 on Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

severity/s0

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions