Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
主要变更
ErrorStrategy
类,这个类实例化后将作为 parser.errorhandler 使用,这个类的主要作用是进行错误恢复和错误报告。在此基础上,这个类的实例还会在遇到错误时,将异常信息挂载到相应 context 上为什么需要 ErrorStrategy
在进行自动补全时,我们需要尽量在最小的范围内收集候选项来保证性能,目前的做法是先将输入按语句切割,然后从语句列表中选出合适的范围来进行自动补全项的收集,因此需要知道哪一条语句上是有异常的。
遗留问题
pgsql @Cythia828 和 sparksql @liuxy0551 还有一些问题,单测无法通过,这似乎与语法文件有关。