Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/error_strategy #230

Merged
merged 3 commits into from
Dec 11, 2023
Merged

Feat/error_strategy #230

merged 3 commits into from
Dec 11, 2023

Conversation

HaydenOrz
Copy link
Collaborator

主要变更

  1. 将内部的 errorHandler 重命名为 errorListener
  2. 添加 ErrorStrategy 类,这个类实例化后将作为 parser.errorhandler 使用,这个类的主要作用是进行错误恢复和错误报告。在此基础上,这个类的实例还会在遇到错误时,将异常信息挂载到相应 context 上

为什么需要 ErrorStrategy

在进行自动补全时,我们需要尽量在最小的范围内收集候选项来保证性能,目前的做法是先将输入按语句切割,然后从语句列表中选出合适的范围来进行自动补全项的收集,因此需要知道哪一条语句上是有异常的。

遗留问题

pgsql @Cythia828 和 sparksql @liuxy0551 还有一些问题,单测无法通过,这似乎与语法文件有关。

@HaydenOrz HaydenOrz added the new features New feature or request label Dec 11, 2023
@mumiao
Copy link
Collaborator

mumiao commented Dec 11, 2023

+1

@liuxy0551
Copy link
Collaborator

spark 的我看下

@HaydenOrz HaydenOrz merged commit ee8b468 into DTStack:main Dec 11, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new features New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants