apache / apache/datafusion-sqlparser-rs
Failed to parse Mysql CHARACTER SET with COLLATE clause
未关闭
- 主要语言
- Rust
- 星标
- 3.5k
- 派生
- 772
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 17
描述
When using SQLParser, the following ALTER TABLE statement fails to parse:
ALTER TABLE `test`.`test` MODIFY COLUMN `v` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `id`,DROP PRIMARY KEY,ADD PRIMARY KEY (`id`, `v`) USING BTREE
The issue seems to be related to the presence of the COLLATE latin1_swedish_ci clause. If the COLLATE clause is removed, the statement parses successfully.
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先使用 SQLParser 重现报告的 ALTER TABLE 语句,并将其与省略 COLLATE 子句的版本进行比较。当包含 CHARACTER SET 和 COLLATE 的完整 MySQL 语句能够成功解析时,工作即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- rust, sql
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100