uchenily opened a new pull request, #59283:
URL: https://github.com/apache/doris/pull/59283
### What problem does this PR solve?
This PR sets DEFAULT as a non-reserved keyword since database name or
table/column name may use DEFAULT/default as the name.
before:
```sql
MySQL [langchain]> show tables;
+---------------------+
| Tables_in_langchain |
+---------------------+
| default |
| langchain |
+---------------------+
2 rows in set (0.003 sec)
MySQL [langchain]> DESCRIBE langchain;
+----------+--------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-------+---------+-------+
| id | varchar(64) | Yes | true | NULL | |
| text | text | Yes | false | NULL | NONE |
| vector | array<float> | No | false | NULL | NONE |
| metadata | text | Yes | false | NULL | NONE |
+----------+--------------+------+-------+---------+-------+
4 rows in set (0.003 sec)
MySQL [langchain]> DESCRIBE default;
ERROR 1105 (HY000): errCode = 2, detailMessage =
no viable alternative at input 'DESCRIBE default'(line 1, pos 9)
MySQL [langchain]> select * from default;
ERROR 1105 (HY000): errCode = 2, detailMessage =
mismatched input 'default' expecting {'(', '{', '}', 'ACTIONS', 'AFTER',
'AGG_STATE', 'AGGREGATE', 'ALIAS', 'ANALYZED', 'ARRAY', 'AT', 'AUTHORS',
'AUTO_INCREMENT', 'ALWAYS', 'BACKENDS', 'BACKUP', 'BEGIN', 'BELONG', 'BIN',
'BITAND', 'BITMAP', 'BITMAP_EMPTY', 'BITMAP_UNION', 'BITOR', 'BITXOR', 'BLOB',
'BOOLEAN', 'BRANCH', 'BRIEF', 'BROKER', 'BUCKETS', 'BUILD', 'BUILTIN', 'BULK',
'CACHE', 'CACHED', 'CALL', 'CATALOG', 'CATALOGS', 'CHAIN', CHAR, 'CHARSET',
'CHECK', 'CLUSTER', 'CLUS
```
after:
```sql
MySQL [langchain]> DESCRIBE default;
+----------+--------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-------+---------+-------+
| id | varchar(64) | Yes | true | NULL | |
| text | text | Yes | false | NULL | NONE |
| vector | array<float> | No | false | NULL | NONE |
| metadata | text | Yes | false | NULL | NONE |
+----------+--------------+------+-------+---------+-------+
4 rows in set (0.004 sec)
MySQL [langchain]> select id from default limit 1;
+--------------------------------------+
| id |
+--------------------------------------+
| 011645f8-e045-45d5-88f8-e12a5a62ab89 |
+--------------------------------------+
1 row in set (0.078 sec)
```
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]