druid icon indicating copy to clipboard operation
druid copied to clipboard

Web console: improve SQL autocomplete and add JSON autocomplete

Open vogievetsky opened this issue 5 months ago • 1 comments

Fixes https://github.com/apache/druid/issues/17628

Made the SQL autocomplete much smarter

image

(note how it is not trying to auto-complete functions and other nonsense)

Also added autocomplete to JSON native queries and to all the JSON entry fields

image image

vogievetsky avatar Jun 11 '25 16:06 vogievetsky

Thank you for the review and feedback @clintropolis in general I have taken the approach of only going after the documented properties. I also think of these JSON completions as best effort. It is ok for them to miss stuff. Even if they are totally wrong it is not a blocker (even though it is best to fix) as the completions are purely cosmetic.

As for updating I expect the completions to be updated like like the properties for rendering all the AutoForms. Ideally done by the dev adding a new property in their PR but more often done after the fact once that property is exposed and documented

vogievetsky avatar Jun 20 '25 19:06 vogievetsky

I think the feedback all makes sense. I also think this PR makes things a lot better. In a follow up PR I will change this behaviour to use json-schema which is a standard and allows for recursive schema definition

vogievetsky avatar Jul 01 '25 17:07 vogievetsky