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

Add SQL auto complete in druid console #7244

Merged
merged 2 commits into from
Mar 16, 2019

Conversation

shuqi7
Copy link
Contributor

@shuqi7 shuqi7 commented Mar 12, 2019

In the SQL console, we are enabling auto complete by detecting keywords from:

  • Local words
  • Datasource names
  • Database column names
  • Druid SQL functions

Things to note:

  1. The function documentation, i.e. syntax and usage, will be displayed when hovering over the function in the popover list.
  2. Auto complete can be disabled by the user and will always be disable when the user input JSON data rather than SQL queries in the text area
  3. The SQL function documentation is saved as a JSON variable in a TypeScript file, which is auto generated by the create-sql-function-doc in script directory in web-console.
  4. Before running npm start in web-console, run ./script/build in the web-console directory to generate the SQL function documentation file, and do not modify the file in anyway.

image

@fjy fjy added this to the 0.15.0 milestone Mar 12, 2019
@vogievetsky
Copy link
Contributor

I have reviewed these changes already and it has my 👍
Some of my review comments (that have already been addresses) can be found here: https://github.com/implydata/druid/pull/18

@gianm gianm changed the title [Console] Add SQL auto complete in druid console Add SQL auto complete in druid console Mar 15, 2019
Copy link
Member

@clintropolis clintropolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, fancy 👍

web-console/script/create-sql-function-doc Show resolved Hide resolved
@clintropolis clintropolis merged commit 5406aaa into apache:master Mar 16, 2019
@shuqi7 shuqi7 deleted the sql-autocomplete branch March 18, 2019 17:05
clintropolis pushed a commit to implydata/druid-public that referenced this pull request Apr 3, 2019
* Add SQL auto complete in druid console

* Add comment in sql.md to alert user to change create-sql-function-doc if sql.md format gets changed
gianm pushed a commit to implydata/druid-public that referenced this pull request Apr 8, 2019
* Add SQL auto complete in druid console

* Add comment in sql.md to alert user to change create-sql-function-doc if sql.md format gets changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants