matrixorigin / matrixorigin/matrixone
MySQL function not implemented: DEFAULT
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
## Function Information
**Function Name**: `DEFAULT`
**Category**: miscellaneous
## MySQL Function Description
MySQL DEFAULT function:
DEFAULT(col_name) - Returns the default value for a table column.
## 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**: `(1064, 'SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 14 near " `
## Test Case
```sql
SELECT DEFAULT(col) AS result FROM (SELECT 1 AS col) AS t
```
## MySQL Documentation
- [MySQL Official Documentation](https://dev.mysql.com/doc/refman/8.4/en/miscellaneous-functions.html#function_default)
## Request
Please implement the `DEFAULT` function to improve MySQL compatibility.
Contributor guide
Assessment
This issue has not been assessed yet.