
ZetaSQL – A SQL Analyzer Framework from Google - obahareth
https://github.com/google/zetasql
======
gauravphoenix
It 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

        We will also be releasing more documentation over time,
        particular related to developing engines with this framework.
    

Looks like they intend to resolve that.

~~~
midasz
The intention is always there

------
robfig
Direct link to the documentation one-pager:
[https://github.com/google/zetasql/blob/master/docs/one-
pager...](https://github.com/google/zetasql/blob/master/docs/one-pager.md)

~~~
bpicolo
> 22365 lines (18045 sloc) 599 KB

That is a truly enormous "one-pager". I thought my scroll bar was bugged!

~~~
gonyea
This is an in-joke at Google.

~~~
fizwhiz
To 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

~~~
kkarakk
company whose verb has come to mean "to search" has employees who dislike
search

~~~
hu3
Or maybe they just value an easy-to-use CTRL+F search

------
gigatexal
I 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?

~~~
JulianMorrison
SQL parser. Input: text in a standardized SQL dialect, output: a data
structure describing what the user wants done.

~~~
gigatexal
That is really cool. I’ve been looking for this

------
reilly3000
I 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.

------
paxys
This is neat, although the docs don't say which (if any) SQL standard it
follows.

~~~
setr
I’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

~~~
djhaskin987
What significant benefit

~~~
davidjnelson
Things like late row lookups in mysql that are not an issue in postgres
[https://explainextended.com/2011/02/11/late-row-lookups-
inno...](https://explainextended.com/2011/02/11/late-row-lookups-innodb/)

~~~
riffraff
aren'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.

------
rkagerer
Seeing as this introduces a language, a couple examples on the landing page
wouldn't be a bad idea.

------
blurredlines
Does 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)

------
malkia
Wasn'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
Still 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.

