Skip to content

google/zetasql

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

--
Change by ZetaSQL Team <no-reply@google.com>:
Updated the zetasql doc for the zetasql release in Sept.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Minor refactoring against c++ resolved ast node generation templates
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by Brandon Dolphin <bdolphin@google.com>:
No public description
--
Change by Christoph Dibak <dibak@google.com>:
Fix rewriting of public groups
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Added `ARG_TYPE_ANY_3` and `ARG_ARRAY_TYPE_ANY_3`.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by Christoph Dibak <dibak@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by Christoph Dibak <dibak@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Refactor ResolvedAggreateScan algebrizer to remove duplicated logic
--
Change by ZetaSQL Team <no-reply@google.com>:
Added more tests to validate that argument aliases are not supported.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Added `argument_alias` fields to `ResolvedFunctionArgument`.
--
Change by ZetaSQL Team <no-reply@google.com>:
Change edit distance implementation to use existing shared library.
--
Change by ZetaSQL Team <no-reply@google.com>:
Add support for null handling in the AggregateFunctionEvaluator interface
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Simplify logic for CASE expression formatting.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Do not include internal alias in UserFacingName for table argument.
--
Change by ZetaSQL Team <no-reply@google.com>:
Adding utility functions `GreaterOrEqual` and `Subtract` to the rewriter utils.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Bugfix for JSON_ARRAY_APPEND and JSON_ARRAY_INSERT.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by Richard Levasseur <rlevasseur@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Added alias validation for function signatures.
--
Change by ZetaSQL Team <no-reply@google.com>:
Add test coverage for conditional evaluation in WITH queries and WITH expressions.
--
Change by ZetaSQL Team <no-reply@google.com>:
Add language feature to support multiway explicit UNNEST syntax
--
Change by ZetaSQL Team <no-reply@google.com>:
Added a new language feature FEATURE_V_1_4_ARRAY_ZIP for the array_zip function.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Add a test case for conditional_evaluation on PIVOT and UNPIVOT
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Add test coverage for anonymization with conditional evaluation
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Replace CHECK with Status return in builtin function registry
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Added alias validation for function signatures.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Move SetFormatValueContentOptions to SQLTestBase protected section.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Moved `GetAliasForExpression` from the resolver code to resolved_ast_helper.h.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Added function_signature_testutil.cc to zetasql allowlist.
--
Change by ZetaSQL Team <no-reply@google.com>:
Added function_signature_testutil.h into zetasql allowlist.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Unify ReferenceDriver constructors.
--
Change by ZetaSQL Team <no-reply@google.com>:
Cleanup some calls to MaybeUpdateErrorMessageWithLocation() with explicit values for keep_error_location_payload.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Add collation support for NULLIF function in the reference implementation.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by Richard Levasseur <rlevasseur@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Add reference implementation of UDFs and templated UDFs without rewriter.
--
Change by ZetaSQL Team <no-reply@google.com>:
Add node_source to ResolvedArrayScan for single table array path shape
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
--
Change by ZetaSQL Team <no-reply@google.com>:
Clean up deprecated function signature.
--
Change by ZetaSQL Team <no-reply@google.com>:
Add topologically sorted generated columns information to the ResolvedInsertStmt.
--
Change by ZetaSQL Team <no-reply@google.com>:
Add a note about module support in docs for UDFs, TVFs, and UDAs.
--
Change by ZetaSQL Team <no-reply@google.com>:
No public description
  (And 57 more changes)

GitOrigin-RevId: 2ff92e98da5ba81417caa763616253336d7d8407
Change-Id: Ib851d471d1bd3d96a36e4996ab25d5c7d381c27b
0b082e8

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

ZetaSQL Language Guide

ZetaSQL ResolvedAST API

ZetaSQL BigQuery Analysis Example

Status of Project and Roadmap

This codebase is being open sourced in multiple phases:

  1. Parser and Analyzer Complete
  2. Reference Implementation In Progress
    • Base capability Complete
    • Function library In Progress
  3. Compliance Tests Complete
    • includes framework for validating compliance of arbitrary engines
  4. Misc tooling
    • Improved Formatter Complete

Multiplatform support is planned for the following platforms:

  • Linux (Ubuntu 20.04 is our reference platform, but others may work).
    • gcc-9+ is required, recent versions of clang may work.
  • MacOS (Experimental)
  • Windows (version TDB)

We do not provide any guarantees of API stability and cannot accept contributions.

Flags

ZetaSQL uses the Abseil Flags library to handle commandline flags. Unless otherwise documented, all flags are for debugging purposes only and may change, stop working or be removed at any time.

How to Build

ZetaSQL uses bazel for building and dependency resolution. After installing bazel (check .bazelversion for the specific version of bazel we test with, but other versions may work), simply run:

bazel build ...

If your Mac build fails due the python error ModuleNotFoundError: no module named 'google.protobuf', run pip install protobuf==<version> to install python protobuf first. The protobuf version can be found in the zetasql_deps_step_2.bzl file.

How to add as a Dependency in bazel

See the (WORKSPACE) file, as it is a little unusual.

With docker

TODO: Add docker build instructions.

Example Usage

A very basic command line tool is available to run simple queries with the reference implementation: bazel run //zetasql/tools/execute_query:execute_query -- "select 1 + 1;"

The reference implementation is not yet completely released and currently supports only a subset of functions and types.

Differential Privacy

For questions, documentation and examples of ZetaSQLs implementation of Differential Privacy, please check out (https://github.com/google/differential-privacy).

Versions

ZetaSQL makes no guarantees regarding compatibility between releases. Breaking changes may be made at any time. Our releases are numbered based on the date of the commit the release is cut from. The number format is YYYY.MM.n, where YYYY is the year, MM is the two digit month, and n is a sequence number within the time period.

License

Apache License 2.0

Support Disclaimer

This is not an officially supported Google product.