matrixorigin / matrixorigin/matrixone

[Compatibility] generate_series: alias cannot be used as the output column (fixed to 'result')

Open
#24,812 2 comments 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
`generate_series(a,b)` returns a fixed column named `result`; the table alias cannot be used as the value column, which is surprising and breaks portable queries.

## 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 g FROM generate_series(1,3) g; -- fails
SELECT g.result FROM generate_series(1,3) g; -- works
```

## Actual result
```
ERROR 20301 (HY000): invalid input: column g does not exist
```

## Expected
Allow referencing the alias as the value column, or clearly document that the only column is `result`.

## 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.