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

Autocomplete V2 #3067

Open
arikfr opened this issue Nov 12, 2018 · 1 comment
Open

Autocomplete V2 #3067

arikfr opened this issue Nov 12, 2018 · 1 comment

Comments

@arikfr
Copy link
Member

arikfr commented Nov 12, 2018

We have several issues with our autocomplete:

It has performance issues, hence we disable it for schemas with too many tokens. This happens because we pass all the tokens available to Ace for it to figure it out. It's possible we can utilize their API better and only return relevant suggestions.

It's not aware of the text context, i.e. if you started typing a word and then continue, it ignores existing text (#2329).

No support for aliases:

SELECT q.id
FROM queries q

In the above example it will not be aware that q is actually queries and won't suggest columns from it.

It's not aware of the code context, i.e. if I'm currently typing SELECT ... it makes sense to autocomplete almost anything, but if I'm typing FROM ... it should autocomplete table names or at least give them priority.

Sometimes it seems to highlight the wrong characters:

image

(note that highlighted v in the last suggestions)

Some people get annoyed by the autocomplete live behavior, but I'm not sure there is much to do about it. Maybe when the suggestions become more relevant it will be less of annoyance.


To implement 3 & 4, we need to understand the query. For this we can use this Javascript SQL parser.

We don't have to land it all together, but rather incremental improvements with each step.

@AravindGopala
Copy link

AravindGopala commented Dec 23, 2023

Just following up to see, if we have integrated to show column names? Point 2 from the OP.

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

No branches or pull requests

3 participants