Code Monkey home page Code Monkey logo

Comments (8)

 avatar commented on June 13, 2024

Previously it was fine, with the latest version i'm getting same warning for similar queries from all over the code base.

from flake8-sql.

 avatar commented on June 13, 2024

There is another query on which it is throwing Q449 token FROM should be aligned to the right of the river

SELECT col1
  FROM table1
 WHERE NOT EXISTS(SELECT col2
                    FROM table2
                   WHERE condtion)

Could that be due to this EXISTS statement?

from flake8-sql.

pgjones avatar pgjones commented on June 13, 2024

Hmm, I'm not sure here - it could be. Could you confirm which version it worked in, and which version you are using now?

from flake8-sql.

 avatar commented on June 13, 2024

Previously 0.2.0 and now 0.4.0.
The case is with every exists query of the same nature.

from flake8-sql.

pgjones avatar pgjones commented on June 13, 2024

I think it is the exists (and also this d1a1000) - as the exists isn't being recognized as a function.

from flake8-sql.

 avatar commented on June 13, 2024

So is this going to be fixed soon? Or if you can point me i might be able to send a fix.

from flake8-sql.

pgjones avatar pgjones commented on June 13, 2024

Very happy for you to send a fix, at the moment I can only point to d1a1000.

from flake8-sql.

 avatar commented on June 13, 2024

I had a look at the function you pointed out, seems like it is working fine (had it debugged). I think the problem is here on this line or below it:

elif not token.is_whitespace and token.value not in ROOT_KEYWORD_DESCRIPTORS:

Debugged this one as well, the values (token col, depth, and previous root values) seems fine to me ( i might not be correct).

Could there be any issue with this condition?

if token.col < previous_root.col + len(previous_root.value) + 1:

Values (debugged):

token: FROM
token.col: 27
token.depth: 1
previous_root: SELECT
previous_root.col: 25
previous_root len+1: 7

By adding the root_keyword condition is not working (failing other scenarios), can you help me out a bit here?

from flake8-sql.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.