Skip to content
ZetaSQL - Analyzer Framework for SQL
Branch: master
Clone or download
ZetaSQL Team and apilloud Export of internal ZetaSQL changes.
  - Internal Change by ZetaSQL Team <>
  - Fix broken googletest dependency by Matthew Brown <>
  - add sha256 on (primary) dependencies of ZetaSQL by Matthew Brown <>
  - Internal Change by ZetaSQL Team <>
  - Internal Change by ZetaSQL Team <>

GitOrigin-RevId: 5121a4eead163cbadd6173c780f0f43c67be4332
Change-Id: I6a81a030eae23496aee5f425259bb7086f7e76e7
Latest commit 2067adf Apr 24, 2019

ZetaSQL - Analyzer Framework for SQL

ZetaSQL defines a language (grammar, types, data model, and semantics) as well as a parser and analyzer. It is not itself a database or query engine. Instead it is intended to be used by multiple engines wanting to provide consistent behavior for all semantic analysis, name resolution, type checking, implicit casting, etc. Specific query engines may not implement all features in the ZetaSQL language and may give errors if specific features are not supported. For example, engine A may not support any updates and engine B may not support analytic functions.

Status of Project and Roadmap

This codebase is being open sourced in multiple phases:

  1. Parser and Analyzer Complete
  • Initial release includes only a subset of tests
  1. Reference Implementation
  2. Compliance Tests
  • includes framework for validating compliance of arbitrary engines
  1. Misc tooling

Until all this code is released, we cannot provide any guarantees of API stability and cannot accept contributions. We will also be releasing more documentation over time, particular related to developing engines with this framework. Documentation on the language itself is fairly complete.

How to Build

ZetaSQL uses bazel for building and (most) dependency resolution. However, the following packages must be installed separately:

bison (>=3.1)

  • For instance, apt-get install bison flex (>=2.6.1)
  • For instance, apt-get install flex

Then simply run: bazel build zetasql/...

With docker

TODO: Add docker build script.


Apache License 2.0

You can’t perform that action at this time.