Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: split whiteSpace into multiple tokens to fix findCaretTokenIndex… #385

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JackWang032
Copy link
Collaborator

Fix #376

问题:当SQL存在换行时, 一个token会包括多行,findCaretTokenIndex找不到tokenIndex
以下是问题SQL示例:

create table a(id
 <pos>
);

现象为换行处空格后没有补全:
iShot_2025-01-06_19 15 42

问题原因:
一个token内可能包含多个换行符,导致左边界判断有问题
image

修复方式:
Hive保持一致,将每个空白符拆分到单独的token中去

@mumiao mumiao added the bug Something isn't working label Feb 13, 2025
@mumiao
Copy link
Collaborator

mumiao commented Feb 14, 2025

有冲突了

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

Successfully merging this pull request may close these issues.

[Bug]: 通过行号以及列号获取token的Index不太对
2 participants