Comments (1)
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)
- Fix usages of `unsafe` related to hard-to-model lifetimes
- Perform merging of select queries by constructing and executing query plan
- Expand cases where intermediary results can be streamed between operators
- Columns in query output are not always in same order as projections in query
- Revisit choice of hash functions during hash grouping HOT 1
- Query planner chooses names for anonymous result columns that might be identical to existing ones HOT 4
- Fix performance regression in benchmark case
- String packed columns break things
- Unable to build `LocustDB` on Mac OS X HOT 4
- Logo? HOT 3
- Queries that have type errors or reference missing columns should give helpful errors/warnings HOT 7
- Order by string column fails with `top_n_asc not supported for type ScalarStr` HOT 4
- Support window functions like row_number() HOT 4
- Default ordering of index columns and inserts to the already existing data HOT 1
- Allow simple GROUP BY clauses
- It does not work at all. HOT 3
- Is the project still alive? HOT 1
- ORDER BY clause referencing named column crashes
- 'cargo test' panic - test_group_by_nullable attempt to add with overflow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locustdb.