ZetaSQL – A SQL Analyzer Framework from Google

  • 时间: 2019-05-22 11:57:45

ZetaSQL - Analyzer Framework for SQL

ZetaSQL defines a language (grammar, types, data model, and semantics) as wellas a parser and analyzer. It is not itself a database or query engine. Insteadit is intended to be used by multiple engines wanting to provide consistentbehavior for all semantic analysis, name resolution, type checking, implicitcasting, etc. Specific query engines may not implement all features in theZetaSQL language and may give errors if specific features are not supported. Forexample, engine A may not support any updates and engine B may not supportanalytic 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 APIstability and cannot accept contributions. We will also be releasing moredocumentation over time, particular related to developing engines with thisframework. Documentation on the languageitself is fairlycomplete.

How to Build

ZetaSQL uses bazelfor building and (most) dependencyresolution. However, the following packages must be installed separately:

bison (>=3.1)

apt-get install bisonapt-get install flex

Then simply run:bazel build zetasql/...

With docker

TODO: Add docker build script.

License

Apache License 2.0