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

这个可能是c3引擎的一个问题? #164

Open
openai0229 opened this issue Dec 9, 2024 · 2 comments
Open

这个可能是c3引擎的一个问题? #164

openai0229 opened this issue Dec 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@openai0229
Copy link

image image

前面我已经输入了表名,按道理来说不应该继续提示表名,应该是等我输入完逗号之后才继续提示表名
所以,我觉得可能是C3引擎在收集规则的时候跳过了这个符号去收集规则,我尝试不把这个符号添加到ignore_tokens好像也没什么效果,希望可以讨论一下

@liuxy0551 liuxy0551 added the bug Something isn't working label Dec 9, 2024
@liuxy0551
Copy link
Collaborator

这确实是个示例的 bug,代码在 https://github.com/DTStack/monaco-sql-languages/blob/main/website/src/languages/helpers/completionService.ts#L116。

原因是这里仅判断了 words 的长度,此时错误的理解为 xxx. 或者 xxx.yyy,也就是说默认了有 . ,忽略了空格的情况。
如果你在产品中使用到了,可以先加上 && words.includes('.') 的简单判断,是否有其他影响待测试。添加后当前 issue 的问题正常:
image

@openai0229
Copy link
Author

我感觉这个问题根本的原因应该还是错误的获取到了这个表名的规则吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants