Code Monkey home page Code Monkey logo

druid-sql-parser's People

Contributors

mcbrewster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nwa2018

druid-sql-parser's Issues

Numbers don't seem to be supported as part of field / table names

If I feed the following query to the parser it will break:

select x2 from y

The error:

    throw peg$buildStructuredError(
    ^
SyntaxError: Expected "'", "(", "*", "AS", "CASE", "DISTINCT", "FROM", "GROUP BY", "HAVING", "LIMIT", "ORDER BY", "UNION ALL", "WHERE", "\"", [ \t\n\r(),;], [a-zA-Z_.], [a-z_], or end of input but "2" found.

Nested functions seem to not translate well

Suppose I am trying to parse the following query:

const ast = parser.parse('select concat(count(x), y) from z');

The way I see it when I parse it I should get ast.selectParts be an array with a length of 1, however it has a length of 2, and the first element it considers to be a constant with the value "concat", equivalent to if I had wrote 'select "concat"...'. The second argument also doesn't seem to be correctly deduced, it says it is a function with 2 arguments, and those arguments are x and y.

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.