matrixorigin / matrixorigin/matrixone

[Compatibility] rand() rejects an integer seed argument (RAND(N) not supported)

Open
#24,813 1 comment 0 reactions 1 assignee Claimed by @daviszhen View on GitHub
ai-medium deferred kind/compatibility
Dominant language
Go
Stars
1.9k
Forks
311
Avg merge
1d 3h
Merged PRs (30d)
768

Description

## Summary
`rand()` rejects an integer seed, while MySQL supports `RAND(N)` for reproducible sequences.

## Environment
- **Reported on:** MatrixOne Cloud free tier, `8.0.30-MatrixOne-v3.0.11`
- **Retested on:** local Docker `matrixorigin/matrixone` **main branch** build, Git commit `0bfda60` (built 2026-05-30), version string `8.0.30-MatrixOne-v`

## Test case
```sql
SELECT rand(123);
```

## Actual result
```
ERROR 20203 (HY000): invalid argument function rand, bad value [BIGINT]
```

## Expected
`RAND(N)` with an integer seed should be accepted (MySQL compatibility).

## Version status
- v3.0.11 (Cloud): reproduces
- main / 4.0-dev (commit 0bfda60): reproduces

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.