soar
soar copied to clipboard
Suggestions about partition table
blingbling add support list partition Syntax
commit log 比较low的是: 暂时partition定义的变量延用range parition的变量。 我在等待pingcap hash parition出来看他们是如何处理变量的问题
It's hard to tell SQL developer at which case it's better to use partition table, and how to chose partition key/type.
TBL.001 should add more detail about how to use partition table.
"TBL.001": {
Item: "TBL.001",
Severity: "L4",
Summary: "不建议使用分区表",
Content: `不建议使用分区表`,
Case: "CREATE TABLE trb3(id INT, name VARCHAR(50), purchased DATE) PARTITION BY RANGE(YEAR(purchased)) (PARTITION p0 VALUES LESS THAN (1990), PARTITION p1 VALUES LESS T..."
Func: (*Query4Audit).RulePartitionNotAllowed,
}
你是对的。 但是我们再给开发建议的时候。首先需要然sql解析的时候知道该sql是否是partition 和 partition的内容。 不然只能报告语法错误了。 只要语法能解析。我们才有空间去限制开发用或不用
你们好像没有用 tidb 的parse模块吧?
是用 vitess.io/vitess/go/vt/sqlparser
这个的