You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2018/08/21 09:15:00 UTC

[jira] [Comment Edited] (CALCITE-2433) SqlAdvisor.getCompletionHints is hard-coded for " quoting

    [ https://issues.apache.org/jira/browse/CALCITE-2433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16587196#comment-16587196 ] 

Vladimir Sitnikov edited comment on CALCITE-2433 at 8/21/18 9:14 AM:
---------------------------------------------------------------------

[~julianhyde], I have squashed the PR, so there's one commit per issue now.

Could you please review?  https://github.com/apache/calcite/pull/773


{quote}work backwards from what you would like to see in the [release noteshttps://calcite.apache.org/docs/history.html]{quote}
That depends on *where* one puts the link in the changelog.

From my point of view, "New features" should list features in a positive way (e.g. "support CockroachDB as a backend").
On the other hand, "Bug-fixes" should list items as they *are seen by the end user*. For instance, "fixed NPE in lookupFromHints where FROM is empty" is much much cleaner than "support queries with empty FROM for completion hints".
NPE-kind of description provides reader with immediate feedback if (s)he had seen the issue earlier or not. On the other hand, the description of "support queries with empty FROM for completion hints" does not provide a clue on "what happened before with those kind of queries".

In other words, negated description sometimes provides much more information to the reader. 

On the other hand, I just want to get the thing pushed (and released), so whatever you prefer here.



was (Author: vladimirsitnikov):
[~julianhyde], I have squashed the PR, so there's one commit per issue now.

Could you please review?  https://github.com/apache/calcite/pull/773


{quote}work backwards from what you would like to see in the [release noteshttps://calcite.apache.org/docs/history.html]{quote}
That depends on *where* one puts the link in the changelog.

From my point of view, "New features" should list features in a positive way (e.g. "support CocroachDB as a backend").
On the other hand, "Bug-fixes" should list items as they *are seen by the end user*. For instance, "fixed NPE in lookupFromHints where FROM is empty" is much much cleaner than "support queries with empty FROM for completion hints".
NPE-kind of description provides reader with immediate feedback if (s)he had seen the issue earlier or not. On the other hand, the description of "support queries with empty FROM for completion hints" does not provide a clue on "what happened before with those kind of queries".

In other words, negated description sometimes provides much more information to the reader. 

On the other hand, I just want to get the thing pushed (and released), so whatever you prefer here.


> SqlAdvisor.getCompletionHints is hard-coded for " quoting
> ---------------------------------------------------------
>
>                 Key: CALCITE-2433
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2433
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>
> Relevant source:
> {code:java}
>     boolean quoted = false;
>     while (wordStart > 0
>         && Character.isJavaIdentifierPart(sql.charAt(wordStart - 1))) {
>       --wordStart;
>     }
>     if ((wordStart > 0)
>         && (sql.charAt(wordStart - 1) == '"')) { // <-- It should get quoting from the connection
>       quoted = true;
>       --wordStart;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)