[ZEPPELIN-1876] improved comptetion with schema/table/column separati…#1886
[ZEPPELIN-1876] improved comptetion with schema/table/column separati…#1886sotnich wants to merge 7 commits intoapache:masterfrom
Conversation
|
@astroshim Could you please review this PR? |
| } finally { | ||
| schemas.close(); | ||
| } | ||
| } catch (Throwable t) { |
There was a problem hiding this comment.
Is Exception ok? Should it be Throwable?
There was a problem hiding this comment.
Yeah, thanks, SQLException is better. Have changed it.
|
Don't think CI errors are related to this PR. |
| @@ -0,0 +1,313 @@ | |||
| package org.apache.zeppelin.jdbc; | |||
There was a problem hiding this comment.
You need to add license header into this file.
Unapproved licenses:
/home/travis/build/apache/zeppelin/jdbc/src/test/java/org/apache/zeppelin/jdbc/SqlCompleterTest.java
There was a problem hiding this comment.
Fixed, but still there are erros that I don't understand how to link to PR.
There was a problem hiding this comment.
forget my previous message. I got wrong changes
|
There is a flaky test in the result: Never mind the result. that test is being fixed now. LGTM |
|
@sotnich Can you rebase it onto current master? Recently, we fixed some flaky tests including your case. It would make your CI green |
|
Made a rebase, now CI tests have only one error related with DistributedResourcePoolTest. |
|
@sotnich I have a question. |
|
@cloverhearts |
|
@sotnich Thank you for great improvement. |
|
CI failure is not related to this change. |
|
@cloverhearts @astroshim |
|
@sotnich Great Job! but still doesn't work with |
…on + sqlcompleter tests
…schemas (like mysql)
…schemas (like mysql)
…schemas (like mysql)
|
@cloverhearts @astroshim, check it now, please. If it's still not working send me details: configuration of the interpreter and jdbc log file. |
|
@sotnich |
|
LGTM and merge to master if no more discussions. |
…on + sqlcompleter tests ### What is this PR for? This PR changes autocompletion behaviour in jdbc interpeter. There are some changes: * [main change] autocompletion now depends on what are you typing. Now there are four types of competion: schema, table, column and keywords. If you typing new word then autocompetion suggests only keywords and schema names. If you are typing after schema name with point then you get list of tables in that schema. Also if you typing a name after point after a table name you will get a list of column names of this table. * autocomption now supports aliases in sql. If you write alias for a table in sql you will get a list of columns for an aliased table if you write down alias and point. * autocompletion now load keywords only in low case (otherwise there are so many keywords in a list of autocompletion that it is becomes uncomfortable) ### What type of PR is it? Improvement ### Todos * [ ] - sort names in the output of autocompletion * [ ] - list only schema names if we are typing a schema name (for example after keywork FROM) * [ ] - add description in autocompletion list for schema names - schema, for table names - table and so * [ ] - autocompletion must initialize on opening of interpeter (not only after execution of sql) * [ ] - update autocompletion schemas only after execute update sql, not after every sql ??? * [ ] - new option for postgresql interpreter: postgresql.completer.schema.filter. Filter schema names loaded into autocompletion (no more garbage schema names). ### What is the Jira issue? * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/ * Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. [ZEPPELIN-533] ### How should this be tested? Outline the steps to test the PR here. ### Screenshots (if appropriate) https://issues.apache.org/jira/secure/attachment/12845228/auto1.JPG https://issues.apache.org/jira/secure/attachment/12845229/auto2.JPG https://issues.apache.org/jira/secure/attachment/12845230/auto3.JPG ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Sotnichenko Sergey <[email protected]> Closes apache#1886 from sotnich/jdbc-1876 and squashes the following commits: 2db7ed8 [Sotnichenko Sergey] [ZEPPELIN-1876] add support for databases with only catalogs without schemas (like mysql) a048ef2 [Sotnichenko Sergey] [ZEPPELIN-1876] add support for databases with only catalogs without schemas (like mysql) f4b03df [Sotnichenko Sergey] [ZEPPELIN-1876] add support for databases with only catalogs without schemas (like mysql) 675c629 [Sotnichenko Sergey] [ZEPPELIN-1876] Adding licence header 9fac1d0 [Sotnichenko Sergey] [ZEPPELIN-1876] SQLException instead of Throwable 895c35a [Sotnichenko Sergey] [ZEPPELIN-1876] SQLException instead of Throwable 7d40166 [Sotnichenko Sergey] [ZEPPELIN-1876] improved comptetion with schema/table/column separation + sqlcompleter tests
…on + sqlcompleter tests ### What is this PR for? This PR changes autocompletion behaviour in jdbc interpeter. There are some changes: * [main change] autocompletion now depends on what are you typing. Now there are four types of competion: schema, table, column and keywords. If you typing new word then autocompetion suggests only keywords and schema names. If you are typing after schema name with point then you get list of tables in that schema. Also if you typing a name after point after a table name you will get a list of column names of this table. * autocomption now supports aliases in sql. If you write alias for a table in sql you will get a list of columns for an aliased table if you write down alias and point. * autocompletion now load keywords only in low case (otherwise there are so many keywords in a list of autocompletion that it is becomes uncomfortable) ### What type of PR is it? Improvement ### Todos * [ ] - sort names in the output of autocompletion * [ ] - list only schema names if we are typing a schema name (for example after keywork FROM) * [ ] - add description in autocompletion list for schema names - schema, for table names - table and so * [ ] - autocompletion must initialize on opening of interpeter (not only after execution of sql) * [ ] - update autocompletion schemas only after execute update sql, not after every sql ??? * [ ] - new option for postgresql interpreter: postgresql.completer.schema.filter. Filter schema names loaded into autocompletion (no more garbage schema names). ### What is the Jira issue? * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/ * Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. [ZEPPELIN-533] ### How should this be tested? Outline the steps to test the PR here. ### Screenshots (if appropriate) https://issues.apache.org/jira/secure/attachment/12845228/auto1.JPG https://issues.apache.org/jira/secure/attachment/12845229/auto2.JPG https://issues.apache.org/jira/secure/attachment/12845230/auto3.JPG ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? Yes Author: Sotnichenko Sergey <[email protected]> Closes apache#1886 from sotnich/jdbc-1876 and squashes the following commits: 2db7ed8 [Sotnichenko Sergey] [ZEPPELIN-1876] add support for databases with only catalogs without schemas (like mysql) a048ef2 [Sotnichenko Sergey] [ZEPPELIN-1876] add support for databases with only catalogs without schemas (like mysql) f4b03df [Sotnichenko Sergey] [ZEPPELIN-1876] add support for databases with only catalogs without schemas (like mysql) 675c629 [Sotnichenko Sergey] [ZEPPELIN-1876] Adding licence header 9fac1d0 [Sotnichenko Sergey] [ZEPPELIN-1876] SQLException instead of Throwable 895c35a [Sotnichenko Sergey] [ZEPPELIN-1876] SQLException instead of Throwable 7d40166 [Sotnichenko Sergey] [ZEPPELIN-1876] improved comptetion with schema/table/column separation + sqlcompleter tests


…on + sqlcompleter tests
What is this PR for?
This PR changes autocompletion behaviour in jdbc interpeter.
There are some changes:
What type of PR is it?
Improvement
Todos
What is the Jira issue?
How should this be tested?
Outline the steps to test the PR here.
Screenshots (if appropriate)
https://issues.apache.org/jira/secure/attachment/12845228/auto1.JPG
https://issues.apache.org/jira/secure/attachment/12845229/auto2.JPG
https://issues.apache.org/jira/secure/attachment/12845230/auto3.JPG
Questions: