Skip to content

[Feature Request]: 希望 getSuggestionAtCaretPosition 返回的 "column" 的 wordRanges 可以包含到值 #428

Description

@wonghan

Topic

Enhance existing features

Which SQL?

Hive

SQL content

SELECT * from hive_current_catalog_schema1 WHERE hive_current_catalog_schema1 =

What happened?

此时返回的补全项是重新推荐一个新的column
Image

Description

希望 getSuggestionAtCaretPosition 返回的 "column" 的 wordRanges 可以包含到值,如期望返回的 column wordRanges 的结构:

[
    {
        "syntaxContextType": "column",
        "wordRanges": [
            {
                "text": "hive_current_catalog_schema1",
                "line": 1,
                "startIndex": 49,
                "endIndex": 76,
                "startColumn": 50,
                "endColumn": 78
            },
            {
                "text": " ",
                "line": 1,
                "startIndex": 77,
                "endIndex": 77,
                "startColumn": 78,
                "endColumn": 79
            },
            {
                "text": "=",
                "line": 1,
                "startIndex": 78,
                "endIndex": 78,
                "startColumn": 79,
                "endColumn": 80
            },
           {
                "text": " ",
                "line": 1,
                "startIndex": 79,
                "endIndex": 79,
                "startColumn": 80,
                "endColumn": 81
            }
        ]
    }
]

这样的话,可以根据当前的column,去进行下一步的处理,如查询这个column有什么枚举值之类的

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions