8 ms·
ZetaSQL – A SQL Analyzer Framework from Google
- gauravphoenix 7y agoIt is somewhat similar to https://calcite.apache.org/ https://calcite.apache.org/ which I like quite a lot. The calcite documentation is top notch as opposed to a bunch of MDs in a directory providing no coherent flow of information.
- dc_gregory 7y agoWe will also be releasing more documentation over time, particular related to developing engines with this framework. Looks like they intend to resolve that.
- midasz 7y agoThe intention is always there
- michaelmior 7y agoThere will hopefully be some integration with Calcite in the future. The ZetaSQL team has been in discussion about this on our mailing list :)
- paxys 7y agoThis is neat, although the docs don't say which (if any) SQL standard it follows.
- ma2rten 7y agoGoogle has it's own internal SQL dialect. It's the same that is also used in Cloud Spanner. I think it's mostly standard complaint, but less feature complete than the standard sql dialects.
- setr 7y agoI’m pretty sure it wouldn’t follow any; I can’t imagine any significant benefit (if you’re not chasing strict compatibility, general SQL should take you more than far enough on the beginner-friendly front) and significant benefit from doing a custom SQL
- paxys 7y agoA benefit of following an established standard is that one can use this not just to write a new engine but also to build internal tooling (static analysis, linters, IDE tools etc.) for an existing one (e.g. MySQL).
- djhaskin987 7y agoWhat significant benefit
- davidjnelson 7y agoThings like late row lookups in mysql that are not an issue in postgres https://explainextended.com/2011/02/11/late-row-lookups-innodb/ https://explainextended.com/2011/02/11/late-row-lookups-inno...
- riffraff 7y agoaren't both executions (mysqls' and postgresqls') acceptable from an SQL point of view? I don't think the SQL standard mandates how the DBMS executes the query. In fact, I seem to remember that was on of the purposes of having an high level language.
- joatmon-snoo 7y agoNot super sure if it follows any of them, but it might be ANSI 2011, since Cloud Spanner SQL is described as "ANSI 2011 with extensions", and I would expect that to be a strict subset of ZetaSQL. For some more context, ZetaSQL is the thing we've standardized our internal systems on, aka F1, Dremel/BigQuery, Spanner (and there's a few others). The F1 Query paper makes a light reference to this in S7.2 http://www.vldb.org/pvldb/vol11/p1835-samwel.pdf http://www.vldb.org/pvldb/vol11/p1835-samwel.pdf. For me, the most valuable feature of it has been that protos are an explicitly defined data type, since we use protos for pretty much everything. Docs: https://github.com/google/zetasql/blob/master/docs/one-pager.md#data-types https://github.com/google/zetasql/blob/master/docs/one-pager... EDIT: BigQuery SQL is described as "compliant with the SQL 2011 standard and has extensions", and I would also expect that to be a strict subset of ZetaSQL.
- robfig 7y agoDirect link to the documentation one-pager: https://github.com/google/zetasql/blob/master/docs/one-pager.md https://github.com/google/zetasql/blob/master/docs/one-pager...
- bpicolo 7y ago> 22365 lines (18045 sloc) 599 KB That is a truly enormous "one-pager". I thought my scroll bar was bugged!
- gonyea 7y agoThis is an in-joke at Google.
- fizwhiz 7y agoTo elaborate: The spirit of a one-pager isn't to cram everything onto "one page", but rather to have a "single document" that contains all the context/content you need instead of having hyperlinks to large swaths of other documents (doing a depth-first search in documentation at Google can be a huge time-sink). Source: Another Googler that wastes time on memegen
- reilly3000 7y agoI have to presume this is in production with the BigQuery web UI. It has brilliant validation and completion, arguably better than Looker. I’d let that framework into my hypothetical SQL UI any old time it likes.
- gigatexal 7y agoI might be a bit slow but what is this exactly? Is it something I could add to a data layer and get SQL semantics from?
- jve 7y agoNo answer to this question. Also interested.
- whoevercares 7y agoFrom my understanding yes, you should be able to just use this library to query against your data, however you might need to write a custom execution planner if you want to run it at scale.
- JulianMorrison 7y agoSQL parser. Input: text in a standardized SQL dialect, output: a data structure describing what the user wants done.
- gigatexal 7y agoThat is really cool. I’ve been looking for this
- malkia 7y agoWasn't this internally called "GoogleSQL" - sorry was 2 years back, all I remember was switching one syntax to another, and certain things easier in previous syntax, but not well defined, and vice versa...
- azurezyq 7y agoStill using Dremel SQL occasionally and I tend to agree that certain things are easier in Dremel SQL. But it's a canonical example of continuously applying convenient patches making things worse. While something is easier to write, expressing something else becomes impossible. Examples are complicated Protos with multiple layers of repeated/map/struct stuffs... With Google SQL, it's really verbose but a conceptually coherent design just gives you less surprises. I'd say I like the latter more.
- rkagerer 7y agoSeeing as this introduces a language, a couple examples on the landing page wouldn't be a bad idea.
- blurredlines 7y agoDoes it support Druid as engine? Is it possible to connect it with Metatron Discovery? https://github.com/metatron-app/metatron-discovery https://github.com/metatron-app/metatron-discovery
- rosest962500 7y agoOkay, the above posts are really incredible and very helpful. However, I want to discuss some useful tips to fix a Samsung printer. Check the guide https://errorcode0x.com/fixed-samsung-printer-error-code-u1-2320/ https://errorcode0x.com/fixed-samsung-printer-error-code-u1-... and fix it with the help of some easy steps.
- deleted 7y ago[deleted]