matrixorigin / matrixorigin/matrixone

MySQL function not implemented: DEFAULT

Open
#23,035 1 comment 0 reactions 1 assignee Claimed by @gouhongshen View on GitHub
ai-easy kind/compatibility priority/p1
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

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.