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

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中去

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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