You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2019/02/14 08:56:00 UTC

[jira] [Reopened] (IGNITE-7373) Fix style guide violations and imprecise naming in SqlParser-related code

     [ https://issues.apache.org/jira/browse/IGNITE-7373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ozerov reopened IGNITE-7373:
-------------------------------------

> Fix style guide violations and imprecise naming in SqlParser-related code
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-7373
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7373
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.4
>            Reporter: Kirill Shirokov
>            Priority: Minor
>
> SQL parser implementation contains many abbreviation rule violations and names that doesn't reflect the method intention:
> 1. "token" instead of "tok" in variables
> 2. SqlParserUtils.skipIfMatches throws an exception if the token doesn't match, although the name doesn't reflect this. 'accept' or 'skip' without 'if' would be more precise
> 3. SqlKeyword.DEFAULT clashes with SqlParserTokenType.DEFAULT
> 4. SqlParserUtils.skipCommaOrRightParenthesis() can be generalized. It's better to return the token it's met instead of obscure boolean (otherwise the name should reflect the returned type)
> 5. It makes sense to have a method to return the current token. The container can be refactored from SqlLexerLookAheadToken, since lookahead token doesn't need it's own class.
> 6. SqlLexerTokenType.EOF does not mean 'end of FILE'.



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