Skip to content

[Bug]: 语句前方有注释时,提供的补全项有问题 #424

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

Closed
liuxy0551 opened this issue May 15, 2025 · 8 comments
Closed

[Bug]: 语句前方有注释时,提供的补全项有问题 #424

liuxy0551 opened this issue May 15, 2025 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@liuxy0551
Copy link
Collaborator

Version

4.2.0

Which SQL?

Spark

SQL content

-- the comment
SELECT * FROM db.

JavaScript/TypeScript code

What happened?

wordRanges 返回的内容不对。SparkSQL、HiveSQL 可复现,其他 SQL 待验证

Image

Relevant log output

@liuxy0551 liuxy0551 self-assigned this May 15, 2025
@liuxy0551 liuxy0551 added the bug Something isn't working label May 15, 2025
@qinyouzhi
Copy link

这个有进展了吗

@liuxy0551
Copy link
Collaborator Author

这个有进展了吗

目前还在修改中,预计未来一周有进度

@liuxy0551
Copy link
Collaborator Author

经过确认仅在 SparkSQL 和 HiveSQL 中存在问题:在注释后方补全时会出现异常。

Image Image

liuxy0551 added a commit to liuxy0551/dt-sql-parser that referenced this issue May 29, 2025
liuxy0551 added a commit to liuxy0551/dt-sql-parser that referenced this issue May 29, 2025
liuxy0551 added a commit to liuxy0551/dt-sql-parser that referenced this issue May 29, 2025
@qinyouzhi
Copy link

@liuxy0551 啥时候能发布。这个影响比较大

mumiao pushed a commit that referenced this issue Jun 5, 2025
…Offset (#426)

* test: #424 syntax after comments

* fix(common): #424 allTokens slice when caretTokenIndex use tokenIndexOffset
@mumiao
Copy link
Collaborator

mumiao commented Jun 5, 2025

check: #426

@qinyouzhi
Copy link

monaco-sql-languages 也同步更新下吧 @mumiao

@mumiao
Copy link
Collaborator

mumiao commented Jun 6, 2025

monaco-sql-languages 也同步更新下吧 @mumiao

[email protected]

@liuxy0551
Copy link
Collaborator 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

3 participants