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

表名信息识别存在不准确 #239

Open
zhaoygcq opened this issue Dec 21, 2023 · 1 comment
Open

表名信息识别存在不准确 #239

zhaoygcq opened this issue Dec 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zhaoygcq
Copy link

Version
e.g. v4.0.0-beta.4.10

The Type of SQL
mysql

Your Code
sql语句为:let text = SELECT * FROM current_catalog_schema1 as
let position = {lineNumber: 1, column: 41}
Problem
调用parser.getSuggestionAtCaretPosition(text, position)获取当前节点的语义信息;
结果如下:

{
    syntax: [{
       syntaxContextType:  "table" ,
       wordRanges:[
              {
                  "text": "current_catalog_schema1",
                  "startIndex": 14,
                  "stopIndex": 36,
                  "line": 1,
                  "startColumn": 15,
                  "stopColumn": 37
              },
              {
                  "text": " ",
                  "startIndex": 37,
                  "stopIndex": 37,
                  "line": 1,
                  "startColumn": 38,
                  "stopColumn": 38
              },
              {
                  "text": "as",
                  "startIndex": 38,
                  "stopIndex": 38,
                  "line": 1,
                  "startColumn": 39,
                  "stopColumn": 39
              }
            ]
   }]
}

其中的current_catalog_schema1 as不应该都被识别为"table"类型

@HaydenOrz HaydenOrz added the bug Something isn't working label Dec 21, 2023
@HaydenOrz
Copy link
Collaborator

@zhaoygcq 感谢你的反馈

该问题已经被确认是一个 bug,我们将尽快修复。

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

3 participants