apache / apache/datafusion-sqlparser-rs

MySQL allows integer interval values

未关闭
#298 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
3.5k
派生
772
平均合并
4 天 9 小时
30 天内合并 PR
17

描述

The usual format for an interval is `INTERVAL 'value' unit`, but MySQL allows `'value'` to be an expression that is either a string or a number. For example:
```
SELECT DATE_SUB('2018-05-01',INTERVAL '1' YEAR);
SELECT DATE_SUB('2018-05-01',INTERVAL 1 YEAR);
```
both return `2017-05-01`. Currently, the latter syntax is not supported.

贡献指南

这个仓库没有索引到贡献指南

调研方向

首先定位 parser 入口点以及 SQL INTERVAL 表达式的现有测试。将受支持的带引号值形式与 MySQL 的数值形式进行比较,然后添加测试以表明这两个示例都能成功解析。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust, sql
领域
compilers, databases
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。