Giter Club home page Giter Club logo

Comments (1)

cswinter avatar cswinter commented on June 27, 2024 2

I've tried to stick to standard SQL for the most part, though there's a lot of constructs that LocustDB doesn't support mainly because it would just be a lot of work to implement all of them. There are two places I'm aware of where LoustDB currently diverges from ANSI SQL in a significant way.

GROUP BY: LocustDB currently doesn't support explicit GROUP BY clauses, and instead implicitly performs GROUP BY of any non-aggregation expression if your query contains an aggregation expression. So e.g. SELECT COUNT(1), page, date FROM pageviews is implicitly transformed into SELECT COUNT(1), page, date FROM pageviews GROUP BY page, date. There's no fundamental reason for this other than that it seemed more elegant and I didn't want to type redundant GROUP BY clauses, I think it would actually be a good idea to allow normal GROUP BY clauses. The hard part here is checking that the GROUP BY clause is compatible with the projections which is not something that is currently implemented and is quite tricky to do unless you just require the GROUP BY expressions and corresponding SELECT expressions to be identical. I just created an issue for this: #140

NULL: Since LocustDB does not require a schema and is designed to allow all partitions to process data in parallel, missing columns must have the exact same semantics as columns with NULL values (assuming that missing values are represented as NULL as is currently the case). I'm not sure it affects the current feature set and it's been a while since I've through this but I think this forces NULL have to work slightly differently than in ANSI SQL.

LocustDB uses sqlparser-rs with the GenericDialect for parsing so for the supported subset of queries it should match ANSI SQL fairly closely at least at the syntax level. Are there any particular queries you ran into where LocustDB differs from ANSI SQL? The intent is to match ANSI SQL semantics/syntax whenever possible so I would consider any unnecessary divergences to be a bug. There may be some edge cases where ANSI SQL semantics are fundamentally incompatible with LocustDB's design which ought to be at least documented at some point.

from locustdb.

Related Issues (20)

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.