Showing preview only (7,729K chars total). Download the full file or copy to clipboard to get everything.
Repository: tobymao/sqlglot
Branch: main
Commit: f7bb6bea86c1
Files: 264
Total size: 7.3 MB
Directory structure:
gitextract_0kn1s5v0/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── scripts/
│ │ ├── get_integration_test_params.py
│ │ └── integration_tests_sync.sh
│ └── workflows/
│ ├── benchmark-sqlglot.yml
│ ├── package-publish.yml
│ ├── package-test.yml
│ └── run-integration-tests.yml
├── .gitignore
├── .gitmodules
├── .gitpod.yml
├── .pre-commit-config.yaml
├── AGENTS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── Makefile
├── README.md
├── benchmarks/
│ ├── __init__.py
│ ├── compare.py
│ ├── optimize.py
│ └── parse.py
├── pdoc/
│ ├── cli.py
│ └── templates/
│ └── module.html.jinja2
├── posts/
│ ├── ast_primer.md
│ ├── onboarding.md
│ ├── python_sql_engine.md
│ └── sql_diff.md
├── pyproject.toml
├── setup.cfg
├── setup.py
├── sqlglot/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _typing.py
│ ├── dialects/
│ │ ├── __init__.py
│ │ ├── athena.py
│ │ ├── bigquery.py
│ │ ├── clickhouse.py
│ │ ├── databricks.py
│ │ ├── dialect.py
│ │ ├── doris.py
│ │ ├── dremio.py
│ │ ├── drill.py
│ │ ├── druid.py
│ │ ├── duckdb.py
│ │ ├── dune.py
│ │ ├── exasol.py
│ │ ├── fabric.py
│ │ ├── hive.py
│ │ ├── materialize.py
│ │ ├── mysql.py
│ │ ├── oracle.py
│ │ ├── postgres.py
│ │ ├── presto.py
│ │ ├── prql.py
│ │ ├── redshift.py
│ │ ├── risingwave.py
│ │ ├── singlestore.py
│ │ ├── snowflake.py
│ │ ├── solr.py
│ │ ├── spark.py
│ │ ├── spark2.py
│ │ ├── sqlite.py
│ │ ├── starrocks.py
│ │ ├── tableau.py
│ │ ├── teradata.py
│ │ ├── trino.py
│ │ └── tsql.py
│ ├── diff.py
│ ├── errors.py
│ ├── executor/
│ │ ├── __init__.py
│ │ ├── context.py
│ │ ├── env.py
│ │ ├── python.py
│ │ └── table.py
│ ├── expressions/
│ │ ├── __init__.py
│ │ ├── aggregate.py
│ │ ├── array.py
│ │ ├── builders.py
│ │ ├── constraints.py
│ │ ├── core.py
│ │ ├── datatypes.py
│ │ ├── ddl.py
│ │ ├── dml.py
│ │ ├── functions.py
│ │ ├── json.py
│ │ ├── math.py
│ │ ├── properties.py
│ │ ├── query.py
│ │ ├── string.py
│ │ └── temporal.py
│ ├── generator.py
│ ├── helper.py
│ ├── jsonpath.py
│ ├── lineage.py
│ ├── optimizer/
│ │ ├── __init__.py
│ │ ├── annotate_types.py
│ │ ├── canonicalize.py
│ │ ├── eliminate_ctes.py
│ │ ├── eliminate_joins.py
│ │ ├── eliminate_subqueries.py
│ │ ├── isolate_table_selects.py
│ │ ├── merge_subqueries.py
│ │ ├── normalize.py
│ │ ├── normalize_identifiers.py
│ │ ├── optimize_joins.py
│ │ ├── optimizer.py
│ │ ├── pushdown_predicates.py
│ │ ├── pushdown_projections.py
│ │ ├── qualify.py
│ │ ├── qualify_columns.py
│ │ ├── qualify_tables.py
│ │ ├── resolver.py
│ │ ├── scope.py
│ │ ├── simplify.py
│ │ └── unnest_subqueries.py
│ ├── parser.py
│ ├── parsers/
│ │ ├── __init__.py
│ │ ├── athena.py
│ │ ├── base.py
│ │ ├── bigquery.py
│ │ ├── clickhouse.py
│ │ ├── databricks.py
│ │ ├── doris.py
│ │ ├── dremio.py
│ │ ├── drill.py
│ │ ├── druid.py
│ │ ├── duckdb.py
│ │ ├── dune.py
│ │ ├── exasol.py
│ │ ├── fabric.py
│ │ ├── hive.py
│ │ ├── materialize.py
│ │ ├── mysql.py
│ │ ├── oracle.py
│ │ ├── postgres.py
│ │ ├── presto.py
│ │ ├── prql.py
│ │ ├── redshift.py
│ │ ├── risingwave.py
│ │ ├── singlestore.py
│ │ ├── snowflake.py
│ │ ├── solr.py
│ │ ├── spark.py
│ │ ├── spark2.py
│ │ ├── sqlite.py
│ │ ├── starrocks.py
│ │ ├── tableau.py
│ │ ├── teradata.py
│ │ ├── trino.py
│ │ └── tsql.py
│ ├── planner.py
│ ├── py.typed
│ ├── schema.py
│ ├── serde.py
│ ├── time.py
│ ├── tokenizer_core.py
│ ├── tokens.py
│ ├── transforms.py
│ ├── trie.py
│ └── typing/
│ ├── __init__.py
│ ├── bigquery.py
│ ├── clickhouse.py
│ ├── duckdb.py
│ ├── hive.py
│ ├── mysql.py
│ ├── presto.py
│ ├── redshift.py
│ ├── snowflake.py
│ ├── spark.py
│ ├── spark2.py
│ └── tsql.py
├── sqlglotc/
│ ├── MANIFEST.in
│ ├── pyproject.toml
│ └── setup.py
└── tests/
├── __init__.py
├── dialects/
│ ├── __init__.py
│ ├── test_athena.py
│ ├── test_bigquery.py
│ ├── test_clickhouse.py
│ ├── test_databricks.py
│ ├── test_dialect.py
│ ├── test_doris.py
│ ├── test_dremio.py
│ ├── test_drill.py
│ ├── test_druid.py
│ ├── test_duckdb.py
│ ├── test_dune.py
│ ├── test_exasol.py
│ ├── test_fabric.py
│ ├── test_hive.py
│ ├── test_materialize.py
│ ├── test_mysql.py
│ ├── test_oracle.py
│ ├── test_pipe_syntax.py
│ ├── test_postgres.py
│ ├── test_presto.py
│ ├── test_prql.py
│ ├── test_redshift.py
│ ├── test_risingwave.py
│ ├── test_singlestore.py
│ ├── test_snowflake.py
│ ├── test_solr.py
│ ├── test_spark.py
│ ├── test_sqlite.py
│ ├── test_starrocks.py
│ ├── test_tableau.py
│ ├── test_teradata.py
│ ├── test_trino.py
│ └── test_tsql.py
├── fixtures/
│ ├── identity.sql
│ ├── jsonpath/
│ │ ├── LICENSE
│ │ └── cts.json
│ ├── optimizer/
│ │ ├── annotate_functions.sql
│ │ ├── annotate_types.sql
│ │ ├── canonicalize.sql
│ │ ├── eliminate_ctes.sql
│ │ ├── eliminate_joins.sql
│ │ ├── eliminate_subqueries.sql
│ │ ├── isolate_table_selects.sql
│ │ ├── merge_subqueries.sql
│ │ ├── normalize.sql
│ │ ├── normalize_identifiers.sql
│ │ ├── optimize_joins.sql
│ │ ├── optimizer.sql
│ │ ├── pushdown_cte_alias_columns.sql
│ │ ├── pushdown_predicates.sql
│ │ ├── pushdown_projections.sql
│ │ ├── qualify_columns.sql
│ │ ├── qualify_columns__invalid.sql
│ │ ├── qualify_columns__with_invisible.sql
│ │ ├── qualify_columns_ddl.sql
│ │ ├── qualify_tables.sql
│ │ ├── quote_identifiers.sql
│ │ ├── simplify.sql
│ │ ├── tpc-ds/
│ │ │ └── tpc-ds.sql
│ │ ├── tpc-h/
│ │ │ └── tpc-h.sql
│ │ └── unnest_subqueries.sql
│ ├── partial.sql
│ └── pretty.sql
├── gen_fixtures.py
├── helpers.py
├── test_build.py
├── test_dialect_entry_points.py
├── test_dialect_imports.py
├── test_diff.py
├── test_docs.py
├── test_errors.py
├── test_executor.py
├── test_expressions.py
├── test_generator.py
├── test_helper.py
├── test_integration_loader.py
├── test_jsonpath.py
├── test_lineage.py
├── test_optimizer.py
├── test_parser.py
├── test_schema.py
├── test_serde.py
├── test_time.py
├── test_tokens.py
├── test_transforms.py
└── test_transpile.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Before you file an issue**
- Make sure you specify the "read" dialect eg. `parse_one(sql, read="spark")`
- Make sure you specify the "write" dialect eg. `ast.sql(dialect="duckdb")`
- Check if the issue still exists on main
**Fully reproducible code snippet**
Please include a fully reproducible code snippet or the input sql, dialect, and expected output.
**Official Documentation**
Please include links to official SQL documentation related to your issue.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/scripts/get_integration_test_params.py
================================================
#!/usr/bin/env python3
"""
This script is intended to be used as part of a GitHub Actions workflow in order to decide if the integration tests should:
a) be triggered at all
b) if they should be triggered, should they be triggered for a subset of dialects or all dialects?
The tests can be triggered manually by using the following directive in the PR description:
/integration-tests
To limit them to a certain dialect or dialects, you can specify:
/integration-tests dialects=bigquery,duckdb
If you specify nothing, a `git diff` will be performed between your PR branch and the base branch.
If any files modified contain one of the SUPPORTED_DIALECTS in the filename, that dialect will be added to the
list of dialects to test. If no files match, the integration tests will be skipped.
Note that integration tests in the remote workflow are only implemented for a subset of dialects.
If new ones are added, update the SUPPORTED_DIALECTS constant below.
Each dialect is tested against itself (roundtrip) and duckdb (transpilation).
Supplying a dialect not in this list will cause the tests to get skipped.
"""
import typing as t
import os
import sys
import json
import subprocess
from pathlib import Path
TRIGGER = "/integration-test"
SUPPORTED_DIALECTS = ["duckdb", "bigquery", "snowflake"]
def get_dialects_from_manual_trigger(trigger: str) -> t.Set[str]:
"""
Takes a trigger string and parses out the supported dialects
/integration_test -> []
/integration_test dialects=bigquery -> ["bigquery"]
/integration_test dialects=bigquery,duckdb -> ["bigquery","duckdb"]
/integration_test dialects=exasol,duckdb -> ["duckdb"]
"""
if not trigger.startswith(TRIGGER):
raise ValueError(f"Invalid trigger: {trigger}")
# trim off start at first space (to cover both /integration-test and /integration-tests)
trigger_parts = trigger.split(" ")[1:]
print(f"Parsing trigger args: {trigger_parts}")
dialects: t.List[str] = []
for part in trigger_parts:
# try to parse key=value pairs
maybe_kv = part.split("=", maxsplit=1)
if len(maybe_kv) >= 2:
k, v = maybe_kv[0], maybe_kv[1]
if k.lower().startswith("dialect"):
dialects.extend([d.lower().strip() for d in v.split(",")])
return {d for d in dialects if d in SUPPORTED_DIALECTS}
def get_dialects_from_git(base_ref: str, current_ref: str) -> t.Set[str]:
"""
Takes two git refs and runs `git diff --name-only <base_ref> <current_ref>`
If any of the returned file names contain a dialect from SUPPORTED_DIALECTS as
a substring, that dialect is included in the returned set
"""
print(f"Checking for files changed between '{base_ref}' and '{current_ref}'")
result = subprocess.run(
["git", "diff", "--name-only", base_ref, current_ref],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
output = result.stdout.decode("utf8")
if result.returncode != 0:
raise ValueError(f"Git process failed with exit code {result.returncode}:\n{output}")
print(f"Git output:\n{output}")
matching_dialects = []
for l in output.splitlines():
l = l.strip().lower()
matching_dialects.extend([d for d in SUPPORTED_DIALECTS if d in l])
return set(matching_dialects)
if __name__ == "__main__":
github_event_path = os.environ.get("GITHUB_EVENT_PATH")
github_output = os.environ.get("GITHUB_OUTPUT")
if not os.environ.get("GITHUB_ACTIONS") or not github_event_path or not github_output:
print("This script needs to run within GitHub Actions")
sys.exit(1)
github_event_path = Path(github_event_path)
github_output = Path(github_output)
with github_event_path.open("r") as f:
event: t.Dict[str, t.Any] = json.load(f)
print("Handling event: \n" + json.dumps(event, indent=2))
# for pull_request events, the body is located at github.event.pull_request.body
pr_description: str = event.get("pull_request", {}).get("body") or ""
dialects = []
should_run = False
pr_description_lines = [l.strip().lower() for l in pr_description.splitlines()]
if trigger_line := [l for l in pr_description_lines if l.startswith(TRIGGER)]:
# if the user has explicitly requested /integration-tests then use that
print(f"Handling trigger line: {trigger_line[0]}")
dialects = get_dialects_from_manual_trigger(trigger_line[0])
should_run = True
else:
# otherwise, do a git diff and inspect the changed files
print("Explicit trigger line not detected; performing git diff")
pull_request_base_ref = event.get("pull_request", {}).get("base", {}).get("sha")
if not pull_request_base_ref:
raise ValueError("Unable to determine base ref")
current_ref = event.get("pull_request", {}).get("head", {}).get("sha")
if not current_ref:
raise ValueError("Unable to determine current/head ref")
print(f"Comparing '{current_ref}' against '{pull_request_base_ref}'")
# otherwise, look at git files changed and only trigger if a file relating
# to a supported dialect has changed
dialects = get_dialects_from_git(base_ref=pull_request_base_ref, current_ref=current_ref)
if dialects:
should_run = True
if should_run:
dialects_str = (
f"the following dialects: {', '.join(dialects)}"
if dialects
else "all supported dialects"
)
print(f"Conclusion: should run tests for {dialects_str}")
else:
print("Conclusion: No tests to run")
# write output variables
lines = []
if should_run:
lines.append("skip=false")
if dialects:
lines.append(f"dialects={','.join(dialects)}")
else:
lines.append("skip=true")
with github_output.open("a") as f:
f.writelines(f"{l}\n" for l in lines)
================================================
FILE: .github/scripts/integration_tests_sync.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
# Unset git env vars that leak from parent hook context into submodule commands
unset GIT_INDEX_FILE GIT_DIR
SUBMODULE_DIR="sqlglot-integration-tests"
# Graceful no-op when the submodule is absent (public contributors)
[ -e "$SUBMODULE_DIR/.git" ] || exit 0
# Ensure the submodule is on a branch matching the parent's branch name.
# Creates the branch if it doesn't exist.
ensure_branch() {
local branch
branch=$(git rev-parse --abbrev-ref HEAD)
[ "$branch" = "HEAD" ] && return 0
local current
current=$(git -C "$SUBMODULE_DIR" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
if [ "$current" != "$branch" ]; then
# Stash any uncommitted/untracked changes so branch switch doesn't fail
local stashed=0
if [ -n "$(git -C "$SUBMODULE_DIR" status --porcelain)" ]; then
git -C "$SUBMODULE_DIR" stash push --include-untracked --quiet 2>/dev/null && stashed=1
fi
if git -C "$SUBMODULE_DIR" show-ref --verify --quiet "refs/heads/$branch"; then
git -C "$SUBMODULE_DIR" checkout "$branch" --quiet
else
git -C "$SUBMODULE_DIR" checkout -b "$branch" --quiet
fi
# Restore stashed changes on the new branch
if [ "$stashed" = "1" ]; then
git -C "$SUBMODULE_DIR" stash pop --quiet 2>/dev/null || true
fi
fi
}
case "${1:-}" in
checkout)
# No-op: branch creation is deferred to commit/post-commit to avoid
# creating empty branches when switching parent branches.
;;
commit)
# Skip if submodule has no changes
[ -n "$(git -C "$SUBMODULE_DIR" status --porcelain)" ] || exit 0
# Only auto-commit submodule changes when the submodule pointer is already
# staged in the parent (i.e. the user explicitly `git add`-ed it). This
# prevents surprise commits of unrelated WIP in the submodule working tree.
git diff --cached --quiet -- "$SUBMODULE_DIR" && exit 0
ensure_branch
if [ -n "$(git -C "$SUBMODULE_DIR" status --porcelain)" ]; then
BRANCH=$(git rev-parse --abbrev-ref HEAD)
git -C "$SUBMODULE_DIR" add -A
git -C "$SUBMODULE_DIR" commit -m "Sync: $BRANCH"
fi
# Stage the updated submodule pointer in the parent
if ! git diff --quiet -- "$SUBMODULE_DIR"; then
git add "$SUBMODULE_DIR"
fi
;;
post-commit)
# The pre-commit framework's stashing undoes submodule changes made during
# pre-commit. Re-commit the submodule and amend the parent to include it.
# Only act if the most recent parent commit references the submodule. This
# prevents the post-commit hook from auto-committing unrelated submodule WIP
# (e.g. when switching branches or pulling on main).
if ! git diff-tree --no-commit-id --name-only -r HEAD | grep -q "^${SUBMODULE_DIR}$"; then
exit 0
fi
# Skip if submodule has no changes and pointer is up to date
if [ -z "$(git -C "$SUBMODULE_DIR" status --porcelain)" ] && git diff --quiet -- "$SUBMODULE_DIR"; then
exit 0
fi
ensure_branch
if [ -n "$(git -C "$SUBMODULE_DIR" status --porcelain)" ]; then
BRANCH=$(git rev-parse --abbrev-ref HEAD)
git -C "$SUBMODULE_DIR" add -A
git -C "$SUBMODULE_DIR" commit -m "Sync: $BRANCH"
fi
if ! git diff --quiet -- "$SUBMODULE_DIR"; then
git add "$SUBMODULE_DIR"
git commit --amend --no-edit --no-verify
fi
;;
push)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
case "$BRANCH" in main|master) exit 0 ;; esac
ensure_branch
cd "$SUBMODULE_DIR"
# Check if there are local commits to push
if git rev-parse --verify "@{upstream}" >/dev/null 2>&1; then
UNPUSHED=$(git rev-list --count "@{upstream}..HEAD")
else
UNPUSHED=$(git rev-list --count "origin/main..HEAD" 2>/dev/null || echo "0")
fi
[ "$UNPUSHED" = "0" ] && exit 0
# Push the branch, rebasing first if needed
git push -u origin "$BRANCH" 2>/dev/null || {
git pull --rebase --autostash || {
git rebase --abort 2>/dev/null || true
echo "ERROR: Conflicts pushing integration tests. Resolve with:" >&2
echo " cd $SUBMODULE_DIR && git pull --rebase" >&2
exit 1
}
git push -u origin "$BRANCH"
}
# Create a PR if one doesn't exist (requires gh CLI)
if command -v gh >/dev/null 2>&1; then
EXISTING=$(gh pr list --head "$BRANCH" --json number --jq 'length' 2>/dev/null || echo "0")
if [ "$EXISTING" = "0" ]; then
PARENT_URL=$(git -C .. remote get-url origin 2>/dev/null | sed 's/\.git$//' | sed 's|git@github.com:|https://github.com/|')
BODY="Parent branch: ${PARENT_URL}/tree/${BRANCH}"
gh pr create \
--title "$BRANCH" \
--body "$BODY" \
--head "$BRANCH" 2>/dev/null || true
fi
fi
;;
merge)
# Sync submodule to the parent's pointer
git submodule update --init 2>/dev/null || true
ensure_branch
cd "$SUBMODULE_DIR"
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "HEAD")
[ "$BRANCH" = "HEAD" ] && exit 0
git fetch origin --quiet 2>/dev/null || exit 0
BEHIND=$(git rev-list --count "HEAD..origin/$BRANCH" 2>/dev/null || echo "0")
[ "$BEHIND" = "0" ] && exit 0
if ! git pull --rebase --autostash --quiet 2>/dev/null; then
git rebase --abort 2>/dev/null || true
echo "WARNING: Rebase conflicts in $SUBMODULE_DIR." >&2
echo "Resolve with: cd $SUBMODULE_DIR && git pull --rebase" >&2
fi
;;
*)
echo "Usage: $0 {checkout|commit|post-commit|push|merge}" >&2
exit 1
;;
esac
================================================
FILE: .github/workflows/benchmark-sqlglot.yml
================================================
name: Benchmark pull requests
on:
pull_request:
types: [opened]
issue_comment:
types: [created]
jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: >
(github.event_name == 'pull_request') ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/benchmark'))
steps:
- name: Checkout PR branch
uses: actions/checkout@v5
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || '' }}
- name: Checkout PR branch (comment trigger)
if: github.event_name == 'issue_comment'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_NUMBER=${{ github.event.issue.number }}
PR_HEAD=$(gh pr view $PR_NUMBER --json headRefName -q .headRefName)
git fetch origin "$PR_HEAD"
git checkout "$PR_HEAD"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install dependencies (PR)
run: |
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
make install-devc-release
- name: Benchmark PR branch
run: |
source .venv/bin/activate
python benchmarks/parse.py --json bench_pr.json --quiet --sqlglot-only
- name: Checkout main branch
run: |
git fetch origin main
git worktree add main-branch origin/main
- name: Install dependencies (main)
run: |
rm -rf .venv
python -m venv .venv
source .venv/bin/activate
cd main-branch
pip install -e ".[dev]"
make install-devc-release
- name: Benchmark main branch
run: |
source .venv/bin/activate
cd main-branch
python benchmarks/parse.py --json ../bench_main.json --quiet --sqlglot-only
- name: Compare results
run: |
source .venv/bin/activate
python benchmarks/compare.py bench_main.json bench_pr.json > benchmark_comment.md
- name: Comment on PR
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.issue.number || github.event.pull_request.number }}
body-path: benchmark_comment.md
================================================
FILE: .github/workflows/package-publish.yml
================================================
name: Publish sqlglot to PyPI
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
# Build mypyc wheels for each platform and Python version.
build-wheels:
name: Build wheels (${{ matrix.platform.os }}, ${{ matrix.platform.archs }}, ${{ matrix.python }})
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
python: ["cp39", "cp310", "cp311", "cp312", "cp313", "cp314"]
platform:
- os: ubuntu-latest
archs: x86_64
- os: ubuntu-24.04-arm
archs: aarch64
- os: macos-latest
archs: universal2
- os: windows-latest
archs: AMD64
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: pypa/cibuildwheel@v3.3.1
with:
package-dir: sqlglotc
output-dir: wheelhouse
env:
CIBW_BUILD: ${{ matrix.python }}-*
CIBW_SKIP: "*-musllinux_*"
CIBW_ARCHS: ${{ matrix.platform.archs }}
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.platform.os }}-${{ matrix.platform.archs }}-${{ matrix.python }}
path: ./wheelhouse/*.whl
# Build the sqlglotc sdist (source-only, no wheels — always compiles on install).
sdist-c:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build tools
run: pip install build
- name: Build sdist
run: |
cd sqlglotc
python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sqlglotc-sdist
path: sqlglotc/dist/*.tar.gz
# Publish sqlglotc wheels and sdist to PyPI.
publish-sqlglotc:
needs: [build-wheels, sdist-c]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist/
merge-multiple: true
- uses: actions/download-artifact@v4
with:
name: sqlglotc-sdist
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
# Publish the main sqlglot package.
deploy:
needs: publish-sqlglotc
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m venv .venv
source ./.venv/bin/activate
python -m pip install --upgrade pip
pip install build twine
make install-dev
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
source ./.venv/bin/activate
python -m build
twine upload dist/*
- name: Update CHANGELOG
id: changelog
continue-on-error: true
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Commit CHANGELOG.md
continue-on-error: true
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: "Update CHANGELOG.md for ${{ github.ref_name }} [skip ci]"
file_pattern: "CHANGELOG.md"
- name: Update API docs
run: |
source ./.venv/bin/activate
make docs
echo "sqlglot.com" > docs/CNAME
mv docs /tmp/generated-docs
git checkout -B api-docs origin/main
rm -rf docs
mv /tmp/generated-docs docs
- name: Commit API docs
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: api-docs
commit_message: 'Update API docs for ${{ github.ref_name }} [skip ci]'
file_pattern: 'docs'
push_options: '--force'
================================================
FILE: .github/workflows/package-test.yml
================================================
name: Run tests and linter checks
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run-checks:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Create a virtual environment
run: |
python -m venv .venv
- name: Install dependencies
run: |
source ./.venv/bin/activate
python -m pip install --upgrade pip
make install-dev
- name: Run tests and linter checks
run: |
source ./.venv/bin/activate
make check
================================================
FILE: .github/workflows/run-integration-tests.yml
================================================
name: Run Integration Tests
on:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
should-run:
name: Check if integration tests should run
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.test-parameters.outputs.skip }}
dialects: ${{ steps.test-parameters.outputs.dialects }}
steps:
- name: Print debugging info
run: |
cat <<'EOF'
Github event name: ${{ github.event_name }}
Github event ${{ toJSON(github.event) }}
Github event comment body: ${{ github.event.comment.body }}
Github event pr body: ${{ github.event.pull_request.body }}
Generic Number: ${{ github.event.number }}
PR number: ${{ github.event.pull_request.number }}
Issue number: ${{ github.event.issue.number }}
SHA: ${{ github.sha }}
Head Ref ${{ github.head_ref }}
Ref Name: ${{ github.ref_name }}
EOF
- name: Checkout Code
uses: actions/checkout@v5
with:
# we need to checkout all refs so we can run `git diff`
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Check if integration tests should be run
id: test-parameters
run: |
python .github/scripts/get_integration_test_params.py
run-integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
needs: should-run
if: needs.should-run.outputs.skip == 'false' && github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Acquire credentials
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.INTEGRATION_TEST_CLIENT_ID }}
private-key: ${{ secrets.INTEGRATION_TEST_PRIVATE_KEY }}
owner: fivetran
repositories: sqlglot-integration-tests
- name: Run integration tests
id: run-remote
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
set -e
CORRELATION_ID=$(python -c 'import uuid;print(uuid.uuid4())')
REMOTE_REPO="fivetran/sqlglot-integration-tests"
echo "Triggering remote workflow"
gh workflow run run-tests.yml \
--repo $REMOTE_REPO \
--ref main \
-f sqlglot_ref=${{ github.sha }} \
-f sqlglot_pr_number=${{ github.event.number || github.event.issue.number }} \
-f sqlglot_branch_name=${{ github.head_ref || github.ref_name }} \
-f correlation_id="$CORRELATION_ID" \
-f dialects="${{ needs.should-run.outputs.dialects }}"
echo "Triggered workflow using correlation id: $CORRELATION_ID"
# poll for run id
RUN_ID=""
ATTEMPTS=0
while [ "$RUN_ID" == "" ]; do
sleep 5
ATTEMPTS=$((ATTEMPTS + 1))
if [ $ATTEMPTS -gt 10 ]; then
echo "Timed out waiting for matching run to start"
exit 1
fi
echo "Checking for run"
RUN_ID=$(gh run list \
--repo $REMOTE_REPO \
--event workflow_dispatch \
--workflow run-tests.yml \
--user sqlglot-integration-tests \
--json displayTitle,databaseId \
--limit 20 \
-q '.[] | select(.displayTitle | contains("Correlation ID: '"$CORRELATION_ID"'")) | .databaseId')
done
echo "Using Run ID: ${RUN_ID}"
echo "remote_run_id=$RUN_ID" >> $GITHUB_OUTPUT
echo "Waiting for completion"
gh run watch $RUN_ID \
--repo fivetran/sqlglot-integration-tests \
--interval 10 \
--compact \
--exit-status
# Fail the workflow on this side if the remote workflow fails
exit $?
- name: Fetch outputs
id: fetch-outputs
uses: actions/download-artifact@v5
with:
github-token: ${{ steps.app-token.outputs.token }}
repository: fivetran/sqlglot-integration-tests
run-id: ${{ steps.run-remote.outputs.remote_run_id }}
name: summary
- name: Write summary as comment
uses: actions/github-script@v8
# only do this when on PR branches, main builds dont have anywhere to write comments
if: github.event_name == 'pull_request' || github.event.issue.pull_request
with:
script: |
// summary.json is downloaded from the remote workflow in the previous step
const summary = require("./summary.json");
// Add a unique identifier to find this comment later
const commentIdentifier = "<!-- integration-test-summary -->";
const body = `${commentIdentifier}\n${summary.msg}`;
// Find existing comment
const { data: comments } = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
const existingComment = comments.find(comment =>
comment.body.includes(commentIdentifier)
);
if (existingComment) {
// Update existing comment
await github.rest.issues.updateComment({
comment_id: existingComment.id,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
} else {
// Create new comment
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
}
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
*.ipynb
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
venv*/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# PyCharm
.idea/
# Visual Studio Code
.vscode
.DS_STORE
metastore_db
spark_warehouse
# Version file
sqlglot/_version.py
# Emacs files
*~
================================================
FILE: .gitmodules
================================================
[submodule "sqlglot-integration-tests"]
path = sqlglot-integration-tests
url = git@github.com:fivetran/sqlglot-integration-tests.git
================================================
FILE: .gitpod.yml
================================================
image: gitpod/workspace-python-3.11
tasks:
- name: sqlglot
init: |
python -m venv .venv
source .venv/bin/activate
make install-dev
command: |
clear
source .venv/bin/activate
================================================
FILE: .pre-commit-config.yaml
================================================
repos:
- repo: local
hooks:
- id: sync-integration-tests-commit
name: sync-integration-tests-commit
entry: .github/scripts/integration_tests_sync.sh commit
language: script
stages: [pre-commit]
always_run: true
pass_filenames: false
- id: sync-integration-tests-checkout
name: sync-integration-tests-checkout
entry: .github/scripts/integration_tests_sync.sh checkout
language: script
stages: [post-checkout]
always_run: true
pass_filenames: false
- id: sync-integration-tests-push
name: sync-integration-tests-push
entry: .github/scripts/integration_tests_sync.sh push
language: script
stages: [pre-push]
always_run: true
pass_filenames: false
- id: sync-integration-tests-merge
name: sync-integration-tests-merge
entry: .github/scripts/integration_tests_sync.sh merge
language: script
stages: [post-merge]
always_run: true
pass_filenames: false
- id: ruff
name: ruff
description: "Run 'ruff' for extremely fast Python linting"
entry: ruff check
--force-exclude --fix
language: python
types_or: [python, pyi]
require_serial: true
additional_dependencies: []
- id: ruff-format
name: ruff-format
description: "Run 'ruff format' for extremely fast Python formatting"
entry: ruff format
language: python
types_or: [python, pyi]
require_serial: true
- id: mypy
name: mypy
entry: mypy sqlglot tests
language: system
types: [ python ]
files: ^(sqlglot/|tests/)
pass_filenames: false
================================================
FILE: AGENTS.md
================================================
# Contributing to [SQLGlot](https://github.com/tobymao/sqlglot/blob/main/README.md)
## About SQLGlot
SQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine written in pure Python. It supports 31+ SQL dialects and can transpile between them while preserving semantics. The codebase is performance-critical despite being pure Python, with an optional mypyc-compiled C extension for speed improvements (`sqlglotc/`).
## Development Commands
Before contributing read CONTRIBUTING.md
### Installation
```bash
# Basic installation
make install
# Development installation (Python only, no C extension)
make install-dev
# Development installation with mypyc C extension
make install-devc
# Install pre-commit hooks
make install-pre-commit
# With uv (faster):
UV=1 make install-dev
```
### Testing
```bash
# Run all tests (pure Python, hides .so files during run)
make test
# Run all tests with mypyc C extension (builds extension first)
make testc
# Run only unit tests (skip integration tests, pure Python)
make unit
# Run only unit tests with C extension
make unitc
# Run specific test file
python -m unittest tests.test_expressions
# Run specific test class
python -m unittest tests.test_expressions.TestExpressions
# Run specific test method
python -m unittest tests.test_expressions.TestExpressions.test_alias
```
### Linting & Type Checking
```bash
# Run linter and formatter only
make style
# Run full checks (style + pure Python tests + C extension tests)
make check
```
### Benchmarks
```bash
# Run parsing benchmark
make bench
# Run optimization benchmark
make bench-optimize
```
## Architecture Overview
SQLGlot follows a classic compiler architecture with three main phases:
### 1. Tokenizer (`tokens.py`)
- Converts SQL strings into a sequence of tokens (lexical analysis)
- Pure Python implementation in `tokens.py`; core logic in `tokenizer_core.py` (mypyc-compiled when using `[c]` extra)
- Maps lexemes to `TokenType` enum values via `KEYWORDS` and `SINGLE_TOKENS` dictionaries
- Dialects can override tokenizer behavior by customizing these mappings
### 2. Parser (`parser.py`)
- Converts tokens into an Abstract Syntax Tree (AST)
- Uses recursive descent parsing approach
- Parsing methods follow `_parse_*` naming convention (e.g., `_parse_create()`, `_parse_select()`)
- Token matching methods: `_match()`, `_match_set()`, `_match_text_seq()`, `_match_texts()`
- Helper methods for common patterns: `_parse_csv()`, `_parse_wrapped()`, `_parse_wrapped_csv()`
- Maintains index/cursor with `_advance()` and `_retreat()` methods
- Falls back to `exp.Command` for unparseable SQL (preserves original text)
### 3. Generator (`generator.py`)
- Converts AST back to SQL strings
- Traverses AST recursively, generating SQL for each expression node
- Two ways to customize generation:
- `TRANSFORMS` dictionary for single-line generations
- `<expr_name>_sql()` methods for complex generations
- Helper methods: `expressions()`, `func()`, `rename_func()`
- Use `sep()` and `seg()` for proper whitespace/newline handling in pretty-printed output
### 4. Expressions (`expressions.py`)
- Defines all AST node types as Python classes inheriting from `Expression`
- Each expression represents a semantic SQL concept (e.g., `Select`, `Join`, `Column`)
- Expressions can be traversed using `.find()`, `.find_all()`, `.walk()`, `.transform()`
- Building SQL programmatically: use helper functions like `select()`, `from_()`, `where()`, etc.
### 5. Dialects (`dialects/`)
- 34 dialect implementations in `dialects/<dialect>.py`
- Each dialect subclasses base `Dialect` and can override Tokenizer, Parser, and Generator
- Base "sqlglot" dialect acts as a superset to minimize duplication
- Dialect customization via:
- Feature flags (e.g., `SUPPORTS_IMPLICIT_UNNEST`)
- Token sets (e.g., `RESERVED_TOKENS`)
- `token -> Callable` mappings (e.g., `FUNCTIONS`, `STATEMENTS`)
- `Expression -> str` mappings in Generator
### 6. Optimizer (`optimizer/`)
- Canonicalizes and optimizes queries while preserving semantics
- Applies sequential optimization rules (order matters!)
- Key rules:
- `qualify`: Normalizes identifiers and qualifies all tables/columns (most important rule)
- `annotate_types`: Infers data types throughout the AST
- `pushdown_predicates`, `pushdown_projections`: Optimization rewrites
- `simplify`: Simplifies boolean expressions and arithmetic
- Rules depend on schema information for best results
- Optimizer performs logical optimization only (not physical/performance)
### 7. Schema (`schema.py`)
- Represents database structure (tables, columns, types)
- Used by optimizer and lineage analysis
- `MappingSchema` takes nested dict: `{"table": {"col": "type"}}`
### 8. Lineage (`lineage.py`)
- Traces column-level lineage through queries
- Requires target query, upstream queries, and root table schemas
- Builds linked list of `Node` objects representing data flow
- Can visualize with `node.to_html()`
## Key Concepts
### The "sqlglot" Dialect
- Base dialect that accommodates common syntax across all dialects
- All other dialects extend this base
- When adding multi-dialect features, prefer adding to base dialect to avoid duplication
- Only add dialect-specific features to individual dialect classes
### AST-First Approach
- SQLGlot preserves _semantics_ not syntax
- Parse SQL → AST (semantic representation) → Generate SQL in target dialect
- This enables accurate cross-dialect transpilation
- Comments are preserved on best-effort basis
- See `posts/ast_primer.md` for detailed AST tutorial
### Testing Philosophy
- Comprehensive test suite in `tests/` directory
- Dialect-specific tests in `tests/dialects/`
- Tests are critical - "robust test suite" is a core feature
- Use `tests/fixtures/` for test data
- `tests/helpers.py` contains test utilities
### Parser/Generator Symmetry
- Parser: `token -> Callable` mappings (builds AST from tokens)
- Generator: `Expression -> str` mappings (builds SQL from AST)
- Customization follows similar patterns in both
### Type Annotations
- Type inference is crucial for some transpilations (e.g., `+` can mean addition or concatenation)
- Optimizer's `annotate_types` rule propagates type information through AST
- Requires schema information to work effectively
## Common Usage Patterns
### Reading SQL
```python
import sqlglot
expression = sqlglot.parse_one("SELECT * FROM table", dialect="spark")
```
### Validate Function Expression
```python
import sqlglot
tree = sqlglot.parse_one("SELECT NULLIF(1, 2)", dialect="snowflake")
if "Anonymous" in repr(tree):
print("Function expression exists")
else:
print("Function expression does not exist")
```
### Writing SQL
```python
expression.sql(dialect="duckdb", pretty=True)
```
### Building SQL Programmatically
```python
from sqlglot import select, condition
select("*").from_("y").where(condition("x=1").and_("y=1")).sql()
```
### Traversing AST
```python
from sqlglot import parse_one, exp
tree = parse_one("SELECT a, b + 1 AS c FROM d", dialect="dialect")
for column in tree.find_all(exp.Column):
print(column.alias_or_name)
```
### Transforming AST
```python
def transformer(node):
if isinstance(node, exp.Column) and node.name == "a":
return parse_one("FUN(a)", dialect="dialect")
return node
transformed = tree.transform(transformer)
```
## Development Guidelines
- Follow [Conventional Commits](https://www.conventionalcommits.org/) for PR titles
- If you are an agent, you must add your model [CLAUDE, CODEX, etc...] to the end of PR titles and commit messages.
- Keep PRs minimal in scope - one well-defined change per PR
- Add tests for non-trivial changes
- Update docstrings if APIs change
- Run `make check` before submitting
- Use comments for complex logic only
- Don't change license or license files in setup.py, there's nothing wrong with it.
## Important Files
- `posts/ast_primer.md`: Detailed AST tutorial
- `posts/onboarding.md`: Architecture deep-dive (HIGHLY RECOMMENDED)
- `.pre-commit-config.yaml`: Pre-commit hooks (ruff, ruff-format, mypy)
- `pyproject.toml`: Project metadata and build config
- `Makefile`: All development commands
## Performance Considerations
- Pure Python implementation with optional mypyc-compiled C extension (`sqlglotc/`)
- Install with `pip install "sqlglot[c]"` for C extension speed boost
- The `[c]` extra compiles core modules (`expression_core`, `tokenizer_core`, `parser_core`, etc.) via mypyc
- Performance is a key feature despite Python implementation
- Benchmarks compare against other SQL parsers - see `benchmarks/`
- Avoid use of typing.Protocol, prefer Union Type and Duck Typing
- Never suggest Pratt parsing as an optimization for the parser. The recursive descent approach is intentional and preferred.
---
## SQLGlot Coding Rules
The following patterns are based on PR review feedback. Follow these to minimize review iterations.
### 1. Use Automatic Naming Convention for Generator Methods
**Don't do this (module-level function with TRANSFORMS):**
```python
def _my_func_sql(self: MyDialect.Generator, expression: exp.MyFunc) -> str:
...
class Generator:
TRANSFORMS = {
exp.MyFunc: _my_func_sql,
}
```
**Don't do this (method with TRANSFORMS):**
```python
class Generator:
TRANSFORMS = {
exp.MyFunc: lambda self, e: self._my_func_sql(e),
}
def _my_func_sql(self, expression):
...
```
**Do this (auto-discovered method):**
```python
class Generator:
# No TRANSFORMS entry needed - automatic discovery by name
def myfunc_sql(self, expression: exp.MyFunc) -> str:
...
```
Generator methods named `<lowercase_expr_name>_sql` are automatically discovered.
Important: Only use TRANSFORMS for simple one-liners like `rename_func("OTHER_NAME")` or lambdas or functions with multiple entry points. For any single entry point function, always use an auto-discovered method inside the Generator class.
SQLGlot automatically applies transformations based on the structure of the name, but when this fails, you must rename the function. This is only when the SQL name is not covered by auto mapping:
**Do this:**
```python
class Generator:
TRANSFORMS = {
exp.ArrayLength: rename_func("LENGTH"),
}
```
**Don't do this:**
```python
exp.ArrayLength: lambda self, e: self.func("LENGTH", e.this),
```
### 2. Use Existing Expression Classes, Not Anonymous
**Don't do this:**
```python
from_base64 = exp.Anonymous(this="FROM_BASE64", expressions=[input_expr])
```
**Do this:**
```python
from_base64 = exp.FromBase64(this=input_expr)
```
Always check if an expression class exists in `expressions.py` before using `exp.Anonymous`. Anonymous should only be used for functions that don't have a dedicated class. Search for the function name in expressions.py first.
### 3. SQL Generation: Choose the Right Approach
Use the appropriate method based on complexity. From simplest to most complex:
#### Level 1: Generator Helper Methods
For generating function calls in generator methods, use `self.func()`:
```python
def myfunc_sql(self, expression):
# Don't: return self.sql(exp.Func(this="MY_FUNC", expressions=[expression.this]))
# Do:
return self.func("MY_FUNC", expression.this)
```
#### Level 2: Expression Builders
For building expressions, use helper functions instead of direct class construction:
| Helper | Instead of | Benefits |
|--------|-----------|----------|
| `exp.func("name", *args)` | `exp.Anonymous(...)` | Finds proper Func class |
| `exp.array(e1, e2, ...)` | `exp.Array(expressions=[...])` | Parses automatically |
| `exp.and_(e1, e2, ...)` | `exp.And(this=..., expression=...)` | Handles nesting |
| `exp.or_(e1, e2, ...)` | `exp.Or(this=..., expression=...)` | Handles nesting |
| `exp.case().when(cond, val).else_(default)` | `exp.Case(ifs=[...])` | Fluent interface |
| `exp.cast(expr, "TYPE")` | `exp.Cast(this=..., to=...)` | Builds DataType |
| `exp.column("col", "table")` | `exp.Column(...)` | Handles identifiers |
| `exp.null()` | `exp.Null()` | Simple factory |
Also use expression operators for cleaner code:
```python
# Arithmetic: exp.column("x") + 1 instead of exp.Add(this=..., expression=...)
# Indexing: arr[index] instead of exp.Bracket(this=arr, expressions=[index])
# Comparison: arg.is_(exp.Null()) instead of exp.Is(this=arg, expression=exp.Null())
```
#### Level 3: SQL Templates
When expressions become complex, use templates with `exp.maybe_parse()` and `exp.replace_placeholders()`:
```python
# Define template with :placeholder syntax
MY_TEMPLATE: exp.Expression = exp.maybe_parse(
"CASE WHEN :arg IS NULL THEN NULL ELSE :result END"
)
# In generator method
def myfunc_sql(self, expression):
result = exp.replace_placeholders(
self.MY_TEMPLATE.copy(),
arg=expression.this,
result=some_expression,
)
return self.sql(result)
```
#### Avoid: F-strings with SQL Fragments
You should rarely, if ever, build SQL with f-strings - it breaks quoting, escaping, and dialect handling:
```python
# NEVER do this:
def my_func_sql(self, expression):
return f"CAST({self.sql(expression.this)} AS TIME)"
# Do this instead:
def my_func_sql(self, expression):
return self.sql(exp.cast(expression.this, "TIME"))
```
### 4. Type Checking: `is_string` vs `is_type()`
These serve **different purposes**:
**`is_type()`** - Semantic type check:
```python
# Returns True if expression's type is text (columns, function results, etc.)
# Requires annotate_types() to populate type info
if arg.is_type(*exp.DataType.TEXT_TYPES):
...
```
**`is_string`** - Syntactic check for string literals:
```python
# Returns True only for literal strings like 'hello'
# Works without type annotation
if arg.is_string:
value = arg.name # Extract the string value
```
**When to use each:**
| Use Case | Method |
|----------|--------|
| Check if node is a string literal to extract its value | `is_string` |
| Check if node is a literal vs column/expression | `is_string` |
| Check semantic type (works for columns, functions) | `is_type()` |
| Cover both literals and typed expressions | `is_string or is_type()` |
**Combined pattern (from `length_sql`):**
```python
# Fast check for string literals (no annotation needed)
if arg.is_string:
return self.func("LENGTH", arg)
# For non-literals, get type info if needed
if not arg.type:
arg = annotate_types(arg, dialect=self.dialect)
# Then check semantic type
if arg.is_type(*exp.DataType.TEXT_TYPES):
return self.func("LENGTH", arg)
```
**Don't do direct type comparisons:**
```python
# Bad
if input_expr.type and input_expr.type.this in exp.DataType.TEXT_TYPES:
# Good
if input_expr.is_type(*exp.DataType.TEXT_TYPES):
```
### 5. Use `to_py()` for Literal Value Extraction
**Don't do this:**
```python
if isinstance(arg, exp.Literal):
value = int(arg.this.strip("'"))
```
**Do this:**
```python
if isinstance(arg, exp.Literal) and arg.is_number:
value = int(arg.to_py())
```
### 6. Avoid Compile-Time NULL Checks
Don't check for `exp.Null()` or literal NULL values in Python during transpilation. NULL handling should happen at query time in the generated SQL using `IS NULL` checks.
**Don't do this:**
```python
def myfunc_sql(self, expression):
# Bad: checking for literal NULL at transpile time
if any(isinstance(arg, exp.Null) for arg in expression.expressions):
return self.sql(exp.Null())
```
**Do this:**
```python
# Good: generate SQL that handles NULL at query time
TEMPLATE = exp.maybe_parse("CASE WHEN :arg IS NULL THEN NULL ELSE ... END")
```
Compile-time checks only handle literal `NULL` values in the SQL text, not NULL values that come from columns, parameters, or expressions at runtime. Generate SQL with `IS NULL` checks to handle all cases.
### 7. Type Annotations in Tests
When transpilation depends on `is_type()` checks, tests need `annotate_types()`:
```python
from sqlglot.optimizer import annotate_types
# Without annotation - is_type() returns False for literals
expr = self.validate_identity("SELECT BASE64_ENCODE('Hello World')")
# With annotation - types are inferred, is_type() works
annotated = annotate_types(expr, dialect="snowflake")
self.assertEqual(annotated.sql("duckdb"), "SELECT TO_BASE64(ENCODE('Hello World'))")
```
### 8. Use `find_ancestor` with Scope Boundaries
When searching for ancestors, include scope boundaries to avoid crossing into parent queries:
```python
# Stop at Select to stay within current query scope
ancestor = expression.find_ancestor(exp.Where, exp.Having, exp.Select)
if ancestor and not isinstance(ancestor, exp.Select):
# Found restricted context within current scope
...
```
### 9. Use @unsupported_args for unsupported arguments
When arguments are not supported do this:
```python
@unsupported_args("ins_cost", "del_cost", "sub_cost")
def levenshtein_sql(self, expression: exp.Levenshtein) -> str:
```
### 10. Keep Code Minimal
- Remove unused imports, variables, and dead code
- Don't add comments for obvious code
- Don't add docstrings unless the function is complex or public API
- Prefer inline expressions over intermediate variables when readable
- Don't add backwards-compatibility shims for removed code
### 11. Test Patterns
- Add tests to the appropriate dialect test file (e.g., `tests/dialects/test_snowflake.py`)
- Use `self.validate_all()` for cross-dialect tests
- Use `self.validate_identity()` for round-trip tests
- Don't add tests for functionality that already has coverage
### 12. Ensure Test Validity
- Make sure all tests added to tests/dialects/*.py actually run in the relevant databases, such as snowflake or duckdb
================================================
FILE: CHANGELOG.md
================================================
Changelog
=========
## [v30.0.3] - 2026-03-19
### :zap: Performance Improvements
- [`f87ebe0`](https://github.com/tobymao/sqlglot/commit/f87ebe02103b249ec5fa2c93e019e465f77630be) - use mypyc i64 for parser index fields (~1.6% faster) *(commit by [@tobymao](https://github.com/tobymao))*
### :wrench: Chores
- [`52bca33`](https://github.com/tobymao/sqlglot/commit/52bca33e9395c4f6f621649180f2576eb8591dba) - **lineage**: improve error message when column source index is out of range *(PR [#7336](https://github.com/tobymao/sqlglot/pull/7336) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7332](https://github.com/tobymao/sqlglot/issues/7332) opened by [@paultiq](https://github.com/paultiq)*
## [v30.0.2] - 2026-03-19
### :boom: BREAKING CHANGES
- due to [`936617e`](https://github.com/tobymao/sqlglot/commit/936617e749f969b04da318ec02e1086a01212e92) - escape comment markers in sanitize_comment for all dialects *(PR [#7301](https://github.com/tobymao/sqlglot/pull/7301) by [@llimllib](https://github.com/llimllib))*:
escape comment markers in sanitize_comment for all dialects (#7301)
- due to [`4f6bcd3`](https://github.com/tobymao/sqlglot/commit/4f6bcd3d21cf34346db4c7fc9936302d34a802e2) - Add transpilation support for ARRAY_TO_STRING function *(PR [#7289](https://github.com/tobymao/sqlglot/pull/7289) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Add transpilation support for ARRAY_TO_STRING function (#7289)
### :sparkles: New Features
- [`4f6bcd3`](https://github.com/tobymao/sqlglot/commit/4f6bcd3d21cf34346db4c7fc9936302d34a802e2) - **duckdb**: Add transpilation support for ARRAY_TO_STRING function *(PR [#7289](https://github.com/tobymao/sqlglot/pull/7289) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
### :bug: Bug Fixes
- [`b41a99a`](https://github.com/tobymao/sqlglot/commit/b41a99a1405a5749a5876a64a559bd040ba618a5) - **duckdb**: FROM pipe syntax in subquery *(PR [#7311](https://github.com/tobymao/sqlglot/pull/7311) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7305](https://github.com/tobymao/sqlglot/issues/7305) opened by [@paultiq](https://github.com/paultiq)*
- [`936617e`](https://github.com/tobymao/sqlglot/commit/936617e749f969b04da318ec02e1086a01212e92) - escape comment markers in sanitize_comment for all dialects *(PR [#7301](https://github.com/tobymao/sqlglot/pull/7301) by [@llimllib](https://github.com/llimllib))*
- [`6ddaee3`](https://github.com/tobymao/sqlglot/commit/6ddaee3ccb92f660327501884acf103fad782e07) - **expressions**: restore Expression.alias behaviour for non-Identifier alias nodes *(PR [#7310](https://github.com/tobymao/sqlglot/pull/7310) by [@treff7es](https://github.com/treff7es))*
- [`ce08047`](https://github.com/tobymao/sqlglot/commit/ce0804717876889c731f2ab64035c70a85f9b294) - **snowflake**: ILIKE/LIKE ANY/ALL with single element transpilation to duckdb *(PR [#7314](https://github.com/tobymao/sqlglot/pull/7314) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7306](https://github.com/tobymao/sqlglot/issues/7306) opened by [@ultrabear](https://github.com/ultrabear)*
- [`8a52de6`](https://github.com/tobymao/sqlglot/commit/8a52de63fb908b55df0143e3ec63f3ae37aa4fd8) - **parser**: Add builder for ARRAY_INTERSECT *(PR [#7328](https://github.com/tobymao/sqlglot/pull/7328) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#7326](https://github.com/tobymao/sqlglot/issues/7326) opened by [@ADBond](https://github.com/ADBond)*
- [`f8a7ab2`](https://github.com/tobymao/sqlglot/commit/f8a7ab2724cbb75d40355c79c8f68003ee2a5c7e) - **parser**: Do not consume constraints following UNIQUE *(PR [#7330](https://github.com/tobymao/sqlglot/pull/7330) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#7327](https://github.com/tobymao/sqlglot/issues/7327) opened by [@chunyangfeng](https://github.com/chunyangfeng)*
- [`64509a2`](https://github.com/tobymao/sqlglot/commit/64509a2a3e7606eab57d714e63424f235c78a6b5) - sqlglotc sdist install fails when ../sqlglot dir doesn't exist *(PR [#7337](https://github.com/tobymao/sqlglot/pull/7337) by [@tobymao](https://github.com/tobymao))*
- :arrow_lower_right: *fixes issue [#7333](https://github.com/tobymao/sqlglot/issues/7333) opened by [@ZipBrandon](https://github.com/ZipBrandon)*
### :zap: Performance Improvements
- [`0ac52aa`](https://github.com/tobymao/sqlglot/commit/0ac52aa80241a8ed4049948f2ee0c19c8dc64279) - move instance variables to __init__ for perf *(commit by [@tobymao](https://github.com/tobymao))*
- [`c95ae50`](https://github.com/tobymao/sqlglot/commit/c95ae50fa122e01c914c92e9d847ff390516e1a4) - optimize parser for nested function calls (-41% on nested_funct… *(PR [#7307](https://github.com/tobymao/sqlglot/pull/7307) by [@tobymao](https://github.com/tobymao))*
- [`1697bc3`](https://github.com/tobymao/sqlglot/commit/1697bc3a67c10314c5640ed7d52c40063db70f10) - optimize parser fast path for simple table references *(commit by [@tobymao](https://github.com/tobymao))*
- [`18f15ca`](https://github.com/tobymao/sqlglot/commit/18f15ca96c7bdebe5798e407993495c0a9e9bd43) - inline token parsing for massive gains *(PR [#7335](https://github.com/tobymao/sqlglot/pull/7335) by [@tobymao](https://github.com/tobymao))*
### :wrench: Chores
- [`fe7874f`](https://github.com/tobymao/sqlglot/commit/fe7874f3cb5dd7899a438249f65b51b684a056f6) - update changelog with v30 release notes *(PR [#7309](https://github.com/tobymao/sqlglot/pull/7309) by [@georgesittas](https://github.com/georgesittas))*
- [`8a914f0`](https://github.com/tobymao/sqlglot/commit/8a914f09ed3534ecc9998b6ce84f74e2f15909e4) - use ProcessPoolExecutor in test_executor *(PR [#7313](https://github.com/tobymao/sqlglot/pull/7313) by [@georgesittas](https://github.com/georgesittas))*
- [`604fe3f`](https://github.com/tobymao/sqlglot/commit/604fe3f1770715baf8b461344cffa44eaf017fc2) - improve integration test submodule automations *(PR [#7320](https://github.com/tobymao/sqlglot/pull/7320) by [@georgesittas](https://github.com/georgesittas))*
- [`c7b55c1`](https://github.com/tobymao/sqlglot/commit/c7b55c1998e7aaea7a4950e8ee347db7b0ec4af3) - Fix uv sync failing for sqlglotc *(PR [#7322](https://github.com/tobymao/sqlglot/pull/7322) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *addresses issue [#7321](https://github.com/tobymao/sqlglot/issues/7321) opened by [@OutSquareCapital](https://github.com/OutSquareCapital)*
- [`158424c`](https://github.com/tobymao/sqlglot/commit/158424cda0cc908c9f3687cc466194fa31cafb1b) - update readme *(commit by [@tobymao](https://github.com/tobymao))*
## [v30.0.1] - 2026-03-16
### :bug: Bug Fixes
- [`7bcad5c`](https://github.com/tobymao/sqlglot/commit/7bcad5c61673a8567e9c22d059ed4326e6698457) - auto pin sqlglotc version to sqlglot so there's no version mismatch closes [#7304](https://github.com/tobymao/sqlglot/pull/7304) *(commit by [@tobymao](https://github.com/tobymao))*
## [v30.0.0] - 2026-03-16
SQLGlot v30 is a major release focused on performance and compilation. Some of the core components of the library are now fully compilable by [mypyc](https://mypyc.readthedocs.io/), delivering significant speedups when installed with the `[c]` extra. This required restructuring several internal modules, which introduces breaking changes for users who depend on internal APIs, subclass parsers, or import from internal paths.
> **If you only use the public API** (`sqlglot.parse`, `sqlglot.parse_one`, `sqlglot.transpile`, `sqlglot.exp.*`, `sqlglot.optimizer.*`), most code will work without changes.
---
## Migration Guide
### 1. Rust tokenizer removed — use `[c]` instead of `[rs]`
The Rust-based tokenizer (`sqlglotrs`) has been removed (since v29) and replaced with a mypyc-compiled C extension (`sqlglotc`).
```bash
# Before
pip install "sqlglot[rs]"
# After
pip install "sqlglot[c]"
```
The `[rs]` extra still installs but is now a deprecated no-op stub. The following APIs are removed:
- `use_rs_tokenizer` parameter and attribute on `Tokenizer`
- `RsTokenizer`, `RsTokenizerSettings`, `RsTokenTypeSettings` imports
- `USE_RS_TOKENIZER` constant from `tokens.py`
### 2. `expressions.py` split into a package
The monolithic `sqlglot/expressions.py` has been split into `sqlglot/expressions/` with submodules:
| Module | Contents |
|---|---|
| `core.py` | `Expr`, `Expression`, `Condition`, `Func`, `AggFunc`, `Column`, `Literal`, etc. |
| `datatypes.py` | `DataType`, `DType`, `DataTypeParam`, `Interval` |
| `query.py` | `Select`, `Query`, `SetOperation`, `UDTF`, `Subquery` |
| `ddl.py` | `Create`, `Alter`, `Drop`, DDL statements |
| `dml.py` | `Insert`, `Update`, `Delete`, `Merge` |
| `properties.py` | All `*Property` classes, `PropertiesLocation` |
| `constraints.py` | All `*ColumnConstraint` classes |
| `math.py` | Arithmetic operators (`Add`, `Sub`, `Mul`, `Div`, etc.) |
| `string.py` | String functions (`Concat`, `Length`, `Upper`, etc.) |
| `temporal.py` | Date/time functions (`DateAdd`, `DateDiff`, etc.) |
| `aggregate.py` | Aggregate functions (`Count`, `Sum`, `Avg`, etc.) |
| `array.py` | Array functions (`ArrayAgg`, `Explode`, etc.) |
| `json.py` | JSON functions (`JSONExtract`, etc.) |
| `functions.py` | Other functions (`Coalesce`, `If`, `Case`, `Cast`, etc.) |
| `builders.py` | Builder helpers (`select()`, `from_()`, `condition()`, etc.) |
**Backwards-compatibility:** `from sqlglot.expressions import *` and `from sqlglot import expressions as exp` still work, because everything is re-exported from `expressions/__init__.py`. However, if you were importing from `sqlglot.expressions` by relying on it being a single file (e.g., inspecting `__file__`), that will break.
### 3. `Parser.expression()` no longer accepts `**kwargs`
This affects anyone subclassing `Parser` or calling `self.expression()` in custom parse methods.
```python
# Before
self.expression(exp.Select, distinct=True, expressions=cols)
# After
self.expression(exp.Select(distinct=True, expressions=cols))
```
The expression instance is now constructed by the caller and passed directly. This eliminates `**kwargs` dict allocation overhead.
### 4. Scope traversal: `bfs` parameter removed
The `bfs` parameter has been removed from all scope traversal functions. Traversal is now always depth-first (DFS).
```python
# Before
scope.walk(bfs=True)
scope.find(exp.Column, bfs=False)
walk_in_scope(expr, bfs=True)
# After
scope.walk()
scope.find(exp.Column)
walk_in_scope(expr)
```
**Behavioral change:** The old default was `bfs=True`. Now traversal is always DFS. Code that depended on BFS ordering from these functions will get results in a different order.
Affected functions: `Scope.walk()`, `Scope.find()`, `Scope.find_all()`, `walk_in_scope()`, `find_in_scope()`, `find_all_in_scope()`.
### 5. Dialect metaclass no longer mutates Parser token sets
Previously, the `_Dialect` metaclass dynamically modified parser token sets (`ID_VAR_TOKENS`, `TABLE_ALIAS_TOKENS`, `NO_PAREN_FUNCTIONS`) at class creation time based on dialect flags like `SUPPORTS_SEMI_ANTI_JOIN`. These mutations are removed — each parser now declares its token sets statically.
- `Dialect.SUPPORTS_SEMI_ANTI_JOIN` has been removed.
- `SHOW_TRIE` / `SET_TRIE` are no longer auto-computed from `SHOW_PARSERS` / `SET_PARSERS`.
### 6. Use `Expr` instead of `Expression` for generic `isinstance` checks
Base classes like `Func`, `Condition`, `Binary`, and other traits now inherit from `Expr` directly, not from `Expression`. This means `isinstance(node, exp.Expression)` will **not** match these trait classes. If your code uses `isinstance` to check for "any AST node", switch to `exp.Expr`:
```python
# Before
isinstance(node, exp.Expression)
# After
isinstance(node, exp.Expr)
```
### 7. Compiled classes cannot be subclassed (when using `[c]`)
When `sqlglot[c]` is installed, many core classes are compiled via mypyc. **Compiled classes cannot be subclassed at runtime** — class definition succeeds, but instantiation raises `TypeError: interpreted classes cannot inherit from compiled`.
**Affected classes (compiled):**
| Class | Subclassable? |
|---|---|
| All parsers (`BigQueryParser`, `SnowflakeParser`, etc.) | No |
| `Parser` (base) | No |
| `Expression`, `Expr`, and all AST nodes (`Select`, `Column`, `Func`, etc.) | No |
| `MappingSchema`, `AbstractMappingSchema` | No |
| `Scope` | No |
| Optimizer rules (`scope.py`, `qualify.py`, `qualify_columns.py`, etc.) | No |
**Not compiled (still subclassable):**
| Class | Subclassable? |
|---|---|
| `Generator` and all dialect generators | Yes |
| `Tokenizer` and all dialect tokenizers | Yes |
| `Dialect` and all dialect classes | Yes |
If you need to subclass compiled classes (parsers, expressions, schema, etc.), install the pure Python version instead:
```bash
pip install sqlglot # pure Python — full subclassing support
pip install "sqlglot[c]" # compiled — faster, but no subclassing
```
### :boom: BREAKING CHANGES
- due to [`8ee0646`](https://github.com/tobymao/sqlglot/commit/8ee0646baa6dfae7e96ca86e2c1af5d53fc04290) - Transpile numeric literals with underscores from ClickHouse to other dialects *(PR [#7132](https://github.com/tobymao/sqlglot/pull/7132) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Transpile numeric literals with underscores from ClickHouse to other dialects (#7132)
- due to [`81a3763`](https://github.com/tobymao/sqlglot/commit/81a37636c374690d12fe0b57d78adf2310daf3cb) - cast string literals to TIMESTAMP in TO_CHAR generation *(PR [#7127](https://github.com/tobymao/sqlglot/pull/7127) by [@marconae](https://github.com/marconae))*:
cast string literals to TIMESTAMP in TO_CHAR generation (#7127)
- due to [`dff662a`](https://github.com/tobymao/sqlglot/commit/dff662a1389bdfbe6c331ca31dd37f76a6353429) - add transpilation support for ARRAY_GENERATE_RANGE function *(PR [#7107](https://github.com/tobymao/sqlglot/pull/7107) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
add transpilation support for ARRAY_GENERATE_RANGE function (#7107)
- due to [`8e6b61f`](https://github.com/tobymao/sqlglot/commit/8e6b61f18e465b24ad9e20a8e1509486177fbb32) - transpilation support MAP_DELETE *(PR [#7139](https://github.com/tobymao/sqlglot/pull/7139) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support MAP_DELETE (#7139)
- due to [`351e958`](https://github.com/tobymao/sqlglot/commit/351e958c3cd8a1395826ef624979275b246490f8) - fix parsing error in json_extract for exasol *(PR [#7098](https://github.com/tobymao/sqlglot/pull/7098) by [@nnamdi16](https://github.com/nnamdi16))*:
fix parsing error in json_extract for exasol (#7098)
- due to [`1b1db57`](https://github.com/tobymao/sqlglot/commit/1b1db5728903d6468eba3d07da2a468395bf628b) - transpilation support MAP_SIZE *(PR [#7146](https://github.com/tobymao/sqlglot/pull/7146) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support MAP_SIZE (#7146)
- due to [`0b4e26b`](https://github.com/tobymao/sqlglot/commit/0b4e26b8e7045bcf68992b6a2c8a5fd51b8262d7) - annotate EXTRACT(expr) for DuckDB *(PR [#7154](https://github.com/tobymao/sqlglot/pull/7154) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate EXTRACT(expr) for DuckDB (#7154)
- due to [`95d7d20`](https://github.com/tobymao/sqlglot/commit/95d7d2052b1ed8fc64a99d557b8b085ad466100e) - annotate `TO_TIMESTAMP` as `TIMESTAMPTZ` fixes [#7155](https://github.com/tobymao/sqlglot/pull/7155) *(commit by [@georgesittas](https://github.com/georgesittas))*:
annotate `TO_TIMESTAMP` as `TIMESTAMPTZ` fixes #7155
- due to [`7cc4332`](https://github.com/tobymao/sqlglot/commit/7cc43327ba72b3a1af6d8f2f489a97b997748ee9) - support transpilation of function RIGHT from Snowflake to DuckDB *(PR [#7148](https://github.com/tobymao/sqlglot/pull/7148) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
support transpilation of function RIGHT from Snowflake to DuckDB (#7148)
- due to [`ad9d114`](https://github.com/tobymao/sqlglot/commit/ad9d114aea7f7553485631372d99ec5e5cf85045) - Enable transpilation for ARRAY_POSITION function *(PR [#7153](https://github.com/tobymao/sqlglot/pull/7153) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Enable transpilation for ARRAY_POSITION function (#7153)
- due to [`684ff4a`](https://github.com/tobymao/sqlglot/commit/684ff4a13b1220fd5d3c0ec597cbdc630a3b9c03) - support arrayExcept for ClickHouse *(PR [#7161](https://github.com/tobymao/sqlglot/pull/7161) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support arrayExcept for ClickHouse (#7161)
- due to [`74fd80c`](https://github.com/tobymao/sqlglot/commit/74fd80cdf055c828cedfac43b4b54132d18558bb) - split up expressions.py *(PR [#7160](https://github.com/tobymao/sqlglot/pull/7160) by [@tobymao](https://github.com/tobymao))*:
split up expressions.py (#7160)
- due to [`d5840c5`](https://github.com/tobymao/sqlglot/commit/d5840c53f6a359def002c0b634a48706519b11e7) - support transpilation of RANDOM from Snowflake to DuckDB *(PR [#7163](https://github.com/tobymao/sqlglot/pull/7163) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
support transpilation of RANDOM from Snowflake to DuckDB (#7163)
- due to [`07ef171`](https://github.com/tobymao/sqlglot/commit/07ef1711fdff0fa8f877b93f5be8921424eed438) - Add support for multiple-suffix combined aggregate functions in Clickhouse dialect *(PR [#7109](https://github.com/tobymao/sqlglot/pull/7109) by [@emanb29](https://github.com/emanb29))*:
Add support for multiple-suffix combined aggregate functions in Clickhouse dialect (#7109)
- due to [`280e247`](https://github.com/tobymao/sqlglot/commit/280e24726be22a4f06261168d5dfc74b361dd04d) - Add transpilation support for NULLs and mutiset semantics in ARRAY_INTERSECTION *(PR [#7145](https://github.com/tobymao/sqlglot/pull/7145) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Add transpilation support for NULLs and mutiset semantics in ARRAY_INTERSECTION (#7145)
- due to [`542e392`](https://github.com/tobymao/sqlglot/commit/542e3920fb7d232b523e950820750e549a8d909a) - Add transpilation support for NULLs and mutiset semantics in ARRAY_INTERSECTION *(PR [#7145](https://github.com/tobymao/sqlglot/pull/7145) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Add transpilation support for NULLs and mutiset semantics in ARRAY_INTERSECTION (#7145)
- due to [`363167c`](https://github.com/tobymao/sqlglot/commit/363167c6609fa80b6014851b4415adca17b00df4) - parse FILE column *(PR [#7184](https://github.com/tobymao/sqlglot/pull/7184) by [@geooo109](https://github.com/geooo109))*:
parse FILE column (#7184)
- due to [`f630d75`](https://github.com/tobymao/sqlglot/commit/f630d7579231f29fa5637b48f1be0b5665eb36b3) - support dotcolon with JSON *(PR [#7191](https://github.com/tobymao/sqlglot/pull/7191) by [@geooo109](https://github.com/geooo109))*:
support dotcolon with JSON (#7191)
- due to [`29399bb`](https://github.com/tobymao/sqlglot/commit/29399bbed44a74d95257040fd36f0a0f6de7c7d8) - remove invalid group by distinct during custom transformation of group by all *(PR [#7197](https://github.com/tobymao/sqlglot/pull/7197) by [@nnamdi16](https://github.com/nnamdi16))*:
remove invalid group by distinct during custom transformation of group by all (#7197)
- due to [`e0947ad`](https://github.com/tobymao/sqlglot/commit/e0947adcaeb1e3cb829e584e0b071c598c64cfa9) - set default window frame for certain Snowflake ranking functions during transpilation *(PR [#7195](https://github.com/tobymao/sqlglot/pull/7195) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
set default window frame for certain Snowflake ranking functions during transpilation (#7195)
- due to [`4a3254f`](https://github.com/tobymao/sqlglot/commit/4a3254fbd1bfee7aa6787d3fc31832d8e9771932) - transpilation support MAP_PICK *(PR [#7189](https://github.com/tobymao/sqlglot/pull/7189) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support MAP_PICK (#7189)
- due to [`9431fd4`](https://github.com/tobymao/sqlglot/commit/9431fd457dc4dbad7a963828c5303889573079d3) - annotate CURRENT_TIMESTAMP for TSQL *(PR [#7208](https://github.com/tobymao/sqlglot/pull/7208) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate CURRENT_TIMESTAMP for TSQL (#7208)
- due to [`4087a15`](https://github.com/tobymao/sqlglot/commit/4087a152c5d4372ab53644061980b81a9174db1e) - properly handle GENERATED ALWAYS/BY DEFAULT *(PR [#7210](https://github.com/tobymao/sqlglot/pull/7210) by [@anna-stepien](https://github.com/anna-stepien))*:
properly handle GENERATED ALWAYS/BY DEFAULT (#7210)
- due to [`a39d3e9`](https://github.com/tobymao/sqlglot/commit/a39d3e999e707114226edb806061b80e0164489a) - Implement transpilation for ARRAYS_OVERLAP function *(PR [#7200](https://github.com/tobymao/sqlglot/pull/7200) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Implement transpilation for ARRAYS_OVERLAP function (#7200)
- due to [`ed5e179`](https://github.com/tobymao/sqlglot/commit/ed5e1792a30e5172620e263edcae65f2f892f55b) - Added tests for to_array *(PR [#7201](https://github.com/tobymao/sqlglot/pull/7201) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
Added tests for to_array (#7201)
- due to [`3ef5db9`](https://github.com/tobymao/sqlglot/commit/3ef5db9ca10527e237340cc24612d63d4d1bcf1b) - support DETACH *(PR [#7215](https://github.com/tobymao/sqlglot/pull/7215) by [@geooo109](https://github.com/geooo109))*:
support DETACH (#7215)
- due to [`b5f888e`](https://github.com/tobymao/sqlglot/commit/b5f888e403b20dc9729eb7f01f5cc5227f173ce2) - handle NULL discrepancy during transpilation of SPLIT from Snowflake to DuckDB *(PR [#7216](https://github.com/tobymao/sqlglot/pull/7216) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
handle NULL discrepancy during transpilation of SPLIT from Snowflake to DuckDB (#7216)
- due to [`5599478`](https://github.com/tobymao/sqlglot/commit/55994785bae54dd37ffc40b085878d186780f033) - Compile base & BigQuery's parser with mypyc *(PR [#7206](https://github.com/tobymao/sqlglot/pull/7206) by [@VaggelisD](https://github.com/VaggelisD))*:
Compile base & BigQuery's parser with mypyc (#7206)
- due to [`3c02ea8`](https://github.com/tobymao/sqlglot/commit/3c02ea8a2c515d53e89c0d7455392a2b8fac2d8a) - handle empty separator for SPLIT transpilation (Snowflake -> Duckdb) *(PR [#7224](https://github.com/tobymao/sqlglot/pull/7224) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
handle empty separator for SPLIT transpilation (Snowflake -> Duckdb) (#7224)
- due to [`c34bc2d`](https://github.com/tobymao/sqlglot/commit/c34bc2d17c2467b433d49e8e84611ec6acb39580) - transpilation support MAP_INSERT *(PR [#7190](https://github.com/tobymao/sqlglot/pull/7190) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support MAP_INSERT (#7190)
- due to [`8256e08`](https://github.com/tobymao/sqlglot/commit/8256e08e55bb12ac3598e2b1f936e5ef380e2cf8) - Extract Spark parser for mypyc compilation *(PR [#7235](https://github.com/tobymao/sqlglot/pull/7235) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Spark parser for mypyc compilation (#7235)
- due to [`2379947`](https://github.com/tobymao/sqlglot/commit/237994706746d6a294bfae0b413a0ec479645c2c) - Extract SingleStore parser for mypyc compilation *(PR [#7250](https://github.com/tobymao/sqlglot/pull/7250) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract SingleStore parser for mypyc compilation (#7250)
- due to [`27b6f56`](https://github.com/tobymao/sqlglot/commit/27b6f56a3871a0d2152e3eb26ac26dd56a4b5ff3) - Extract Doris parser for mypyc compilation *(PR [#7249](https://github.com/tobymao/sqlglot/pull/7249) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Doris parser for mypyc compilation (#7249)
- due to [`5c8b003`](https://github.com/tobymao/sqlglot/commit/5c8b0037e2a6a8ccd5588234bb591d42904e8a02) - Extract StarRocks parser for mypyc compilation *(PR [#7248](https://github.com/tobymao/sqlglot/pull/7248) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract StarRocks parser for mypyc compilation (#7248)
- due to [`669bc3f`](https://github.com/tobymao/sqlglot/commit/669bc3f7711253d4ecf044c2ec956c0f38a74463) - Extract Materialize parser for mypyc compilation *(PR [#7247](https://github.com/tobymao/sqlglot/pull/7247) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Materialize parser for mypyc compilation (#7247)
- due to [`5b51c64`](https://github.com/tobymao/sqlglot/commit/5b51c64a0d620469e696fcb7a2e86915b7f9a925) - Extract RisingWave parser for mypyc compilation *(PR [#7246](https://github.com/tobymao/sqlglot/pull/7246) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract RisingWave parser for mypyc compilation (#7246)
- due to [`6982d44`](https://github.com/tobymao/sqlglot/commit/6982d442ecebbeb38ee3cda1ab530b813dcff988) - Extract Solr parser for mypyc compilation *(PR [#7244](https://github.com/tobymao/sqlglot/pull/7244) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Solr parser for mypyc compilation (#7244)
- due to [`a57b632`](https://github.com/tobymao/sqlglot/commit/a57b632c512ff8be65629ea30dc9cd0fe69cb1d3) - Extract Redshift parser for mypyc compilation *(PR [#7245](https://github.com/tobymao/sqlglot/pull/7245) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Redshift parser for mypyc compilation (#7245)
- due to [`364fca7`](https://github.com/tobymao/sqlglot/commit/364fca74025eab10f8ba34f2498f9545321e8a3f) - Extract Tableau parser for mypyc compilation *(PR [#7243](https://github.com/tobymao/sqlglot/pull/7243) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Tableau parser for mypyc compilation (#7243)
- due to [`ab6331f`](https://github.com/tobymao/sqlglot/commit/ab6331fc920636e47c6bb03825086642d9425b77) - Extract SQLite parser for mypyc compilation *(PR [#7240](https://github.com/tobymao/sqlglot/pull/7240) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract SQLite parser for mypyc compilation (#7240)
- due to [`df6f052`](https://github.com/tobymao/sqlglot/commit/df6f05268e15f5de1685552ea87c69d2f5bd48c6) - Extract Drill parser for mypyc compilation *(PR [#7242](https://github.com/tobymao/sqlglot/pull/7242) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Drill parser for mypyc compilation (#7242)
- due to [`125ea72`](https://github.com/tobymao/sqlglot/commit/125ea7216a01f0d5288517b1aa7203c43b4e737a) - Extract Dremio parser for mypyc compilation *(PR [#7241](https://github.com/tobymao/sqlglot/pull/7241) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Dremio parser for mypyc compilation (#7241)
- due to [`a485038`](https://github.com/tobymao/sqlglot/commit/a485038a64dd560de093153b23c43f33526d4bf1) - Extract Exasol parser for mypyc compilation *(PR [#7239](https://github.com/tobymao/sqlglot/pull/7239) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Exasol parser for mypyc compilation (#7239)
- due to [`113447f`](https://github.com/tobymao/sqlglot/commit/113447f587891d431af063fa4f18f021033bcb88) - Extract PRQL parser for mypyc compilation *(PR [#7238](https://github.com/tobymao/sqlglot/pull/7238) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract PRQL parser for mypyc compilation (#7238)
- due to [`0872db7`](https://github.com/tobymao/sqlglot/commit/0872db71adc1da464d0d7022dbb58b064bd96abb) - Extract Teradata parser for mypyc compilation *(PR [#7237](https://github.com/tobymao/sqlglot/pull/7237) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Teradata parser for mypyc compilation (#7237)
- due to [`0fe1afd`](https://github.com/tobymao/sqlglot/commit/0fe1afd39a5105bc9406ecac0ea78c26254d7f9e) - Extract Oracle parser for mypyc compilation *(PR [#7236](https://github.com/tobymao/sqlglot/pull/7236) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Oracle parser for mypyc compilation (#7236)
- due to [`47e75e5`](https://github.com/tobymao/sqlglot/commit/47e75e5bb29c6ecd142ca4c51e27ac4ed9996f74) - Extract Snowflake parser for mypyc compilation *(PR [#7229](https://github.com/tobymao/sqlglot/pull/7229) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Snowflake parser for mypyc compilation (#7229)
- due to [`ea035e1`](https://github.com/tobymao/sqlglot/commit/ea035e15793c047df58af9f9a901c7b7c8ed07e2) - Rename Parser to <Dialect>Parser and auto-discover parsers in setup.py *(PR [#7252](https://github.com/tobymao/sqlglot/pull/7252) by [@VaggelisD](https://github.com/VaggelisD))*:
Rename Parser to <Dialect>Parser and auto-discover parsers in setup.py (#7252)
- due to [`e8d0dab`](https://github.com/tobymao/sqlglot/commit/e8d0dabf10d4afe22f2277d46cf931c39409063e) - Extract Databricks parser for mypyc compilation *(PR [#7253](https://github.com/tobymao/sqlglot/pull/7253) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Databricks parser for mypyc compilation (#7253)
- due to [`8c799ad`](https://github.com/tobymao/sqlglot/commit/8c799adf70cc0136f1c6647c3212239c83f6cbe1) - Extract Fabric parser for mypyc compilation *(PR [#7254](https://github.com/tobymao/sqlglot/pull/7254) by [@VaggelisD](https://github.com/VaggelisD))*:
Extract Fabric parser for mypyc compilation (#7254)
- due to [`b155a29`](https://github.com/tobymao/sqlglot/commit/b155a29574fbc57720637343529623c02b0db43a) - expression to not use **kwargs because it allocates multiple dicts *(PR [#7256](https://github.com/tobymao/sqlglot/pull/7256) by [@tobymao](https://github.com/tobymao))*:
expression to not use **kwargs because it allocates multiple dicts (#7256)
- due to [`17c2fc7`](https://github.com/tobymao/sqlglot/commit/17c2fc774fda32eb2f1c1baed354db10d4d11e3d) - JSON path with brackets containing non literals *(PR [#7251](https://github.com/tobymao/sqlglot/pull/7251) by [@geooo109](https://github.com/geooo109))*:
JSON path with brackets containing non literals (#7251)
- due to [`3d7bbb5`](https://github.com/tobymao/sqlglot/commit/3d7bbb5fd2689aed1b2f659abd8d1b18db421104) - parse single-arg TO_{GEOMETRY_GEOGRAPHY} as Cast *(PR [#7270](https://github.com/tobymao/sqlglot/pull/7270) by [@georgesittas](https://github.com/georgesittas))*:
parse single-arg TO_{GEOMETRY_GEOGRAPHY} as Cast (#7270)
- due to [`5a9a522`](https://github.com/tobymao/sqlglot/commit/5a9a52212f6ba975e1f671b712a89befe9c2d606) - support transpilation of SPLIT_PART from snowflake to duckdb *(PR [#7258](https://github.com/tobymao/sqlglot/pull/7258) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
support transpilation of SPLIT_PART from snowflake to duckdb (#7258)
- due to [`a13995e`](https://github.com/tobymao/sqlglot/commit/a13995e7c3441bcd8442b8a210cadd2055199492) - Move `ParserCore` back to `Parser` *(PR [#7268](https://github.com/tobymao/sqlglot/pull/7268) by [@VaggelisD](https://github.com/VaggelisD))*:
Move `ParserCore` back to `Parser` (#7268)
- due to [`07f6893`](https://github.com/tobymao/sqlglot/commit/07f68932e39f148c267ce1b12086b85d4d485bf7) - Fully compile schema *(PR [#7276](https://github.com/tobymao/sqlglot/pull/7276) by [@VaggelisD](https://github.com/VaggelisD))*:
Fully compile schema (#7276)
- due to [`79d72db`](https://github.com/tobymao/sqlglot/commit/79d72dbd2c770c53f9ec9c36dd67ae63860ba4fe) - Transpilation support for to_variant *(PR [#7262](https://github.com/tobymao/sqlglot/pull/7262) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
Transpilation support for to_variant (#7262)
- due to [`3f94428`](https://github.com/tobymao/sqlglot/commit/3f94428507d7207ca99e76cebef9375bd3648f4d) - Transpilation support for HASH_AGG *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
Transpilation support for HASH_AGG
- due to [`1bd952b`](https://github.com/tobymao/sqlglot/commit/1bd952bfc68926405e5fe7efb1bb833dd6dd6dfb) - Transpilation support for HASH_AGG *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
Transpilation support for HASH_AGG
- due to [`bfa4818`](https://github.com/tobymao/sqlglot/commit/bfa48188e45601491f981c4cea8a4bd8a2c6a0a2) - Implement transpilation for ARRAY_SORT function *(PR [#7223](https://github.com/tobymao/sqlglot/pull/7223) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Implement transpilation for ARRAY_SORT function (#7223)
- due to [`4b64898`](https://github.com/tobymao/sqlglot/commit/4b648985a166ac091b8a46af1590caf59f9bc31b) - robust support for IGNORE NULLS *(PR [#7288](https://github.com/tobymao/sqlglot/pull/7288) by [@geooo109](https://github.com/geooo109))*:
robust support for IGNORE NULLS (#7288)
### :sparkles: New Features
- [`8ee0646`](https://github.com/tobymao/sqlglot/commit/8ee0646baa6dfae7e96ca86e2c1af5d53fc04290) - **clickhouse**: Transpile numeric literals with underscores from ClickHouse to other dialects *(PR [#7132](https://github.com/tobymao/sqlglot/pull/7132) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`68da927`](https://github.com/tobymao/sqlglot/commit/68da927d3418eccfe261c22c6e39d8742f52f01c) - **exasol**: support REGEXP_LIKE binary predicate *(PR [#7136](https://github.com/tobymao/sqlglot/pull/7136) by [@marconae](https://github.com/marconae))*
- [`1b5a7d7`](https://github.com/tobymao/sqlglot/commit/1b5a7d7e2a65665bb3cb0e8efc11062bf891ee28) - **exasol**: transpile FROM_UNIXTIME to FROM_POSIX_TIME *(PR [#7133](https://github.com/tobymao/sqlglot/pull/7133) by [@marconae](https://github.com/marconae))*
- [`dff662a`](https://github.com/tobymao/sqlglot/commit/dff662a1389bdfbe6c331ca31dd37f76a6353429) - **duckdb**: add transpilation support for ARRAY_GENERATE_RANGE function *(PR [#7107](https://github.com/tobymao/sqlglot/pull/7107) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`8e6b61f`](https://github.com/tobymao/sqlglot/commit/8e6b61f18e465b24ad9e20a8e1509486177fbb32) - **snowflake**: transpilation support MAP_DELETE *(PR [#7139](https://github.com/tobymao/sqlglot/pull/7139) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`483791d`](https://github.com/tobymao/sqlglot/commit/483791d66302a463041094c668421a1d4cc8061e) - **clickhouse**: support nested JSON subcolumn access *(PR [#7140](https://github.com/tobymao/sqlglot/pull/7140) by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog))*
- [`260f116`](https://github.com/tobymao/sqlglot/commit/260f116df06a4e5e7eb81f87713b84e551e012c8) - **clickhouse**: support JSON type arguments *(PR [#7141](https://github.com/tobymao/sqlglot/pull/7141) by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog))*
- [`1b1db57`](https://github.com/tobymao/sqlglot/commit/1b1db5728903d6468eba3d07da2a468395bf628b) - **snowflake**: transpilation support MAP_SIZE *(PR [#7146](https://github.com/tobymao/sqlglot/pull/7146) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`0b4e26b`](https://github.com/tobymao/sqlglot/commit/0b4e26b8e7045bcf68992b6a2c8a5fd51b8262d7) - **optimizer**: annotate EXTRACT(expr) for DuckDB *(PR [#7154](https://github.com/tobymao/sqlglot/pull/7154) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`b2e736c`](https://github.com/tobymao/sqlglot/commit/b2e736cd4ae1dd949b5ac59ae263599f8d6f259c) - postgres -> sqlite transpilation improvements *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`c91e8d9`](https://github.com/tobymao/sqlglot/commit/c91e8d9dd8a9cdcfaec791144326cf6038edf414) - **clickhouse**: ANY/ALL joins *(PR [#7157](https://github.com/tobymao/sqlglot/pull/7157) by [@geooo109](https://github.com/geooo109))*
- [`7cc4332`](https://github.com/tobymao/sqlglot/commit/7cc43327ba72b3a1af6d8f2f489a97b997748ee9) - **duckdb**: support transpilation of function RIGHT from Snowflake to DuckDB *(PR [#7148](https://github.com/tobymao/sqlglot/pull/7148) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`63f2981`](https://github.com/tobymao/sqlglot/commit/63f29812e41e1d7d4bb3de349f33c42ee8103498) - **trino**: Add support for ARRAY_FIRST(array, x -> predicate) *(PR [#7147](https://github.com/tobymao/sqlglot/pull/7147) by [@gertjanal](https://github.com/gertjanal))*
- [`d76dc36`](https://github.com/tobymao/sqlglot/commit/d76dc36a0c2b15ff795725f1a71431ba247eda96) - **clickhouse**: add support for sql security property *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`ad9d114`](https://github.com/tobymao/sqlglot/commit/ad9d114aea7f7553485631372d99ec5e5cf85045) - **DuckDB**: Enable transpilation for ARRAY_POSITION function *(PR [#7153](https://github.com/tobymao/sqlglot/pull/7153) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`684ff4a`](https://github.com/tobymao/sqlglot/commit/684ff4a13b1220fd5d3c0ec597cbdc630a3b9c03) - **clickhouse**: support arrayExcept for ClickHouse *(PR [#7161](https://github.com/tobymao/sqlglot/pull/7161) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`b97da8d`](https://github.com/tobymao/sqlglot/commit/b97da8dea15c39867b23db01624464e7d15427e7) - **spark, dbx**: robust SET support *(PR [#7166](https://github.com/tobymao/sqlglot/pull/7166) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7165](https://github.com/tobymao/sqlglot/issues/7165) opened by [@aersam](https://github.com/aersam)*
- [`c74049c`](https://github.com/tobymao/sqlglot/commit/c74049c2c573522c398b3e179a09a7b49b52f54f) - **databricks**: Add support for HANDLER and PARAMETER STYLE properties *(PR [#7150](https://github.com/tobymao/sqlglot/pull/7150) by [@aersam](https://github.com/aersam))*
- [`d5840c5`](https://github.com/tobymao/sqlglot/commit/d5840c53f6a359def002c0b634a48706519b11e7) - **duckdb**: support transpilation of RANDOM from Snowflake to DuckDB *(PR [#7163](https://github.com/tobymao/sqlglot/pull/7163) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`07ef171`](https://github.com/tobymao/sqlglot/commit/07ef1711fdff0fa8f877b93f5be8921424eed438) - **Clickhouse**: Add support for multiple-suffix combined aggregate functions in Clickhouse dialect *(PR [#7109](https://github.com/tobymao/sqlglot/pull/7109) by [@emanb29](https://github.com/emanb29))*
- [`e18a24e`](https://github.com/tobymao/sqlglot/commit/e18a24e108976910e55b77d863fa4b5eeb622684) - **exasol**: Custom Transformation of GROUP BY ALL in exasol dialect *(PR [#7151](https://github.com/tobymao/sqlglot/pull/7151) by [@nnamdi16](https://github.com/nnamdi16))*
- [`280e247`](https://github.com/tobymao/sqlglot/commit/280e24726be22a4f06261168d5dfc74b361dd04d) - **duckdb**: Add transpilation support for NULLs and mutiset semantics in ARRAY_INTERSECTION *(PR [#7145](https://github.com/tobymao/sqlglot/pull/7145) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`542e392`](https://github.com/tobymao/sqlglot/commit/542e3920fb7d232b523e950820750e549a8d909a) - **duckdb**: Add transpilation support for NULLs and mutiset semantics in ARRAY_INTERSECTION *(PR [#7145](https://github.com/tobymao/sqlglot/pull/7145) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`ff61214`](https://github.com/tobymao/sqlglot/commit/ff61214ab3f3ee48a413020867144a7f4d0b39c3) - **databricks**: Add support for DECLARE OR REPLACE *(PR [#7169](https://github.com/tobymao/sqlglot/pull/7169) by [@aersam](https://github.com/aersam))*
- :arrow_lower_right: *addresses issue [#7168](https://github.com/tobymao/sqlglot/issues/7168) opened by [@aersam](https://github.com/aersam)*
- [`90e8cab`](https://github.com/tobymao/sqlglot/commit/90e8cab0a54c225698f1cfa33d0ddbc92793fa15) - **clickhouse**: support robust ASSUME/CHECK constraints *(PR [#7170](https://github.com/tobymao/sqlglot/pull/7170) by [@geooo109](https://github.com/geooo109))*
- [`4273991`](https://github.com/tobymao/sqlglot/commit/427399151aa69ff934c802b3452bd4ad4f7010e7) - **clickhouse**: support DROP with SYNC *(PR [#7172](https://github.com/tobymao/sqlglot/pull/7172) by [@geooo109](https://github.com/geooo109))*
- [`0c5c3f1`](https://github.com/tobymao/sqlglot/commit/0c5c3f17637df659004036c37c569ad42da21dd4) - **duckdb**: support GROUPS for WINDOW *(PR [#7185](https://github.com/tobymao/sqlglot/pull/7185) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7176](https://github.com/tobymao/sqlglot/issues/7176) opened by [@denis-komarov](https://github.com/denis-komarov)*
- [`af05677`](https://github.com/tobymao/sqlglot/commit/af05677fe08a2830bb0a18587f0c0f8dfbc5b9bd) - make Query and DerivedTable inherit from Selectable *(commit by [@tobymao](https://github.com/tobymao))*
- [`cab0f24`](https://github.com/tobymao/sqlglot/commit/cab0f24ad212eea592f532628f4fc10489fc32f7) - compile scope for mypy *(PR [#7192](https://github.com/tobymao/sqlglot/pull/7192) by [@tobymao](https://github.com/tobymao))*
- [`8db0323`](https://github.com/tobymao/sqlglot/commit/8db03233f88f106f0339e53237a5f054c4e61b3a) - compile qualify and resolver *(PR [#7193](https://github.com/tobymao/sqlglot/pull/7193) by [@tobymao](https://github.com/tobymao))*
- [`3de5d29`](https://github.com/tobymao/sqlglot/commit/3de5d29ef5fd19e2f1ac0b2681e29e8a6c6fbd48) - **duckdb**: Add transpilation support for ARRAY_SLICE function *(PR [#7188](https://github.com/tobymao/sqlglot/pull/7188) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`e0947ad`](https://github.com/tobymao/sqlglot/commit/e0947adcaeb1e3cb829e584e0b071c598c64cfa9) - **Snowflake**: set default window frame for certain Snowflake ranking functions during transpilation *(PR [#7195](https://github.com/tobymao/sqlglot/pull/7195) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`4a3254f`](https://github.com/tobymao/sqlglot/commit/4a3254fbd1bfee7aa6787d3fc31832d8e9771932) - **snowflake**: transpilation support MAP_PICK *(PR [#7189](https://github.com/tobymao/sqlglot/pull/7189) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`9431fd4`](https://github.com/tobymao/sqlglot/commit/9431fd457dc4dbad7a963828c5303889573079d3) - **optimizer**: annotate CURRENT_TIMESTAMP for TSQL *(PR [#7208](https://github.com/tobymao/sqlglot/pull/7208) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`cc8724d`](https://github.com/tobymao/sqlglot/commit/cc8724d791938e440c8d72d72c4ec301ca02eee9) - **clickhouse**: support cityHash64 *(PR [#7209](https://github.com/tobymao/sqlglot/pull/7209) by [@geooo109](https://github.com/geooo109))*
- [`a39d3e9`](https://github.com/tobymao/sqlglot/commit/a39d3e999e707114226edb806061b80e0164489a) - **duckdb**: Implement transpilation for ARRAYS_OVERLAP function *(PR [#7200](https://github.com/tobymao/sqlglot/pull/7200) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`3ef5db9`](https://github.com/tobymao/sqlglot/commit/3ef5db9ca10527e237340cc24612d63d4d1bcf1b) - **clickhouse**: support DETACH *(PR [#7215](https://github.com/tobymao/sqlglot/pull/7215) by [@geooo109](https://github.com/geooo109))*
- [`b5f888e`](https://github.com/tobymao/sqlglot/commit/b5f888e403b20dc9729eb7f01f5cc5227f173ce2) - **Snowflake**: handle NULL discrepancy during transpilation of SPLIT from Snowflake to DuckDB *(PR [#7216](https://github.com/tobymao/sqlglot/pull/7216) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`5599478`](https://github.com/tobymao/sqlglot/commit/55994785bae54dd37ffc40b085878d186780f033) - Compile base & BigQuery's parser with mypyc *(PR [#7206](https://github.com/tobymao/sqlglot/pull/7206) by [@VaggelisD](https://github.com/VaggelisD))*
- [`319f359`](https://github.com/tobymao/sqlglot/commit/319f3591e53013b972c57057c65479d7024a4388) - **tsql**: Move parser out and enable compilation *(PR [#7221](https://github.com/tobymao/sqlglot/pull/7221) by [@VaggelisD](https://github.com/VaggelisD))*
- [`3c02ea8`](https://github.com/tobymao/sqlglot/commit/3c02ea8a2c515d53e89c0d7455392a2b8fac2d8a) - **snowflake**: handle empty separator for SPLIT transpilation (Snowflake -> Duckdb) *(PR [#7224](https://github.com/tobymao/sqlglot/pull/7224) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`c34bc2d`](https://github.com/tobymao/sqlglot/commit/c34bc2d17c2467b433d49e8e84611ec6acb39580) - **snowflake**: transpilation support MAP_INSERT *(PR [#7190](https://github.com/tobymao/sqlglot/pull/7190) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`4ae6c3d`](https://github.com/tobymao/sqlglot/commit/4ae6c3d8fe774c57647491572b764a4c2767704a) - fast path for tokenizer *(PR [#7226](https://github.com/tobymao/sqlglot/pull/7226) by [@tobymao](https://github.com/tobymao))*
- [`5a9a522`](https://github.com/tobymao/sqlglot/commit/5a9a52212f6ba975e1f671b712a89befe9c2d606) - **Snowflake**: support transpilation of SPLIT_PART from snowflake to duckdb *(PR [#7258](https://github.com/tobymao/sqlglot/pull/7258) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`dc4a7ef`](https://github.com/tobymao/sqlglot/commit/dc4a7ef7a1739ecc6b4ff8ff1ab018d61d7bcffa) - support multi-word DESCRIBE kinds in Snowflake *(PR [#7260](https://github.com/tobymao/sqlglot/pull/7260) by [@sabir-akhadov-localstack](https://github.com/sabir-akhadov-localstack))*
- [`f15b8b0`](https://github.com/tobymao/sqlglot/commit/f15b8b018ddb0aa1bd26683c439ab2d063ca9cd8) - transpile postgres GREATEST(x,y) to MAX in sqlite *(PR [#7274](https://github.com/tobymao/sqlglot/pull/7274) by [@treysp](https://github.com/treysp))*
- [`79d72db`](https://github.com/tobymao/sqlglot/commit/79d72dbd2c770c53f9ec9c36dd67ae63860ba4fe) - **snowflake**: Transpilation support for to_variant *(PR [#7262](https://github.com/tobymao/sqlglot/pull/7262) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`bfa4818`](https://github.com/tobymao/sqlglot/commit/bfa48188e45601491f981c4cea8a4bd8a2c6a0a2) - **duckdb**: Implement transpilation for ARRAY_SORT function *(PR [#7223](https://github.com/tobymao/sqlglot/pull/7223) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
### :bug: Bug Fixes
- [`81a3763`](https://github.com/tobymao/sqlglot/commit/81a37636c374690d12fe0b57d78adf2310daf3cb) - **exasol**: cast string literals to TIMESTAMP in TO_CHAR generation *(PR [#7127](https://github.com/tobymao/sqlglot/pull/7127) by [@marconae](https://github.com/marconae))*
- [`351e958`](https://github.com/tobymao/sqlglot/commit/351e958c3cd8a1395826ef624979275b246490f8) - **exasol**: fix parsing error in json_extract for exasol *(PR [#7098](https://github.com/tobymao/sqlglot/pull/7098) by [@nnamdi16](https://github.com/nnamdi16))*
- [`95d7d20`](https://github.com/tobymao/sqlglot/commit/95d7d2052b1ed8fc64a99d557b8b085ad466100e) - **redshift**: annotate `TO_TIMESTAMP` as `TIMESTAMPTZ` fixes [#7155](https://github.com/tobymao/sqlglot/pull/7155) *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`50d58a5`](https://github.com/tobymao/sqlglot/commit/50d58a5843cfc02f11acf0fe28b2ad7c9a59e252) - **parser**: support more DICTIONARY properties *(PR [#7158](https://github.com/tobymao/sqlglot/pull/7158) by [@geooo109](https://github.com/geooo109))*
- [`363167c`](https://github.com/tobymao/sqlglot/commit/363167c6609fa80b6014851b4415adca17b00df4) - **duckdb**: parse FILE column *(PR [#7184](https://github.com/tobymao/sqlglot/pull/7184) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7175](https://github.com/tobymao/sqlglot/issues/7175) opened by [@denis-komarov](https://github.com/denis-komarov)*
- [`baa9974`](https://github.com/tobymao/sqlglot/commit/baa9974b8042eaef7897537772b1002c30e503b8) - **duckdb**: fix IGNORE NULLS in AGG FUNC *(PR [#7187](https://github.com/tobymao/sqlglot/pull/7187) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7179](https://github.com/tobymao/sqlglot/issues/7179) opened by [@denis-komarov](https://github.com/denis-komarov)*
- [`f630d75`](https://github.com/tobymao/sqlglot/commit/f630d7579231f29fa5637b48f1be0b5665eb36b3) - **clickhouse**: support dotcolon with JSON *(PR [#7191](https://github.com/tobymao/sqlglot/pull/7191) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7183](https://github.com/tobymao/sqlglot/issues/7183) opened by [@telperions](https://github.com/telperions)*
- [`eea5880`](https://github.com/tobymao/sqlglot/commit/eea58807411edf962a1cdc28e02337a428866665) - **snowflake**: suppor positional `GENERATOR` args *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`29399bb`](https://github.com/tobymao/sqlglot/commit/29399bbed44a74d95257040fd36f0a0f6de7c7d8) - **exasol**: remove invalid group by distinct during custom transformation of group by all *(PR [#7197](https://github.com/tobymao/sqlglot/pull/7197) by [@nnamdi16](https://github.com/nnamdi16))*
- [`3ee3db5`](https://github.com/tobymao/sqlglot/commit/3ee3db59de23de0bbaed85c8779b6663b435a1e9) - **clickhouse**: support nested field for INSERT *(PR [#7199](https://github.com/tobymao/sqlglot/pull/7199) by [@geooo109](https://github.com/geooo109))*
- [`81bc810`](https://github.com/tobymao/sqlglot/commit/81bc8102a7fbb33188869694800e8db9ae84541a) - **clickhouse**: make ArrayDistinct transpilable *(commit by [@timoha](https://github.com/timoha))*
- [`6b21d7a`](https://github.com/tobymao/sqlglot/commit/6b21d7a5932afdc6ba117c808203777db9f329a2) - **clickhouse**: empty brackets handling *(PR [#7211](https://github.com/tobymao/sqlglot/pull/7211) by [@geooo109](https://github.com/geooo109))*
- [`4087a15`](https://github.com/tobymao/sqlglot/commit/4087a152c5d4372ab53644061980b81a9174db1e) - **databricks**: properly handle GENERATED ALWAYS/BY DEFAULT *(PR [#7210](https://github.com/tobymao/sqlglot/pull/7210) by [@anna-stepien](https://github.com/anna-stepien))*
- [`37b0f9f`](https://github.com/tobymao/sqlglot/commit/37b0f9f6b897d4289d87dfd78d42ca3df64870ba) - **spark, dbx**: support RECURSIVE ctes *(PR [#7214](https://github.com/tobymao/sqlglot/pull/7214) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7213](https://github.com/tobymao/sqlglot/issues/7213) opened by [@aersam](https://github.com/aersam)*
- [`e990b67`](https://github.com/tobymao/sqlglot/commit/e990b671120ce66036ffdc4c65e5db8b36eaec5f) - **redshift**: avoid warning for IGNORE/RESPECT NULLS *(PR [#7222](https://github.com/tobymao/sqlglot/pull/7222) by [@geooo109](https://github.com/geooo109))*
- [`172e399`](https://github.com/tobymao/sqlglot/commit/172e399f6211f73708ba9e423cf90c9ff83ffba3) - **hive, spark, dbx**: dash in json path *(PR [#7257](https://github.com/tobymao/sqlglot/pull/7257) by [@geooo109](https://github.com/geooo109))*
- [`17c2fc7`](https://github.com/tobymao/sqlglot/commit/17c2fc774fda32eb2f1c1baed354db10d4d11e3d) - **snowflake**: JSON path with brackets containing non literals *(PR [#7251](https://github.com/tobymao/sqlglot/pull/7251) by [@geooo109](https://github.com/geooo109))*
- [`fd87f53`](https://github.com/tobymao/sqlglot/commit/fd87f53f7ab5d68904555e9fae0a025c134faeaf) - **duckdb**: transpile DATE_TRUNC from bigquery *(PR [#7263](https://github.com/tobymao/sqlglot/pull/7263) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7261](https://github.com/tobymao/sqlglot/issues/7261) opened by [@MaxHalford](https://github.com/MaxHalford)*
- [`3d7bbb5`](https://github.com/tobymao/sqlglot/commit/3d7bbb5fd2689aed1b2f659abd8d1b18db421104) - **snowflake**: parse single-arg TO_{GEOMETRY_GEOGRAPHY} as Cast *(PR [#7270](https://github.com/tobymao/sqlglot/pull/7270) by [@georgesittas](https://github.com/georgesittas))*
- [`3e16da6`](https://github.com/tobymao/sqlglot/commit/3e16da64c0c32bd970b2ab5fd5ff2fdc3a134feb) - Make unit silently failing to move .so *(PR [#7272](https://github.com/tobymao/sqlglot/pull/7272) by [@VaggelisD](https://github.com/VaggelisD))*
- [`c3eb8e2`](https://github.com/tobymao/sqlglot/commit/c3eb8e22c8ed83029a38640ae569d829c7258d0d) - **optimizer**: `qualify_tables` overwriting FQN alias mapping for duplicate tables *(PR [#7278](https://github.com/tobymao/sqlglot/pull/7278) by [@cg-roling](https://github.com/cg-roling))*
- [`0527315`](https://github.com/tobymao/sqlglot/commit/0527315a23dc44c736de80fa753125da764e95ba) - Drop schema with if exists displacing catalog *(PR [#7285](https://github.com/tobymao/sqlglot/pull/7285) by [@themisvaltinos](https://github.com/themisvaltinos))*
- [`a2964dd`](https://github.com/tobymao/sqlglot/commit/a2964ddb88ac518a57e19c620358e7e4a03e611e) - **duckdb**: complete ARRAY_SORT transpilation logic *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`6d6250d`](https://github.com/tobymao/sqlglot/commit/6d6250db9b8bf257d86a59266c48a02fe10cd1b3) - **bigquery**: no warning for window funcs with NULL order *(PR [#7280](https://github.com/tobymao/sqlglot/pull/7280) by [@geooo109](https://github.com/geooo109))*
- [`4b64898`](https://github.com/tobymao/sqlglot/commit/4b648985a166ac091b8a46af1590caf59f9bc31b) - **hive, spark**: robust support for IGNORE NULLS *(PR [#7288](https://github.com/tobymao/sqlglot/pull/7288) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7282](https://github.com/tobymao/sqlglot/issues/7282) opened by [@catlynkong](https://github.com/catlynkong)*
- [`4cb1a7f`](https://github.com/tobymao/sqlglot/commit/4cb1a7faf3e5a431ea482f34e197485a1611d8c4) - handle single-element `RANGE` during duckdb->spark transpilation *(PR [#7294](https://github.com/tobymao/sqlglot/pull/7294) by [@ShubhamKapoor992](https://github.com/ShubhamKapoor992))*
- :arrow_lower_right: *fixes issue [#7291](https://github.com/tobymao/sqlglot/issues/7291) opened by [@huydo862003](https://github.com/huydo862003)*
- [`002bdaf`](https://github.com/tobymao/sqlglot/commit/002bdafbd5315d7e7fa67903478ed888fb1b1229) - don't warn for sqlglotrs if sqlglotc is found *(PR [#7290](https://github.com/tobymao/sqlglot/pull/7290) by [@rolandwalker](https://github.com/rolandwalker))*
- [`0eb5aae`](https://github.com/tobymao/sqlglot/commit/0eb5aae8e348774ae5f12bd7e0140da6f8e16da4) - **optimizer**: add forward-reference guard to pushdown_dnf, fixing cycle error *(PR [#7299](https://github.com/tobymao/sqlglot/pull/7299) by [@snovik75](https://github.com/snovik75))*
- :arrow_lower_right: *fixes issue [#7297](https://github.com/tobymao/sqlglot/issues/7297) opened by [@snovik75](https://github.com/snovik75)*
- [`6f471f1`](https://github.com/tobymao/sqlglot/commit/6f471f1bfb466b32f04c814a0beb6fa23e045eff) - unnest_subqueries crashes when correlated subquery is inside a function in SELECT *(PR [#7300](https://github.com/tobymao/sqlglot/pull/7300) by [@snovik75](https://github.com/snovik75))*
- :arrow_lower_right: *fixes issue [#7295](https://github.com/tobymao/sqlglot/issues/7295) opened by [@snovik75](https://github.com/snovik75)*
### :zap: Performance Improvements
- [`489ba1d`](https://github.com/tobymao/sqlglot/commit/489ba1dd0b6024f2d876b474b451b5e6fa8d27de) - **parser**: fast path for column reference parsing *(PR [#7293](https://github.com/tobymao/sqlglot/pull/7293) by [@tobymao](https://github.com/tobymao))*
### :recycle: Refactors
- [`74fd80c`](https://github.com/tobymao/sqlglot/commit/74fd80cdf055c828cedfac43b4b54132d18558bb) - split up expressions.py *(PR [#7160](https://github.com/tobymao/sqlglot/pull/7160) by [@tobymao](https://github.com/tobymao))*
- [`8256e08`](https://github.com/tobymao/sqlglot/commit/8256e08e55bb12ac3598e2b1f936e5ef380e2cf8) - Extract Spark parser for mypyc compilation *(PR [#7235](https://github.com/tobymao/sqlglot/pull/7235) by [@VaggelisD](https://github.com/VaggelisD))*
- [`2379947`](https://github.com/tobymao/sqlglot/commit/237994706746d6a294bfae0b413a0ec479645c2c) - Extract SingleStore parser for mypyc compilation *(PR [#7250](https://github.com/tobymao/sqlglot/pull/7250) by [@VaggelisD](https://github.com/VaggelisD))*
- [`27b6f56`](https://github.com/tobymao/sqlglot/commit/27b6f56a3871a0d2152e3eb26ac26dd56a4b5ff3) - Extract Doris parser for mypyc compilation *(PR [#7249](https://github.com/tobymao/sqlglot/pull/7249) by [@VaggelisD](https://github.com/VaggelisD))*
- [`5c8b003`](https://github.com/tobymao/sqlglot/commit/5c8b0037e2a6a8ccd5588234bb591d42904e8a02) - Extract StarRocks parser for mypyc compilation *(PR [#7248](https://github.com/tobymao/sqlglot/pull/7248) by [@VaggelisD](https://github.com/VaggelisD))*
- [`669bc3f`](https://github.com/tobymao/sqlglot/commit/669bc3f7711253d4ecf044c2ec956c0f38a74463) - Extract Materialize parser for mypyc compilation *(PR [#7247](https://github.com/tobymao/sqlglot/pull/7247) by [@VaggelisD](https://github.com/VaggelisD))*
- [`5b51c64`](https://github.com/tobymao/sqlglot/commit/5b51c64a0d620469e696fcb7a2e86915b7f9a925) - Extract RisingWave parser for mypyc compilation *(PR [#7246](https://github.com/tobymao/sqlglot/pull/7246) by [@VaggelisD](https://github.com/VaggelisD))*
- [`6982d44`](https://github.com/tobymao/sqlglot/commit/6982d442ecebbeb38ee3cda1ab530b813dcff988) - Extract Solr parser for mypyc compilation *(PR [#7244](https://github.com/tobymao/sqlglot/pull/7244) by [@VaggelisD](https://github.com/VaggelisD))*
- [`a57b632`](https://github.com/tobymao/sqlglot/commit/a57b632c512ff8be65629ea30dc9cd0fe69cb1d3) - Extract Redshift parser for mypyc compilation *(PR [#7245](https://github.com/tobymao/sqlglot/pull/7245) by [@VaggelisD](https://github.com/VaggelisD))*
- [`364fca7`](https://github.com/tobymao/sqlglot/commit/364fca74025eab10f8ba34f2498f9545321e8a3f) - Extract Tableau parser for mypyc compilation *(PR [#7243](https://github.com/tobymao/sqlglot/pull/7243) by [@VaggelisD](https://github.com/VaggelisD))*
- [`ab6331f`](https://github.com/tobymao/sqlglot/commit/ab6331fc920636e47c6bb03825086642d9425b77) - Extract SQLite parser for mypyc compilation *(PR [#7240](https://github.com/tobymao/sqlglot/pull/7240) by [@VaggelisD](https://github.com/VaggelisD))*
- [`df6f052`](https://github.com/tobymao/sqlglot/commit/df6f05268e15f5de1685552ea87c69d2f5bd48c6) - Extract Drill parser for mypyc compilation *(PR [#7242](https://github.com/tobymao/sqlglot/pull/7242) by [@VaggelisD](https://github.com/VaggelisD))*
- [`125ea72`](https://github.com/tobymao/sqlglot/commit/125ea7216a01f0d5288517b1aa7203c43b4e737a) - Extract Dremio parser for mypyc compilation *(PR [#7241](https://github.com/tobymao/sqlglot/pull/7241) by [@VaggelisD](https://github.com/VaggelisD))*
- [`a485038`](https://github.com/tobymao/sqlglot/commit/a485038a64dd560de093153b23c43f33526d4bf1) - Extract Exasol parser for mypyc compilation *(PR [#7239](https://github.com/tobymao/sqlglot/pull/7239) by [@VaggelisD](https://github.com/VaggelisD))*
- [`113447f`](https://github.com/tobymao/sqlglot/commit/113447f587891d431af063fa4f18f021033bcb88) - Extract PRQL parser for mypyc compilation *(PR [#7238](https://github.com/tobymao/sqlglot/pull/7238) by [@VaggelisD](https://github.com/VaggelisD))*
- [`0872db7`](https://github.com/tobymao/sqlglot/commit/0872db71adc1da464d0d7022dbb58b064bd96abb) - Extract Teradata parser for mypyc compilation *(PR [#7237](https://github.com/tobymao/sqlglot/pull/7237) by [@VaggelisD](https://github.com/VaggelisD))*
- [`0fe1afd`](https://github.com/tobymao/sqlglot/commit/0fe1afd39a5105bc9406ecac0ea78c26254d7f9e) - Extract Oracle parser for mypyc compilation *(PR [#7236](https://github.com/tobymao/sqlglot/pull/7236) by [@VaggelisD](https://github.com/VaggelisD))*
- [`47e75e5`](https://github.com/tobymao/sqlglot/commit/47e75e5bb29c6ecd142ca4c51e27ac4ed9996f74) - Extract Snowflake parser for mypyc compilation *(PR [#7229](https://github.com/tobymao/sqlglot/pull/7229) by [@VaggelisD](https://github.com/VaggelisD))*
- [`ea035e1`](https://github.com/tobymao/sqlglot/commit/ea035e15793c047df58af9f9a901c7b7c8ed07e2) - Rename Parser to <Dialect>Parser and auto-discover parsers in setup.py *(PR [#7252](https://github.com/tobymao/sqlglot/pull/7252) by [@VaggelisD](https://github.com/VaggelisD))*
- [`e8d0dab`](https://github.com/tobymao/sqlglot/commit/e8d0dabf10d4afe22f2277d46cf931c39409063e) - Extract Databricks parser for mypyc compilation *(PR [#7253](https://github.com/tobymao/sqlglot/pull/7253) by [@VaggelisD](https://github.com/VaggelisD))*
- [`8c799ad`](https://github.com/tobymao/sqlglot/commit/8c799adf70cc0136f1c6647c3212239c83f6cbe1) - Extract Fabric parser for mypyc compilation *(PR [#7254](https://github.com/tobymao/sqlglot/pull/7254) by [@VaggelisD](https://github.com/VaggelisD))*
- [`b155a29`](https://github.com/tobymao/sqlglot/commit/b155a29574fbc57720637343529623c02b0db43a) - expression to not use **kwargs because it allocates multiple dicts *(PR [#7256](https://github.com/tobymao/sqlglot/pull/7256) by [@tobymao](https://github.com/tobymao))*
- [`07f6893`](https://github.com/tobymao/sqlglot/commit/07f68932e39f148c267ce1b12086b85d4d485bf7) - Fully compile schema *(PR [#7276](https://github.com/tobymao/sqlglot/pull/7276) by [@VaggelisD](https://github.com/VaggelisD))*
### :white_check_mark: Tests
- [`ed5e179`](https://github.com/tobymao/sqlglot/commit/ed5e1792a30e5172620e263edcae65f2f892f55b) - **snowflake**: Added tests for to_array *(PR [#7201](https://github.com/tobymao/sqlglot/pull/7201) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`3f94428`](https://github.com/tobymao/sqlglot/commit/3f94428507d7207ca99e76cebef9375bd3648f4d) - **snowflake**: Transpilation support for HASH_AGG *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`1bd952b`](https://github.com/tobymao/sqlglot/commit/1bd952bfc68926405e5fe7efb1bb833dd6dd6dfb) - **snowflake**: Transpilation support for HASH_AGG *(commit by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
### :wrench: Chores
- [`76c7eeb`](https://github.com/tobymao/sqlglot/commit/76c7eeb7657a5435f1086c16317927b2780c6ad9) - cleanup makefile *(commit by [@tobymao](https://github.com/tobymao))*
- [`588e565`](https://github.com/tobymao/sqlglot/commit/588e5650467f5cb9903ac1fa5ece59c3bfb42c8e) - **exasol**: DAYS_BETWEEN tests *(PR [#7135](https://github.com/tobymao/sqlglot/pull/7135) by [@marconae](https://github.com/marconae))*
- [`ea424bf`](https://github.com/tobymao/sqlglot/commit/ea424bf865aa4d7bbca62b834f6994c05232fdf0) - **tokenizer**: Replace SPACE_CHARS with str.isspace *(PR [#7134](https://github.com/tobymao/sqlglot/pull/7134) by [@VaggelisD](https://github.com/VaggelisD))*
- [`e1c26c5`](https://github.com/tobymao/sqlglot/commit/e1c26c5425a602030e5fefd5fe76614081fe3991) - keep api-docs in sync with main, only add docs/ on top *(PR [#7137](https://github.com/tobymao/sqlglot/pull/7137) by [@georgesittas](https://github.com/georgesittas))*
- [`f69a152`](https://github.com/tobymao/sqlglot/commit/f69a152d51666abd832a497299db1fefdfaa3ec9) - add tests for transpiling LAG from snowflake to duckdb *(PR [#7138](https://github.com/tobymao/sqlglot/pull/7138) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`842462e`](https://github.com/tobymao/sqlglot/commit/842462e2fc36f7d69ecc4989d0c8d4600e013c61) - move ruff config to pyproject.toml *(PR [#7149](https://github.com/tobymao/sqlglot/pull/7149) by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog))*
- [`4a955cb`](https://github.com/tobymao/sqlglot/commit/4a955cb993ae24d91a5094b7849ceb60ab963419) - scan all modules under sqlglot/ for doc tests *(PR [#7162](https://github.com/tobymao/sqlglot/pull/7162) by [@georgesittas](https://github.com/georgesittas))*
- [`3a930da`](https://github.com/tobymao/sqlglot/commit/3a930dad611743a4b6b1d647e27af2324db4f755) - add integration test automations *(PR [#7167](https://github.com/tobymao/sqlglot/pull/7167) by [@georgesittas](https://github.com/georgesittas))*
- [`151f961`](https://github.com/tobymao/sqlglot/commit/151f961f6575e9cdd54a1cab3dad66fa2a12774c) - update parse_one description *(PR [#7181](https://github.com/tobymao/sqlglot/pull/7181) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7173](https://github.com/tobymao/sqlglot/issues/7173) opened by [@AhlamHani](https://github.com/AhlamHani)*
- [`ab8331c`](https://github.com/tobymao/sqlglot/commit/ab8331c67dd43ee2add85520507211203e85817f) - consolidate `SecurityProperty` and `SqlSecurityProperty` *(PR [#7174](https://github.com/tobymao/sqlglot/pull/7174) by [@jwhitaker-gridcog](https://github.com/jwhitaker-gridcog))*
- [`4f5abdb`](https://github.com/tobymao/sqlglot/commit/4f5abdb3fb0cfcaaca9763ced38a7920c2eab548) - refactor SQL SECURITY property location logic in MySQL *(PR [#7186](https://github.com/tobymao/sqlglot/pull/7186) by [@georgesittas](https://github.com/georgesittas))*
- [`a3fecc5`](https://github.com/tobymao/sqlglot/commit/a3fecc5dbc827c0873cd83cfc8388b081bcec75b) - qol improvements to integration test workflow *(PR [#7198](https://github.com/tobymao/sqlglot/pull/7198) by [@georgesittas](https://github.com/georgesittas))*
- [`95f6c35`](https://github.com/tobymao/sqlglot/commit/95f6c354b06482d202e496b3d7df3e1dd9bbdcaf) - minor refactor for snowflake window gen *(commit by [@geooo109](https://github.com/geooo109))*
- [`175360e`](https://github.com/tobymao/sqlglot/commit/175360ecf17c839c67e6dc83a7da97823a406e0f) - clickhouse test ARRAY_DISTINCT refactor *(commit by [@geooo109](https://github.com/geooo109))*
- [`55594ed`](https://github.com/tobymao/sqlglot/commit/55594edfa998f4174570268d88595f08a7078c66) - cleanup MAP_PICK tests in duckdb *(commit by [@geooo109](https://github.com/geooo109))*
- [`c341a3d`](https://github.com/tobymao/sqlglot/commit/c341a3d7351e619d8935866611ffb23a32de24f4) - **test**: add test for SPLIT transpilation from Snowflake to DuckDB *(PR [#7212](https://github.com/tobymao/sqlglot/pull/7212) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`03d2a4b`](https://github.com/tobymao/sqlglot/commit/03d2a4bf87efed98df98927cca705cc9dcfc9d76) - cleanup duckdb ARRAY_OVERLAPS *(commit by [@geooo109](https://github.com/geooo109))*
- [`7a74228`](https://github.com/tobymao/sqlglot/commit/7a7422896e75c9c260c3737982597438f5128e0b) - duckdb tests style *(commit by [@geooo109](https://github.com/geooo109))*
- [`7df5bd4`](https://github.com/tobymao/sqlglot/commit/7df5bd487d942eeee3f6cf1ab26777405ce90b94) - **perf**: lineage cte memoization *(PR [#7207](https://github.com/tobymao/sqlglot/pull/7207) by [@treff7es](https://github.com/treff7es))*
- [`0787c74`](https://github.com/tobymao/sqlglot/commit/0787c74f5351d7eeb825eba75e6112241aeb1d98) - remove read-only flag in lineage, always use shared refs *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`7f3a18b`](https://github.com/tobymao/sqlglot/commit/7f3a18bcda811a5c259d6524e64eea2ed78ea83a) - **parser**: Add backwards compatibility tests *(PR [#7255](https://github.com/tobymao/sqlglot/pull/7255) by [@VaggelisD](https://github.com/VaggelisD))*
- [`fa42909`](https://github.com/tobymao/sqlglot/commit/fa4290956b922f173042170b7ff85fd29eb1f0d4) - do not run integration tests on make unit *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`6da7d90`](https://github.com/tobymao/sqlglot/commit/6da7d9061508c2b04ae81a6de2af82736879da38) - replace greek characters in `DATETIME_DELTA` type variable fixes [#7264](https://github.com/tobymao/sqlglot/pull/7264) *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`a13995e`](https://github.com/tobymao/sqlglot/commit/a13995e7c3441bcd8442b8a210cadd2055199492) - **parser**: Move `ParserCore` back to `Parser` *(PR [#7268](https://github.com/tobymao/sqlglot/pull/7268) by [@VaggelisD](https://github.com/VaggelisD))*
- [`4efd393`](https://github.com/tobymao/sqlglot/commit/4efd393b143fddc1e8a6481e36c333d89c0025a4) - update benchmarks *(commit by [@tobymao](https://github.com/tobymao))*
- [`20ebebf`](https://github.com/tobymao/sqlglot/commit/20ebebf40805e25f7e2496326b595480e10b7a32) - get rid of unused `read_only` kwarg in lineage *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`b8cbea0`](https://github.com/tobymao/sqlglot/commit/b8cbea02713989174a2bad32a17a85d763539f58) - make rs depend on sqlglotc *(commit by [@tobymao](https://github.com/tobymao))*
- [`d5e6d96`](https://github.com/tobymao/sqlglot/commit/d5e6d965288c0929e0a4ef9a9db292fb28bbf3d1) - clean up VARIANT tests for duckdb and sf *(commit by [@geooo109](https://github.com/geooo109))*
- [`ea76ca5`](https://github.com/tobymao/sqlglot/commit/ea76ca55405efdb09a1ea0dbb2d02d1892260b71) - unpin ruff *(PR [#7287](https://github.com/tobymao/sqlglot/pull/7287) by [@georgesittas](https://github.com/georgesittas))*
## [v29.0.1] - 2026-02-23
### :boom: BREAKING CHANGES
- due to [`fdfdfb1`](https://github.com/tobymao/sqlglot/commit/fdfdfb1703f1f408ad01453147e3d269f0911fef) - support GET_CURRENT_TIME() for DuckDB *(PR [#7126](https://github.com/tobymao/sqlglot/pull/7126) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support GET_CURRENT_TIME() for DuckDB (#7126)
### :sparkles: New Features
- [`fdfdfb1`](https://github.com/tobymao/sqlglot/commit/fdfdfb1703f1f408ad01453147e3d269f0911fef) - **duckdb**: support GET_CURRENT_TIME() for DuckDB *(PR [#7126](https://github.com/tobymao/sqlglot/pull/7126) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
### :wrench: Chores
- [`21a2a57`](https://github.com/tobymao/sqlglot/commit/21a2a5773717f675963dddbdba3df9343da60abe) - actually emit warning *(commit by [@tobymao](https://github.com/tobymao))*
## [v29.0.0] - 2026-02-23
### :boom: BREAKING CHANGES
- due to [`c8ddcc3`](https://github.com/tobymao/sqlglot/commit/c8ddcc383bab07b807ed1d6b6f9bef91417e43c1) - Annotate COLLATION(expr) for Spark/DBX *(PR [#6957](https://github.com/tobymao/sqlglot/pull/6957) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate COLLATION(expr) for Spark/DBX (#6957)
- due to [`fc4b332`](https://github.com/tobymao/sqlglot/commit/fc4b3326a14a1b42bc954914ce43b8dad7ef23b2) - Annotate BITMAP_COUNT(expr) for Spark/DBX *(PR [#6956](https://github.com/tobymao/sqlglot/pull/6956) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate BITMAP_COUNT(expr) for Spark/DBX (#6956)
- due to [`8725010`](https://github.com/tobymao/sqlglot/commit/87250100eb2a1d2c206a26cce276f7babec0e409) - add exp.Trunc for numeric truncation *(PR [#6923](https://github.com/tobymao/sqlglot/pull/6923) by [@doripo](https://github.com/doripo))*:
add exp.Trunc for numeric truncation (#6923)
- due to [`1418494`](https://github.com/tobymao/sqlglot/commit/1418494f777358f4b6bd1e05ee5cb02591d92c74) - Annotate FORMAT_STRING(expr) for Spark/DBX *(PR [#6962](https://github.com/tobymao/sqlglot/pull/6962) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate FORMAT_STRING(expr) for Spark/DBX (#6962)
- due to [`37fa84e`](https://github.com/tobymao/sqlglot/commit/37fa84e389b6bcbc94326d3defb4664d0826fb3f) - support `CURRENT_VERSION()` transpilation for Spark *(PR [#6964](https://github.com/tobymao/sqlglot/pull/6964) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support `CURRENT_VERSION()` transpilation for Spark (#6964)
- due to [`51d3ebd`](https://github.com/tobymao/sqlglot/commit/51d3ebdca83e114449590d9f337ae6902659a8b4) - transpile `CURRENT_VERSION()` to MySQL *(PR [#6965](https://github.com/tobymao/sqlglot/pull/6965) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
transpile `CURRENT_VERSION()` to MySQL (#6965)
- due to [`9008553`](https://github.com/tobymao/sqlglot/commit/90085534eb8863f588003bdf65d96771729889aa) - transpile CURRENT_VERSION() to ClickHouse, Postgres, Trino, Redshift *(PR [#6966](https://github.com/tobymao/sqlglot/pull/6966) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
transpile CURRENT_VERSION() to ClickHouse, Postgres, Trino, Redshift (#6966)
- due to [`e8b379e`](https://github.com/tobymao/sqlglot/commit/e8b379eb67d034f829d2fd50daefea2a98b83976) - Map SQLITE_VERSION() to exp.CurrentVersion expression *(PR [#6967](https://github.com/tobymao/sqlglot/pull/6967) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Map SQLITE_VERSION() to exp.CurrentVersion expression (#6967)
- due to [`dfd299f`](https://github.com/tobymao/sqlglot/commit/dfd299fcfaf7a61d13b073e7b59d6bdd0748c7b8) - Annotate `RANDSTR(expr)` for Spark/DBX *(PR [#6971](https://github.com/tobymao/sqlglot/pull/6971) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate `RANDSTR(expr)` for Spark/DBX (#6971)
- due to [`969e45d`](https://github.com/tobymao/sqlglot/commit/969e45d3ba1db25f4561b122b9401b5608356f58) - Annotate REPEAT(expr) for Hive, Spark, DBX *(PR [#6974](https://github.com/tobymao/sqlglot/pull/6974) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate REPEAT(expr) for Hive, Spark, DBX (#6974)
- due to [`ade3639`](https://github.com/tobymao/sqlglot/commit/ade3639b337d0222a00feec7ac9762571586f7ab) - transpilation support current_database *(PR [#6973](https://github.com/tobymao/sqlglot/pull/6973) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support current_database (#6973)
- due to [`57093d1`](https://github.com/tobymao/sqlglot/commit/57093d15d5bbc2217366ace42db109e215dca79f) - Annotate `OVERLAY(expr)` for Spark/DBX *(PR [#6970](https://github.com/tobymao/sqlglot/pull/6970) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate `OVERLAY(expr)` for Spark/DBX (#6970)
- due to [`f5b2328`](https://github.com/tobymao/sqlglot/commit/f5b23281b6829bace426808f0a55e73590b70bbd) - Annotate RIGHT(expr) for Spark/DBX *(PR [#6980](https://github.com/tobymao/sqlglot/pull/6980) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate RIGHT(expr) for Spark/DBX (#6980)
- due to [`61a0d3f`](https://github.com/tobymao/sqlglot/commit/61a0d3f05be478dd4552e6559b6781891d4a3447) - add support for JAROWINKLER_SIMILARITY *(PR [#6977](https://github.com/tobymao/sqlglot/pull/6977) by [@kyle-cheung](https://github.com/kyle-cheung))*:
add support for JAROWINKLER_SIMILARITY (#6977)
- due to [`9d1f4e0`](https://github.com/tobymao/sqlglot/commit/9d1f4e0ea6f8b66b022a5263320275ed43efb5f3) - transpilation support current_schema *(PR [#6976](https://github.com/tobymao/sqlglot/pull/6976) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support current_schema (#6976)
- due to [`0d345aa`](https://github.com/tobymao/sqlglot/commit/0d345aafd037b047808716dfdb60cc554d47941d) - Annotate REPLACE(expr) for Hive, Spark and DBX *(PR [#6975](https://github.com/tobymao/sqlglot/pull/6975) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate REPLACE(expr) for Hive, Spark and DBX (#6975)
- due to [`19f9000`](https://github.com/tobymao/sqlglot/commit/19f900031c9abe26bebb541e8907ca263454055c) - transpilation support current_version *(PR [#6960](https://github.com/tobymao/sqlglot/pull/6960) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support current_version (#6960)
- due to [`f103a16`](https://github.com/tobymao/sqlglot/commit/f103a166aca95da726ac9281816181e53b916dc3) - support parsing `VERSION()` for ClickHouse *(PR [#6986](https://github.com/tobymao/sqlglot/pull/6986) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support parsing `VERSION()` for ClickHouse (#6986)
- due to [`2751c8f`](https://github.com/tobymao/sqlglot/commit/2751c8ff1d6c4acc1a0d407e601d572886ceffc3) - parse support for `VERSION()` *(PR [#6985](https://github.com/tobymao/sqlglot/pull/6985) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
parse support for `VERSION()` (#6985)
- due to [`37db91c`](https://github.com/tobymao/sqlglot/commit/37db91c5cea14488654a2b69aceab13b6c6a98b7) - Annotate `REVERSE(expr)` for Hive, Spark and DBX *(PR [#6979](https://github.com/tobymao/sqlglot/pull/6979) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate `REVERSE(expr)` for Hive, Spark and DBX (#6979)
- due to [`f4d53a2`](https://github.com/tobymao/sqlglot/commit/f4d53a2d0f9aadf7fc63e484d64821cddf5d1f17) - support parsing VERSION() for Postgres/Redshift *(PR [#6987](https://github.com/tobymao/sqlglot/pull/6987) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support parsing VERSION() for Postgres/Redshift (#6987)
- due to [`71bb0c3`](https://github.com/tobymao/sqlglot/commit/71bb0c3f7947c1959160c8b401354ceddee2e8ce) - support for version() for trino *(PR [#6988](https://github.com/tobymao/sqlglot/pull/6988) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support for version() for trino (#6988)
- due to [`fbca704`](https://github.com/tobymao/sqlglot/commit/fbca7040cd3ae9eb0bc599b5ce656724fccafab1) - Annotate SPLIT(expr) for Hive/Spark/DBX *(PR [#6990](https://github.com/tobymao/sqlglot/pull/6990) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate SPLIT(expr) for Hive/Spark/DBX (#6990)
- due to [`264e95f`](https://github.com/tobymao/sqlglot/commit/264e95f04d95f2cd7bcf255ee7ae160db36882a7) - Move TRANSLATE(expr) annotator to base *(PR [#6992](https://github.com/tobymao/sqlglot/pull/6992) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Move TRANSLATE(expr) annotator to base (#6992)
- due to [`eb8ad51`](https://github.com/tobymao/sqlglot/commit/eb8ad518142dc91e25d37310cb9cbfa33c44fe34) - Annotate FILTER(expr, func) for Spark/DBX *(PR [#6995](https://github.com/tobymao/sqlglot/pull/6995) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate FILTER(expr, func) for Spark/DBX (#6995)
- due to [`12e0869`](https://github.com/tobymao/sqlglot/commit/12e0869ff6820b35884e189b2b4f29aef56c3a51) - annotate CURRENT_TIMESTAMP for MySQL *(PR [#7004](https://github.com/tobymao/sqlglot/pull/7004) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate CURRENT_TIMESTAMP for MySQL (#7004)
- due to [`cbdad37`](https://github.com/tobymao/sqlglot/commit/cbdad3762dd6935d75405a0c33a1656cab8c2d1e) - support CURTIME() for MySQL/SingleStore *(PR [#7005](https://github.com/tobymao/sqlglot/pull/7005) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support CURTIME() for MySQL/SingleStore (#7005)
- due to [`d16cc62`](https://github.com/tobymao/sqlglot/commit/d16cc62ea8342bec91092f8c7cf2504364581a7e) - annotate ADD_MONTH(expr) for Hive/Spark/DBX *(PR [#7003](https://github.com/tobymao/sqlglot/pull/7003) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate ADD_MONTH(expr) for Hive/Spark/DBX (#7003)
- due to [`6381c48`](https://github.com/tobymao/sqlglot/commit/6381c4825c1929da56363035be2c4ae7a90336dd) - support NOW() for exasol *(PR [#7006](https://github.com/tobymao/sqlglot/pull/7006) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support NOW() for exasol (#7006)
- due to [`d9ea168`](https://github.com/tobymao/sqlglot/commit/d9ea1683a98252ad43948be32fbd7cf77d17b67c) - annotate CURRENT_USER to base *(PR [#7007](https://github.com/tobymao/sqlglot/pull/7007) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate CURRENT_USER to base (#7007)
- due to [`7a2a777`](https://github.com/tobymao/sqlglot/commit/7a2a777fb8c215b51436942645965792257b8dc9) - annotate FROM_UTC_TIMESTAMP(expr) for Spark/DBX *(PR [#7008](https://github.com/tobymao/sqlglot/pull/7008) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate FROM_UTC_TIMESTAMP(expr) for Spark/DBX (#7008)
- due to [`8be32fd`](https://github.com/tobymao/sqlglot/commit/8be32fde55c8d256e73fd504246f695bf550f4cb) - support MAKE_TIMESTAMP(expr) for Spark/DBX *(PR [#7009](https://github.com/tobymao/sqlglot/pull/7009) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support MAKE_TIMESTAMP(expr) for Spark/DBX (#7009)
- due to [`b951d74`](https://github.com/tobymao/sqlglot/commit/b951d740a934a8f46ce2c96caf7d8ae80b61604c) - annotate NEXT_DAY(expr) for Hive/Spark/DBX *(PR [#7010](https://github.com/tobymao/sqlglot/pull/7010) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate NEXT_DAY(expr) for Hive/Spark/DBX (#7010)
- due to [`404797a`](https://github.com/tobymao/sqlglot/commit/404797acfb1a9f860bd87880fecacd79cb1b2161) - Move `CURRENT_SCHEMA()` to Base Annotator *(PR [#7021](https://github.com/tobymao/sqlglot/pull/7021) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Move `CURRENT_SCHEMA()` to Base Annotator (#7021)
- due to [`994d3a3`](https://github.com/tobymao/sqlglot/commit/994d3a37983791d4e8484d6d39b819a1cff2f774) - robust STAR with EXCLUDE (redshift) *(PR [#6972](https://github.com/tobymao/sqlglot/pull/6972) by [@geooo109](https://github.com/geooo109))*:
robust STAR with EXCLUDE (redshift) (#6972)
- due to [`3ea80fb`](https://github.com/tobymao/sqlglot/commit/3ea80fb86482e257c4565ab7876dd6cdd60a7be2) - annotate REVERSE(str) for DuckDB *(PR [#7018](https://github.com/tobymao/sqlglot/pull/7018) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate REVERSE(str) for DuckDB (#7018)
- due to [`352fb94`](https://github.com/tobymao/sqlglot/commit/352fb94c46e5dd0dfd824b4472b03cccf21d3f56) - annotate ISODOW(expr) for DuckDB *(PR [#7016](https://github.com/tobymao/sqlglot/pull/7016) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate ISODOW(expr) for DuckDB (#7016)
- due to [`c2e5954`](https://github.com/tobymao/sqlglot/commit/c2e59545d8030b1d2e7859631c9d75ea0f6df883) - annotate COUNTIF(expr) for DuckDB *(PR [#7012](https://github.com/tobymao/sqlglot/pull/7012) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate COUNTIF(expr) for DuckDB (#7012)
- due to [`e35ee14`](https://github.com/tobymao/sqlglot/commit/e35ee143b08f671175e730e602e9a5dcd9155fde) - annotate CountIf(expr) for ClickHouse *(PR [#7013](https://github.com/tobymao/sqlglot/pull/7013) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate CountIf(expr) for ClickHouse (#7013)
- due to [`b73be3e`](https://github.com/tobymao/sqlglot/commit/b73be3e8c95b44f2cd71498592bd4b5b63ba02d9) - support `today()` for duckdb *(PR [#7015](https://github.com/tobymao/sqlglot/pull/7015) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support `today()` for duckdb (#7015)
- due to [`36e3310`](https://github.com/tobymao/sqlglot/commit/36e3310959260a7b1124a60589cdc90a3e631624) - support current_schema as no_param *(PR [#7000](https://github.com/tobymao/sqlglot/pull/7000) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support current_schema as no_param (#7000)
- due to [`fd8860b`](https://github.com/tobymao/sqlglot/commit/fd8860b8b8d5e0c29c53597485c656923375e1d9) - annotate FORMAT(expr) for DuckDB *(PR [#7017](https://github.com/tobymao/sqlglot/pull/7017) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate FORMAT(expr) for DuckDB (#7017)
- due to [`eecdfa1`](https://github.com/tobymao/sqlglot/commit/eecdfa1b15ac1808f93107d2ad6a51f52ffaf7cc) - Annotate `DAYOFWEEK(expr)`, `DAYOFMONTH(expr)` for Hive/Spark/DBX *(PR [#6996](https://github.com/tobymao/sqlglot/pull/6996) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate `DAYOFWEEK(expr)`, `DAYOFMONTH(expr)` for Hive/Spark/DBX (#6996)
- due to [`4fc26f0`](https://github.com/tobymao/sqlglot/commit/4fc26f086701cebb3d3974b762d12e1435f4a195) - annotate `TIME_BUCKET(expr)` for DuckDB *(PR [#7014](https://github.com/tobymao/sqlglot/pull/7014) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate `TIME_BUCKET(expr)` for DuckDB (#7014)
- due to [`00e6d9a`](https://github.com/tobymao/sqlglot/commit/00e6d9af02971aad6e7102cae3af2a7192fa7070) - annotate `UNIX_DATE(expr)` for Spark/DBX *(PR [#7011](https://github.com/tobymao/sqlglot/pull/7011) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate `UNIX_DATE(expr)` for Spark/DBX (#7011)
- due to [`86a5509`](https://github.com/tobymao/sqlglot/commit/86a5509bfcb8df6a8cf8b0971d9d12ae3204f2af) - support user for exasol *(PR [#7001](https://github.com/tobymao/sqlglot/pull/7001) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support user for exasol (#7001)
- due to [`b27c163`](https://github.com/tobymao/sqlglot/commit/b27c163fcce0a4b0a4f75d131cdc105353e95464) - support `CURDATE` for Exasol *(PR [#6999](https://github.com/tobymao/sqlglot/pull/6999) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support `CURDATE` for Exasol (#6999)
- due to [`47dc558`](https://github.com/tobymao/sqlglot/commit/47dc5589f8b165d9f0296e6aa48de337f556f1a4) - annotate ARRAY_COMPACT(expr) for Spark/DBX *(PR [#7034](https://github.com/tobymao/sqlglot/pull/7034) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate ARRAY_COMPACT(expr) for Spark/DBX (#7034)
- due to [`9d7db06`](https://github.com/tobymao/sqlglot/commit/9d7db06cf8ef66583f11b6d54af573bb28f4434b) - Generator for ARRAY_INSERT(expr) *(PR [#7036](https://github.com/tobymao/sqlglot/pull/7036) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Generator for ARRAY_INSERT(expr) (#7036)
- due to [`235b8ac`](https://github.com/tobymao/sqlglot/commit/235b8ac24d41324239d6581b5636ad19ec7b9376) - annotate `ARRAY_INTERSECT(expr)` for Hive/Spark/DBX *(PR [#7037](https://github.com/tobymao/sqlglot/pull/7037) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate `ARRAY_INTERSECT(expr)` for Hive/Spark/DBX (#7037)
- due to [`f476d07`](https://github.com/tobymao/sqlglot/commit/f476d071a1412fb2d9cd6f39067380252ab4c15a) - update transpilation of SEQ functions and GENERATOR for DuckDB *(PR [#7029](https://github.com/tobymao/sqlglot/pull/7029) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
update transpilation of SEQ functions and GENERATOR for DuckDB (#7029)
- due to [`643a6c7`](https://github.com/tobymao/sqlglot/commit/643a6c7d97292eb29ba1bac6523747e161544a1a) - Transpilation support for Snowflake REGEXP_LIKE to DuckDB *(PR [#7030](https://github.com/tobymao/sqlglot/pull/7030) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
Transpilation support for Snowflake REGEXP_LIKE to DuckDB (#7030)
- due to [`b1f0542`](https://github.com/tobymao/sqlglot/commit/b1f05428d8a4d441398c0f3d4a65b49b0eda2729) - tokenizer optimizations *(PR [#7038](https://github.com/tobymao/sqlglot/pull/7038) by [@geooo109](https://github.com/geooo109))*:
tokenizer optimizations (#7038)
- due to [`70d6f2b`](https://github.com/tobymao/sqlglot/commit/70d6f2b5d8c0f37550ba7a288c5f7f7021c66bd7) - annotate `ARRAY_INSERT(expr)` for Spark/DBX *(PR [#7044](https://github.com/tobymao/sqlglot/pull/7044) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate `ARRAY_INSERT(expr)` for Spark/DBX (#7044)
- due to [`3019d0a`](https://github.com/tobymao/sqlglot/commit/3019d0a0110a503b68b2a3cf7f93be1000f20a40) - Map BIT_GET to GETBIT for Spark/DBX *(PR [#7041](https://github.com/tobymao/sqlglot/pull/7041) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Map BIT_GET to GETBIT for Spark/DBX (#7041)
- due to [`27ae429`](https://github.com/tobymao/sqlglot/commit/27ae42987864949f74b784d3dbb063bd3450e0dc) - transpile BIT_COUNT to DuckDB *(PR [#7039](https://github.com/tobymao/sqlglot/pull/7039) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
transpile BIT_COUNT to DuckDB (#7039)
- due to [`f6cbd27`](https://github.com/tobymao/sqlglot/commit/f6cbd27fd61937efba6879f20f5ff0239e678469) - Add support for trigger DDL statements *(PR [#6978](https://github.com/tobymao/sqlglot/pull/6978) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*:
Add support for trigger DDL statements (#6978)
- due to [`749cf18`](https://github.com/tobymao/sqlglot/commit/749cf18dbcb8d1d0c7d144e6481ecc3a443d4a0e) - require original SQL in `Parser.parse` *(PR [#7045](https://github.com/tobymao/sqlglot/pull/7045) by [@georgesittas](https://github.com/georgesittas))*:
require original SQL in `Parser.parse` (#7045)
- due to [`f9d1f73`](https://github.com/tobymao/sqlglot/commit/f9d1f73b490e6694da0e800d9a5a70e1ba7f38d5) - refactor colon (extract) parsing precedence *(PR [#7046](https://github.com/tobymao/sqlglot/pull/7046) by [@georgesittas](https://github.com/georgesittas))*:
refactor colon (extract) parsing precedence (#7046)
- due to [`c5939c1`](https://github.com/tobymao/sqlglot/commit/c5939c12c6816437f5abda3322f99cc597b1616c) - Map curdate to current_date for Spark/DBX *(PR [#7048](https://github.com/tobymao/sqlglot/pull/7048) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Map curdate to current_date for Spark/DBX (#7048)
- due to [`58419e1`](https://github.com/tobymao/sqlglot/commit/58419e1f47119a135276a722b85ccfa92ae3d1f1) - move `SessionUser` to base *(PR [#7049](https://github.com/tobymao/sqlglot/pull/7049) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
move `SessionUser` to base (#7049)
- due to [`13ee312`](https://github.com/tobymao/sqlglot/commit/13ee31281fe21c670f8ce1656520c18762e8402f) - use `IntEnum` instead of auto/string enums *(PR [#7050](https://github.com/tobymao/sqlglot/pull/7050) by [@georgesittas](https://github.com/georgesittas))*:
use `IntEnum` instead of auto/string enums (#7050)
- due to [`f98cba1`](https://github.com/tobymao/sqlglot/commit/f98cba17caa8f3c2dcd5669f3525094c5dd58781) - move exp.Rand to base *(PR [#7065](https://github.com/tobymao/sqlglot/pull/7065) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
move exp.Rand to base (#7065)
- due to [`4f8a49c`](https://github.com/tobymao/sqlglot/commit/4f8a49cd42ef37178cd0626554bfd263a140046e) - Transpilation support for Snowflake REGEXP_COUNT to DuckDB *(PR [#7054](https://github.com/tobymao/sqlglot/pull/7054) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
Transpilation support for Snowflake REGEXP_COUNT to DuckDB (#7054)
- due to [`eaba8dc`](https://github.com/tobymao/sqlglot/commit/eaba8dc26b2ec28b8074eb0cf2b3db086cf7ccc3) - move DEGREES(expr) to base *(PR [#7074](https://github.com/tobymao/sqlglot/pull/7074) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
move DEGREES(expr) to base (#7074)
- due to [`a87c1b4`](https://github.com/tobymao/sqlglot/commit/a87c1b46b54ef7f6895c68666c05041924691576) - annotate DEGREES(expr) for T-SQL *(PR [#7077](https://github.com/tobymao/sqlglot/pull/7077) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate DEGREES(expr) for T-SQL (#7077)
- due to [`f057a1b`](https://github.com/tobymao/sqlglot/commit/f057a1b912d473a77f111d33f40ecce2f6d54cf8) - move MONTHNAME to base *(PR [#7083](https://github.com/tobymao/sqlglot/pull/7083) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
move MONTHNAME to base (#7083)
- due to [`dd2cf85`](https://github.com/tobymao/sqlglot/commit/dd2cf850134a2833d0da5eb58206accc298c9e0a) - support `UTCTimestamp` *(PR [#7082](https://github.com/tobymao/sqlglot/pull/7082) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support `UTCTimestamp` (#7082)
- due to [`7ff13c6`](https://github.com/tobymao/sqlglot/commit/7ff13c690dddd9e1024b1a4ab6c9532f67bdece8) - transpilation support map_contains_key *(PR [#7070](https://github.com/tobymao/sqlglot/pull/7070) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
transpilation support map_contains_key (#7070)
- due to [`6fa494d`](https://github.com/tobymao/sqlglot/commit/6fa494da191753da8b85fb6a706b99f7f4950f43) - support `arrayCompact(expr)` function *(PR [#7084](https://github.com/tobymao/sqlglot/pull/7084) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support `arrayCompact(expr)` function (#7084)
- due to [`a58c37d`](https://github.com/tobymao/sqlglot/commit/a58c37d24441f12af92df329269910bc7b5a0c8f) - transpilation of Snowflake REGEXP_REPLACE to DuckDB *(PR [#7078](https://github.com/tobymao/sqlglot/pull/7078) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
transpilation of Snowflake REGEXP_REPLACE to DuckDB (#7078)
- due to [`dfcd5d7`](https://github.com/tobymao/sqlglot/commit/dfcd5d75f1caf3a32d5930a91f4fb1de598aa914) - Add Exasol reserved keywords to exasol dialect *(PR [#7086](https://github.com/tobymao/sqlglot/pull/7086) by [@nnamdi16](https://github.com/nnamdi16))*:
Add Exasol reserved keywords to exasol dialect (#7086)
- due to [`7664358`](https://github.com/tobymao/sqlglot/commit/7664358b27599936dacb2b7d8e5329fe32425e62) - fix parsing error in json_value for exasol dialect *(PR [#7088](https://github.com/tobymao/sqlglot/pull/7088) by [@nnamdi16](https://github.com/nnamdi16))*:
fix parsing error in json_value for exasol dialect (#7088)
- due to [`217e960`](https://github.com/tobymao/sqlglot/commit/217e960f57675cc5f5cb9ff9996c048a31d8004c) - annotate ARRAY_CONTAINS *(PR [#7099](https://github.com/tobymao/sqlglot/pull/7099) by [@geooo109](https://github.com/geooo109))*:
annotate ARRAY_CONTAINS (#7099)
- due to [`1074d66`](https://github.com/tobymao/sqlglot/commit/1074d66231d1de64b6b9aa43de6afbdc6717da5f) - transpilation of Snowflake REGEXP_INSTR to DuckDB *(PR [#7097](https://github.com/tobymao/sqlglot/pull/7097) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
transpilation of Snowflake REGEXP_INSTR to DuckDB (#7097)
- due to [`ab1c2ab`](https://github.com/tobymao/sqlglot/commit/ab1c2ab44556a8f7ffe7dad09e4b50e75b122b5d) - annotate PERCENTILE/APPROX_PERCENTILE for hive, spark2, spark, dbx *(PR [#7100](https://github.com/tobymao/sqlglot/pull/7100) by [@geooo109](https://github.com/geooo109))*:
annotate PERCENTILE/APPROX_PERCENTILE for hive, spark2, spark, dbx (#7100)
- due to [`0f8287d`](https://github.com/tobymao/sqlglot/commit/0f8287d8e5ff1eee2aea29001443ee00a4b2ae47) - annotate BIT_OR(expr) for Spark/DBX *(PR [#7101](https://github.com/tobymao/sqlglot/pull/7101) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate BIT_OR(expr) for Spark/DBX (#7101)
- due to [`e19abfd`](https://github.com/tobymao/sqlglot/commit/e19abfded7c159c30f53063d10ae57406553f75d) - annotate BIT_AND(expr) for Spark/DBX *(PR [#7103](https://github.com/tobymao/sqlglot/pull/7103) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate BIT_AND(expr) for Spark/DBX (#7103)
- due to [`0c4f74f`](https://github.com/tobymao/sqlglot/commit/0c4f74f6574d3acf06935626615e2e1f14ae9c04) - parse and annotate ELEMENT_AT for spark2, spark, dbx *(PR [#7104](https://github.com/tobymao/sqlglot/pull/7104) by [@geooo109](https://github.com/geooo109))*:
parse and annotate ELEMENT_AT for spark2, spark, dbx (#7104)
- due to [`8b8aef0`](https://github.com/tobymao/sqlglot/commit/8b8aef01197b670a727a59e46727b5a57f106a5d) - annotate BIT_XOR(expr) for Spark/DBX *(PR [#7106](https://github.com/tobymao/sqlglot/pull/7106) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate BIT_XOR(expr) for Spark/DBX (#7106)
- due to [`1b1d57a`](https://github.com/tobymao/sqlglot/commit/1b1d57a3541f48291a1534a0b1a28948f8b8207e) - transpilation of Snowflake REGEXP_SUBSTR and REGEXP_SUBSTR_ALL to DuckDB *(PR [#7095](https://github.com/tobymao/sqlglot/pull/7095) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
transpilation of Snowflake REGEXP_SUBSTR and REGEXP_SUBSTR_ALL to DuckDB (#7095)
- due to [`4f964db`](https://github.com/tobymao/sqlglot/commit/4f964db9bfbe42b31dc9f191e687cb2f5f7db0d8) - remove prefix from data type and cleanup *(commit by [@tobymao](https://github.com/tobymao))*:
remove prefix from data type and cleanup
- due to [`0858599`](https://github.com/tobymao/sqlglot/commit/0858599e274567f7a8c9361afab1526cd2d58eea) - support arrayConcat to clickhouse *(PR [#7108](https://github.com/tobymao/sqlglot/pull/7108) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support arrayConcat to clickhouse (#7108)
- due to [`73ab9af`](https://github.com/tobymao/sqlglot/commit/73ab9af9c95274b3feac9278145432c27695054e) - support arrayDistinct(expr) for clickhouse *(PR [#7114](https://github.com/tobymao/sqlglot/pull/7114) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support arrayDistinct(expr) for clickhouse (#7114)
- due to [`37fa8c7`](https://github.com/tobymao/sqlglot/commit/37fa8c7219a2f17a351f948d6eb314a543f8784d) - Split core functionality to TokenizerCore *(PR [#7116](https://github.com/tobymao/sqlglot/pull/7116) by [@VaggelisD](https://github.com/VaggelisD))*:
Split core functionality to TokenizerCore (#7116)
- due to [`1150e39`](https://github.com/tobymao/sqlglot/commit/1150e3911b0b82a9683f765de11605b14fd66ddb) - expression_core which is now compilable by mypyc *(PR [#7117](https://github.com/tobymao/sqlglot/pull/7117) by [@tobymao](https://github.com/tobymao))*:
expression_core which is now compilable by mypyc (#7117)
- due to [`f796956`](https://github.com/tobymao/sqlglot/commit/f796956d3cc857995572d715b8db530b2d76b8d6) - annotate `ArrayDistinct` for Hive/Spark/DBX *(PR [#7119](https://github.com/tobymao/sqlglot/pull/7119) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate `ArrayDistinct` for Hive/Spark/DBX (#7119)
- due to [`2069b06`](https://github.com/tobymao/sqlglot/commit/2069b06284d6998d94c43c16d4b46ac50ea0d84a) - annotate ARRAY_EXCEPT for Hive/Spark/DBX *(PR [#7123](https://github.com/tobymao/sqlglot/pull/7123) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate ARRAY_EXCEPT for Hive/Spark/DBX (#7123)
- due to [`5a30754`](https://github.com/tobymao/sqlglot/commit/5a30754df09ddb1260b394c812596adb03c2710d) - support `current_localtimestamp()` for DuckDB *(PR [#7128](https://github.com/tobymao/sqlglot/pull/7128) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
support `current_localtimestamp()` for DuckDB (#7128)
- due to [`93bf337`](https://github.com/tobymao/sqlglot/commit/93bf337ca2af1b5d9b06d6bf3c50c5bcce680077) - annotate date_diff(expr) for DuckDB *(PR [#7125](https://github.com/tobymao/sqlglot/pull/7125) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
annotate date_diff(expr) for DuckDB (#7125)
### :sparkles: New Features
- [`c8ddcc3`](https://github.com/tobymao/sqlglot/commit/c8ddcc383bab07b807ed1d6b6f9bef91417e43c1) - **optimizer**: Annotate COLLATION(expr) for Spark/DBX *(PR [#6957](https://github.com/tobymao/sqlglot/pull/6957) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`fc4b332`](https://github.com/tobymao/sqlglot/commit/fc4b3326a14a1b42bc954914ce43b8dad7ef23b2) - **optimizer**: Annotate BITMAP_COUNT(expr) for Spark/DBX *(PR [#6956](https://github.com/tobymao/sqlglot/pull/6956) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`8725010`](https://github.com/tobymao/sqlglot/commit/87250100eb2a1d2c206a26cce276f7babec0e409) - add exp.Trunc for numeric truncation *(PR [#6923](https://github.com/tobymao/sqlglot/pull/6923) by [@doripo](https://github.com/doripo))*
- [`1418494`](https://github.com/tobymao/sqlglot/commit/1418494f777358f4b6bd1e05ee5cb02591d92c74) - **optimizer**: Annotate FORMAT_STRING(expr) for Spark/DBX *(PR [#6962](https://github.com/tobymao/sqlglot/pull/6962) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`ff1fd52`](https://github.com/tobymao/sqlglot/commit/ff1fd521147cb66acc36f2da7b1590d9e7f8140f) - **generator**: Add numeric TRUNC output for additional dialects *(PR [#6961](https://github.com/tobymao/sqlglot/pull/6961) by [@doripo](https://github.com/doripo))*
- [`37fa84e`](https://github.com/tobymao/sqlglot/commit/37fa84e389b6bcbc94326d3defb4664d0826fb3f) - **snowflake**: support `CURRENT_VERSION()` transpilation for Spark *(PR [#6964](https://github.com/tobymao/sqlglot/pull/6964) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`51d3ebd`](https://github.com/tobymao/sqlglot/commit/51d3ebdca83e114449590d9f337ae6902659a8b4) - **snowflake**: transpile `CURRENT_VERSION()` to MySQL *(PR [#6965](https://github.com/tobymao/sqlglot/pull/6965) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`9008553`](https://github.com/tobymao/sqlglot/commit/90085534eb8863f588003bdf65d96771729889aa) - **snowflake**: transpile CURRENT_VERSION() to ClickHouse, Postgres, Trino, Redshift *(PR [#6966](https://github.com/tobymao/sqlglot/pull/6966) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`e8b379e`](https://github.com/tobymao/sqlglot/commit/e8b379eb67d034f829d2fd50daefea2a98b83976) - **sqlite**: Map SQLITE_VERSION() to exp.CurrentVersion expression *(PR [#6967](https://github.com/tobymao/sqlglot/pull/6967) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`dfd299f`](https://github.com/tobymao/sqlglot/commit/dfd299fcfaf7a61d13b073e7b59d6bdd0748c7b8) - **optimizer**: Annotate `RANDSTR(expr)` for Spark/DBX *(PR [#6971](https://github.com/tobymao/sqlglot/pull/6971) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`969e45d`](https://github.com/tobymao/sqlglot/commit/969e45d3ba1db25f4561b122b9401b5608356f58) - **optimizer**: Annotate REPEAT(expr) for Hive, Spark, DBX *(PR [#6974](https://github.com/tobymao/sqlglot/pull/6974) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`ade3639`](https://github.com/tobymao/sqlglot/commit/ade3639b337d0222a00feec7ac9762571586f7ab) - **snowflake**: transpilation support current_database *(PR [#6973](https://github.com/tobymao/sqlglot/pull/6973) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`57093d1`](https://github.com/tobymao/sqlglot/commit/57093d15d5bbc2217366ace42db109e215dca79f) - **optimizer**: Annotate `OVERLAY(expr)` for Spark/DBX *(PR [#6970](https://github.com/tobymao/sqlglot/pull/6970) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`f5b2328`](https://github.com/tobymao/sqlglot/commit/f5b23281b6829bace426808f0a55e73590b70bbd) - **optimizer**: Annotate RIGHT(expr) for Spark/DBX *(PR [#6980](https://github.com/tobymao/sqlglot/pull/6980) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`61a0d3f`](https://github.com/tobymao/sqlglot/commit/61a0d3f05be478dd4552e6559b6781891d4a3447) - **snowflake**: add support for JAROWINKLER_SIMILARITY *(PR [#6977](https://github.com/tobymao/sqlglot/pull/6977) by [@kyle-cheung](https://github.com/kyle-cheung))*
- [`9d1f4e0`](https://github.com/tobymao/sqlglot/commit/9d1f4e0ea6f8b66b022a5263320275ed43efb5f3) - **snowflake**: transpilation support current_schema *(PR [#6976](https://github.com/tobymao/sqlglot/pull/6976) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`0d345aa`](https://github.com/tobymao/sqlglot/commit/0d345aafd037b047808716dfdb60cc554d47941d) - **optimizer**: Annotate REPLACE(expr) for Hive, Spark and DBX *(PR [#6975](https://github.com/tobymao/sqlglot/pull/6975) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`19f9000`](https://github.com/tobymao/sqlglot/commit/19f900031c9abe26bebb541e8907ca263454055c) - **snowflake**: transpilation support current_version *(PR [#6960](https://github.com/tobymao/sqlglot/pull/6960) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`f103a16`](https://github.com/tobymao/sqlglot/commit/f103a166aca95da726ac9281816181e53b916dc3) - **optimizer**: support parsing `VERSION()` for ClickHouse *(PR [#6986](https://github.com/tobymao/sqlglot/pull/6986) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`2751c8f`](https://github.com/tobymao/sqlglot/commit/2751c8ff1d6c4acc1a0d407e601d572886ceffc3) - **mysql**: parse support for `VERSION()` *(PR [#6985](https://github.com/tobymao/sqlglot/pull/6985) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`37db91c`](https://github.com/tobymao/sqlglot/commit/37db91c5cea14488654a2b69aceab13b6c6a98b7) - **optimizer**: Annotate `REVERSE(expr)` for Hive, Spark and DBX *(PR [#6979](https://github.com/tobymao/sqlglot/pull/6979) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`f4d53a2`](https://github.com/tobymao/sqlglot/commit/f4d53a2d0f9aadf7fc63e484d64821cddf5d1f17) - **postgres**: support parsing VERSION() for Postgres/Redshift *(PR [#6987](https://github.com/tobymao/sqlglot/pull/6987) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`71bb0c3`](https://github.com/tobymao/sqlglot/commit/71bb0c3f7947c1959160c8b401354ceddee2e8ce) - **trino**: support for version() for trino *(PR [#6988](https://github.com/tobymao/sqlglot/pull/6988) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`fbca704`](https://github.com/tobymao/sqlglot/commit/fbca7040cd3ae9eb0bc599b5ce656724fccafab1) - **optimizer**: Annotate SPLIT(expr) for Hive/Spark/DBX *(PR [#6990](https://github.com/tobymao/sqlglot/pull/6990) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`264e95f`](https://github.com/tobymao/sqlglot/commit/264e95f04d95f2cd7bcf255ee7ae160db36882a7) - **optimizer**: Move TRANSLATE(expr) annotator to base *(PR [#6992](https://github.com/tobymao/sqlglot/pull/6992) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`eb8ad51`](https://github.com/tobymao/sqlglot/commit/eb8ad518142dc91e25d37310cb9cbfa33c44fe34) - **optimizer**: Annotate FILTER(expr, func) for Spark/DBX *(PR [#6995](https://github.com/tobymao/sqlglot/pull/6995) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`12e0869`](https://github.com/tobymao/sqlglot/commit/12e0869ff6820b35884e189b2b4f29aef56c3a51) - **optimizer**: annotate CURRENT_TIMESTAMP for MySQL *(PR [#7004](https://github.com/tobymao/sqlglot/pull/7004) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`cbdad37`](https://github.com/tobymao/sqlglot/commit/cbdad3762dd6935d75405a0c33a1656cab8c2d1e) - **mysql**: support CURTIME() for MySQL/SingleStore *(PR [#7005](https://github.com/tobymao/sqlglot/pull/7005) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`d16cc62`](https://github.com/tobymao/sqlglot/commit/d16cc62ea8342bec91092f8c7cf2504364581a7e) - **optimizer**: annotate ADD_MONTH(expr) for Hive/Spark/DBX *(PR [#7003](https://github.com/tobymao/sqlglot/pull/7003) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`6381c48`](https://github.com/tobymao/sqlglot/commit/6381c4825c1929da56363035be2c4ae7a90336dd) - **exasol**: support NOW() for exasol *(PR [#7006](https://github.com/tobymao/sqlglot/pull/7006) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`d9ea168`](https://github.com/tobymao/sqlglot/commit/d9ea1683a98252ad43948be32fbd7cf77d17b67c) - **optimizer**: annotate CURRENT_USER to base *(PR [#7007](https://github.com/tobymao/sqlglot/pull/7007) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`7a2a777`](https://github.com/tobymao/sqlglot/commit/7a2a777fb8c215b51436942645965792257b8dc9) - **optimizer**: annotate FROM_UTC_TIMESTAMP(expr) for Spark/DBX *(PR [#7008](https://github.com/tobymao/sqlglot/pull/7008) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`8be32fd`](https://github.com/tobymao/sqlglot/commit/8be32fde55c8d256e73fd504246f695bf550f4cb) - **spark**: support MAKE_TIMESTAMP(expr) for Spark/DBX *(PR [#7009](https://github.com/tobymao/sqlglot/pull/7009) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`b951d74`](https://github.com/tobymao/sqlglot/commit/b951d740a934a8f46ce2c96caf7d8ae80b61604c) - **optimizer**: annotate NEXT_DAY(expr) for Hive/Spark/DBX *(PR [#7010](https://github.com/tobymao/sqlglot/pull/7010) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`404797a`](https://github.com/tobymao/sqlglot/commit/404797acfb1a9f860bd87880fecacd79cb1b2161) - **optimizer**: Move `CURRENT_SCHEMA()` to Base Annotator *(PR [#7021](https://github.com/tobymao/sqlglot/pull/7021) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`994d3a3`](https://github.com/tobymao/sqlglot/commit/994d3a37983791d4e8484d6d39b819a1cff2f774) - **parser**: robust STAR with EXCLUDE (redshift) *(PR [#6972](https://github.com/tobymao/sqlglot/pull/6972) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#6963](https://github.com/tobymao/sqlglot/issues/6963) opened by [@iboland](https://github.com/iboland)*
- [`3ea80fb`](https://github.com/tobymao/sqlglot/commit/3ea80fb86482e257c4565ab7876dd6cdd60a7be2) - **optimizer**: annotate REVERSE(str) for DuckDB *(PR [#7018](https://github.com/tobymao/sqlglot/pull/7018) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`352fb94`](https://github.com/tobymao/sqlglot/commit/352fb94c46e5dd0dfd824b4472b03cccf21d3f56) - **optimizer**: annotate ISODOW(expr) for DuckDB *(PR [#7016](https://github.com/tobymao/sqlglot/pull/7016) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`c2e5954`](https://github.com/tobymao/sqlglot/commit/c2e59545d8030b1d2e7859631c9d75ea0f6df883) - **optimizer**: annotate COUNTIF(expr) for DuckDB *(PR [#7012](https://github.com/tobymao/sqlglot/pull/7012) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`e35ee14`](https://github.com/tobymao/sqlglot/commit/e35ee143b08f671175e730e602e9a5dcd9155fde) - **optimizer**: annotate CountIf(expr) for ClickHouse *(PR [#7013](https://github.com/tobymao/sqlglot/pull/7013) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`6971c17`](https://github.com/tobymao/sqlglot/commit/6971c1730b14b0516ff3aca3780f6d84203e6993) - **snowflake**: support aliases in semantic view dimensions *(PR [#6994](https://github.com/tobymao/sqlglot/pull/6994) by [@georgesittas](https://github.com/georgesittas))*
- :arrow_lower_right: *addresses issue [#6993](https://github.com/tobymao/sqlglot/issues/6993) opened by [@sgomezvillamor](https://github.com/sgomezvillamor)*
- [`b73be3e`](https://github.com/tobymao/sqlglot/commit/b73be3e8c95b44f2cd71498592bd4b5b63ba02d9) - **duckdb**: support `today()` for duckdb *(PR [#7015](https://github.com/tobymao/sqlglot/pull/7015) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`36e3310`](https://github.com/tobymao/sqlglot/commit/36e3310959260a7b1124a60589cdc90a3e631624) - **exasol**: support current_schema as no_param *(PR [#7000](https://github.com/tobymao/sqlglot/pull/7000) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`fd8860b`](https://github.com/tobymao/sqlglot/commit/fd8860b8b8d5e0c29c53597485c656923375e1d9) - **optimizer**: annotate FORMAT(expr) for DuckDB *(PR [#7017](https://github.com/tobymao/sqlglot/pull/7017) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`eecdfa1`](https://github.com/tobymao/sqlglot/commit/eecdfa1b15ac1808f93107d2ad6a51f52ffaf7cc) - **optimizer**: Annotate `DAYOFWEEK(expr)`, `DAYOFMONTH(expr)` for Hive/Spark/DBX *(PR [#6996](https://github.com/tobymao/sqlglot/pull/6996) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`4fc26f0`](https://github.com/tobymao/sqlglot/commit/4fc26f086701cebb3d3974b762d12e1435f4a195) - **optimizer**: annotate `TIME_BUCKET(expr)` for DuckDB *(PR [#7014](https://github.com/tobymao/sqlglot/pull/7014) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`00e6d9a`](https://github.com/tobymao/sqlglot/commit/00e6d9af02971aad6e7102cae3af2a7192fa7070) - **optimizer**: annotate `UNIX_DATE(expr)` for Spark/DBX *(PR [#7011](https://github.com/tobymao/sqlglot/pull/7011) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`86a5509`](https://github.com/tobymao/sqlglot/commit/86a5509bfcb8df6a8cf8b0971d9d12ae3204f2af) - **exasol**: support user for exasol *(PR [#7001](https://github.com/tobymao/sqlglot/pull/7001) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`b27c163`](https://github.com/tobymao/sqlglot/commit/b27c163fcce0a4b0a4f75d131cdc105353e95464) - **optimizer**: support `CURDATE` for Exasol *(PR [#6999](https://github.com/tobymao/sqlglot/pull/6999) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`47dc558`](https://github.com/tobymao/sqlglot/commit/47dc5589f8b165d9f0296e6aa48de337f556f1a4) - **optimizer**: annotate ARRAY_COMPACT(expr) for Spark/DBX *(PR [#7034](https://github.com/tobymao/sqlglot/pull/7034) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`235b8ac`](https://github.com/tobymao/sqlglot/commit/235b8ac24d41324239d6581b5636ad19ec7b9376) - **optimizer**: annotate `ARRAY_INTERSECT(expr)` for Hive/Spark/DBX *(PR [#7037](https://github.com/tobymao/sqlglot/pull/7037) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`643a6c7`](https://github.com/tobymao/sqlglot/commit/643a6c7d97292eb29ba1bac6523747e161544a1a) - **snowflake**: Transpilation support for Snowflake REGEXP_LIKE to DuckDB *(PR [#7030](https://github.com/tobymao/sqlglot/pull/7030) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- [`70d6f2b`](https://github.com/tobymao/sqlglot/commit/70d6f2b5d8c0f37550ba7a288c5f7f7021c66bd7) - **optimizer**: annotate `ARRAY_INSERT(expr)` for Spark/DBX *(PR [#7044](https://github.com/tobymao/sqlglot/pull/7044) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`1011fca`](https://github.com/tobymao/sqlglot/commit/1011fca568e29db2b13d88da29dfbf6df3f41af4) - **duckdb**: transpile Snowflake's current_schemas *(PR [#7042](https://github.com/tobymao/sqlglot/pull/7042) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`3019d0a`](https://github.com/tobymao/sqlglot/commit/3019d0a0110a503b68b2a3cf7f93be1000f20a40) - **spark**: Map BIT_GET to GETBIT for Spark/DBX *(PR [#7041](https://github.com/tobymao/sqlglot/pull/7041) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`27ae429`](https://github.com/tobymao/sqlglot/commit/27ae42987864949f74b784d3dbb063bd3450e0dc) - **spark**: transpile BIT_COUNT to DuckDB *(PR [#7039](https://github.com/tobymao/sqlglot/pull/7039) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`f6cbd27`](https://github.com/tobymao/sqlglot/commit/f6cbd27fd61937efba6879f20f5ff0239e678469) - **postgres**: Add support for trigger DDL statements *(PR [#6978](https://github.com/tobymao/sqlglot/pull/6978) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- :arrow_lower_right: *addresses issue [#6926](https://github.com/tobymao/sqlglot/issues/6926) opened by [@Badg](https://github.com/Badg)*
- [`c5939c1`](https://github.com/tobymao/sqlglot/commit/c5939c12c6816437f5abda3322f99cc597b1616c) - **spark**: Map curdate to current_date for Spark/DBX *(PR [#7048](https://github.com/tobymao/sqlglot/pull/7048) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`58419e1`](https://github.com/tobymao/sqlglot/commit/58419e1f47119a135276a722b85ccfa92ae3d1f1) - **optimizer**: move `SessionUser` to base *(PR [#7049](https://github.com/tobymao/sqlglot/pull/7049) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`3c67ec0`](https://github.com/tobymao/sqlglot/commit/3c67ec0007b509ec58297bf2c61f17d095b694b6) - **duckdb**: Add traspilation support for NULL values in ARRAY_CONTAINS function *(PR [#7055](https://github.com/tobymao/sqlglot/pull/7055) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`f98cba1`](https://github.com/tobymao/sqlglot/commit/f98cba17caa8f3c2dcd5669f3525094c5dd58781) - **optimizer**: move exp.Rand to base *(PR [#7065](https://github.com/tobymao/sqlglot/pull/7065) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`4f8a49c`](https://github.com/tobymao/sqlglot/commit/4f8a49cd42ef37178cd0626554bfd263a140046e) - **snowflake**: Transpilation support for Snowflake REGEXP_COUNT to DuckDB *(PR [#7054](https://github.com/tobymao/sqlglot/pull/7054) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- [`eaba8dc`](https://github.com/tobymao/sqlglot/commit/eaba8dc26b2ec28b8074eb0cf2b3db086cf7ccc3) - **optimizer**: move DEGREES(expr) to base *(PR [#7074](https://github.com/tobymao/sqlglot/pull/7074) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`a87c1b4`](https://github.com/tobymao/sqlglot/commit/a87c1b46b54ef7f6895c68666c05041924691576) - **optimizer**: annotate DEGREES(expr) for T-SQL *(PR [#7077](https://github.com/tobymao/sqlglot/pull/7077) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`f057a1b`](https://github.com/tobymao/sqlglot/commit/f057a1b912d473a77f111d33f40ecce2f6d54cf8) - **optimizer**: move MONTHNAME to base *(PR [#7083](https://github.com/tobymao/sqlglot/pull/7083) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`dd2cf85`](https://github.com/tobymao/sqlglot/commit/dd2cf850134a2833d0da5eb58206accc298c9e0a) - **clickhouse**: support `UTCTimestamp` *(PR [#7082](https://github.com/tobymao/sqlglot/pull/7082) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`7ff13c6`](https://github.com/tobymao/sqlglot/commit/7ff13c690dddd9e1024b1a4ab6c9532f67bdece8) - **snowflake**: transpilation support map_contains_key *(PR [#7070](https://github.com/tobymao/sqlglot/pull/7070) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`6fa494d`](https://github.com/tobymao/sqlglot/commit/6fa494da191753da8b85fb6a706b99f7f4950f43) - **clickhouse**: support `arrayCompact(expr)` function *(PR [#7084](https://github.com/tobymao/sqlglot/pull/7084) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`a58c37d`](https://github.com/tobymao/sqlglot/commit/a58c37d24441f12af92df329269910bc7b5a0c8f) - **snowflake**: transpilation of Snowflake REGEXP_REPLACE to DuckDB *(PR [#7078](https://github.com/tobymao/sqlglot/pull/7078) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- [`3a453d0`](https://github.com/tobymao/sqlglot/commit/3a453d045a261b82ed6a84b661da0c9a86e3161d) - **duckdb**: Add transpilation support for NULLs in ARRAY_DISTINCT *(PR [#7069](https://github.com/tobymao/sqlglot/pull/7069) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`dfcd5d7`](https://github.com/tobymao/sqlglot/commit/dfcd5d75f1caf3a32d5930a91f4fb1de598aa914) - **exasol**: Add Exasol reserved keywords to exasol dialect *(PR [#7086](https://github.com/tobymao/sqlglot/pull/7086) by [@nnamdi16](https://github.com/nnamdi16))*
- [`b569a3d`](https://github.com/tobymao/sqlglot/commit/b569a3d7628600608144d1d93e17eab4cafe4217) - **DuckDb**: Add transpilation support for ARRAY_MAX and ARRAY_MIN functions *(PR [#7080](https://github.com/tobymao/sqlglot/pull/7080) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`1074d66`](https://github.com/tobymao/sqlglot/commit/1074d66231d1de64b6b9aa43de6afbdc6717da5f) - **snowflake**: transpilation of Snowflake REGEXP_INSTR to DuckDB *(PR [#7097](https://github.com/tobymao/sqlglot/pull/7097) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- [`ab1c2ab`](https://github.com/tobymao/sqlglot/commit/ab1c2ab44556a8f7ffe7dad09e4b50e75b122b5d) - **optimizer**: annotate PERCENTILE/APPROX_PERCENTILE for hive, spark2, spark, dbx *(PR [#7100](https://github.com/tobymao/sqlglot/pull/7100) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7096](https://github.com/tobymao/sqlglot/issues/7096) opened by [@sunilmishra-amp](https://github.com/sunilmishra-amp)*
- [`0f8287d`](https://github.com/tobymao/sqlglot/commit/0f8287d8e5ff1eee2aea29001443ee00a4b2ae47) - **optimizer**: annotate BIT_OR(expr) for Spark/DBX *(PR [#7101](https://github.com/tobymao/sqlglot/pull/7101) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`e19abfd`](https://github.com/tobymao/sqlglot/commit/e19abfded7c159c30f53063d10ae57406553f75d) - **optimizer**: annotate BIT_AND(expr) for Spark/DBX *(PR [#7103](https://github.com/tobymao/sqlglot/pull/7103) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`0c4f74f`](https://github.com/tobymao/sqlglot/commit/0c4f74f6574d3acf06935626615e2e1f14ae9c04) - **optimizer**: parse and annotate ELEMENT_AT for spark2, spark, dbx *(PR [#7104](https://github.com/tobymao/sqlglot/pull/7104) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7096](https://github.com/tobymao/sqlglot/issues/7096) opened by [@sunilmishra-amp](https://github.com/sunilmishra-amp)*
- [`8b8aef0`](https://github.com/tobymao/sqlglot/commit/8b8aef01197b670a727a59e46727b5a57f106a5d) - **optimizer**: annotate BIT_XOR(expr) for Spark/DBX *(PR [#7106](https://github.com/tobymao/sqlglot/pull/7106) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`ce09e81`](https://github.com/tobymao/sqlglot/commit/ce09e81bcda5c439825af54ac4e6eef124694833) - **DuckDB**: Enable transpilation for ARRAY_EXCEPT function *(PR [#7094](https://github.com/tobymao/sqlglot/pull/7094) by [@fivetran-amrutabhimsenayachit](https://github.com/fivetran-amrutabhimsenayachit))*
- [`1b1d57a`](https://github.com/tobymao/sqlglot/commit/1b1d57a3541f48291a1534a0b1a28948f8b8207e) - **snowflake**: transpilation of Snowflake REGEXP_SUBSTR and REGEXP_SUBSTR_ALL to DuckDB *(PR [#7095](https://github.com/tobymao/sqlglot/pull/7095) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- [`0858599`](https://github.com/tobymao/sqlglot/commit/0858599e274567f7a8c9361afab1526cd2d58eea) - **clickhouse**: support arrayConcat to clickhouse *(PR [#7108](https://github.com/tobymao/sqlglot/pull/7108) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`9100ea7`](https://github.com/tobymao/sqlglot/commit/9100ea742cd83fd70aaf3192ceeba8abeda61b47) - **parser**: support DECLARE spark, dbx *(PR [#7113](https://github.com/tobymao/sqlglot/pull/7113) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *addresses issue [#7112](https://github.com/tobymao/sqlglot/issues/7112) opened by [@aersam](https://github.com/aersam)*
- [`73ab9af`](https://github.com/tobymao/sqlglot/commit/73ab9af9c95274b3feac9278145432c27695054e) - **clickhouse**: support arrayDistinct(expr) for clickhouse *(PR [#7114](https://github.com/tobymao/sqlglot/pull/7114) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`f796956`](https://github.com/tobymao/sqlglot/commit/f796956d3cc857995572d715b8db530b2d76b8d6) - **optimizer**: annotate `ArrayDistinct` for Hive/Spark/DBX *(PR [#7119](https://github.com/tobymao/sqlglot/pull/7119) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`2069b06`](https://github.com/tobymao/sqlglot/commit/2069b06284d6998d94c43c16d4b46ac50ea0d84a) - **optimizer**: annotate ARRAY_EXCEPT for Hive/Spark/DBX *(PR [#7123](https://github.com/tobymao/sqlglot/pull/7123) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`5a30754`](https://github.com/tobymao/sqlglot/commit/5a30754df09ddb1260b394c812596adb03c2710d) - **duckdb**: support `current_localtimestamp()` for DuckDB *(PR [#7128](https://github.com/tobymao/sqlglot/pull/7128) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
### :bug: Bug Fixes
- [`836cc60`](https://github.com/tobymao/sqlglot/commit/836cc60c8177339e15bfef3bd3b7d98569400385) - **parser**: Limit named PK parsing to MySQL only *(PR [#6991](https://github.com/tobymao/sqlglot/pull/6991) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#6989](https://github.com/tobymao/sqlglot/issues/6989) opened by [@sgomezvillamor](https://github.com/sgomezvillamor)*
- [`495920e`](https://github.com/tobymao/sqlglot/commit/495920eb3c447949e0c787adf347c8bcd7035764) - **snowflake**: Parse MODIFY as ALTER in ALTER TABLE *(PR [#7024](https://github.com/tobymao/sqlglot/pull/7024) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#7023](https://github.com/tobymao/sqlglot/issues/7023) opened by [@abhaysharma419](https://github.com/abhaysharma419)*
- [`1e753a3`](https://github.com/tobymao/sqlglot/commit/1e753a35405edaf9b6a1b90fccd74eaef23a028b) - **parser**: parse cast argument using _parse_assignment closes [#7027](https://github.com/tobymao/sqlglot/pull/7027) *(commit by [@georgesittas](https://github.com/georgesittas))*
- [`67e47a4`](https://github.com/tobymao/sqlglot/commit/67e47a47582cf0970ee6a9e40c9014ba04a0c065) - Support missing meta when updating position metadata for an expression *(PR [#7032](https://github.com/tobymao/sqlglot/pull/7032) by [@izeigerman](https://github.com/izeigerman))*
- [`9bffc99`](https://github.com/tobymao/sqlglot/commit/9bffc99efec77605292e3332dfd626754441f9d8) - **snowflake**: wrap jarowinkler similarity in UPPER for case-insensitivty *(PR [#7022](https://github.com/tobymao/sqlglot/pull/7022) by [@kyle-cheung](https://github.com/kyle-cheung))*
- [`9d7db06`](https://github.com/tobymao/sqlglot/commit/9d7db06cf8ef66583f11b6d54af573bb28f4434b) - **spark**: Generator for ARRAY_INSERT(expr) *(PR [#7036](https://github.com/tobymao/sqlglot/pull/7036) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- :arrow_lower_right: *fixes issue [#7035](https://github.com/tobymao/sqlglot/issues/7035) opened by [@AbhishekASLK](https://github.com/AbhishekASLK)*
- [`f476d07`](https://github.com/tobymao/sqlglot/commit/f476d071a1412fb2d9cd6f39067380252ab4c15a) - **duckdb**: update transpilation of SEQ functions and GENERATOR for DuckDB *(PR [#7029](https://github.com/tobymao/sqlglot/pull/7029) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- :arrow_lower_right: *fixes issue [#6998](https://github.com/tobymao/sqlglot/issues/6998) opened by [@kyle-cheung](https://github.com/kyle-cheung)*
- [`aa14297`](https://github.com/tobymao/sqlglot/commit/aa142974382fa4115234834e082ca594e00eefa4) - **duckdb**: transpile LATERAL VIEW INLINE from spark to DuckDB *(PR [#7033](https://github.com/tobymao/sqlglot/pull/7033) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`f9d1f73`](https://github.com/tobymao/sqlglot/commit/f9d1f73b490e6694da0e800d9a5a70e1ba7f38d5) - **snowflake**: refactor colon (extract) parsing precedence *(PR [#7046](https://github.com/tobymao/sqlglot/pull/7046) by [@georgesittas](https://github.com/georgesittas))*
- [`5ef8bef`](https://github.com/tobymao/sqlglot/commit/5ef8befd435fa644ae7e8ca80c8564207f7ad014) - **bigquery**: Parse & generate table alias before its version *(PR [#7075](https://github.com/tobymao/sqlglot/pull/7075) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#7073](https://github.com/tobymao/sqlglot/issues/7073) opened by [@chelsea-lin](https://github.com/chelsea-lin)*
- [`bd4db6b`](https://github.com/tobymao/sqlglot/commit/bd4db6bef103c2d810e661948d2e3ddda0bf2c67) - **parser**: INTERVAL units with DCOLON *(PR [#7076](https://github.com/tobymao/sqlglot/pull/7076) by [@geooo109](https://github.com/geooo109))*
- :arrow_lower_right: *fixes issue [#7072](https://github.com/tobymao/sqlglot/issues/7072) opened by [@ligfx](https://github.com/ligfx)*
- [`7664358`](https://github.com/tobymao/sqlglot/commit/7664358b27599936dacb2b7d8e5329fe32425e62) - **exasol**: fix parsing error in json_value for exasol dialect *(PR [#7088](https://github.com/tobymao/sqlglot/pull/7088) by [@nnamdi16](https://github.com/nnamdi16))*
- [`af8c3e9`](https://github.com/tobymao/sqlglot/commit/af8c3e9222224ee4878bc81dac0dee032e4863a7) - missing comments in subquery *(commit by [@tobymao](https://github.com/tobymao))*
- [`217e960`](https://github.com/tobymao/sqlglot/commit/217e960f57675cc5f5cb9ff9996c048a31d8004c) - **optimizer**: annotate ARRAY_CONTAINS *(PR [#7099](https://github.com/tobymao/sqlglot/pull/7099) by [@geooo109](https://github.com/geooo109))*
- [`3ff4e0d`](https://github.com/tobymao/sqlglot/commit/3ff4e0d0b97041f72b759f1fd2bd0ec561c96423) - **deploy**: Fix _version not exists *(PR [#7129](https://github.com/tobymao/sqlglot/pull/7129) by [@VaggelisD](https://github.com/VaggelisD))*
- [`93bf337`](https://github.com/tobymao/sqlglot/commit/93bf337ca2af1b5d9b06d6bf3c50c5bcce680077) - **optimizer**: annotate date_diff(expr) for DuckDB *(PR [#7125](https://github.com/tobymao/sqlglot/pull/7125) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`4a38462`](https://github.com/tobymao/sqlglot/commit/4a3846280d00b94cc677baff63d90e3f1361cd8a) - **deploy**: Use GA ARM machine *(PR [#7131](https://github.com/tobymao/sqlglot/pull/7131) by [@VaggelisD](https://github.com/VaggelisD))*
### :zap: Performance Improvements
- [`a8aa371`](https://github.com/tobymao/sqlglot/commit/a8aa371f3f8d5964b8625a2f92f302ae1be297ea) - improve `DataType.build` perf by removing unnecessary constructor *(PR [#7092](https://github.com/tobymao/sqlglot/pull/7092) by [@georgesittas](https://github.com/georgesittas))*
- [`f12a58f`](https://github.com/tobymao/sqlglot/commit/f12a58f86501ef726335f147b7171d01b162ea79) - extract Column instance check out of _set_type in annotate_types *(PR [#7091](https://github.com/tobymao/sqlglot/pull/7091) by [@georgesittas](https://github.com/georgesittas))*
- [`ddbf64c`](https://github.com/tobymao/sqlglot/commit/ddbf64ceef63150ffef5e60b5601af0e84a9f54b) - optimize large query performance in optimizer pipeline *(PR [#7090](https://github.com/tobymao/sqlglot/pull/7090) by [@sabrikaragonen](https://github.com/sabrikaragonen))*
- :arrow_lower_right: *addresses issue [#5112](https://github.com/tobymao/sqlglot/issues/5112) opened by [@karakanb](https://github.com/karakanb)*
### :recycle: Refactors
- [`749cf18`](https://github.com/tobymao/sqlglot/commit/749cf18dbcb8d1d0c7d144e6481ecc3a443d4a0e) - require original SQL in `Parser.parse` *(PR [#7045](https://github.com/tobymao/sqlglot/pull/7045) by [@georgesittas](https://github.com/georgesittas))*
- :arrow_lower_right: *addresses issue [#7031](https://github.com/tobymao/sqlglot/issues/7031) opened by [@ultrabear](https://github.com/ultrabear)*
- [`13ee312`](https://github.com/tobymao/sqlglot/commit/13ee31281fe21c670f8ce1656520c18762e8402f) - use `IntEnum` instead of auto/string enums *(PR [#7050](https://github.com/tobymao/sqlglot/pull/7050) by [@georgesittas](https://github.com/georgesittas))*
- [`4f964db`](https://github.com/tobymao/sqlglot/commit/4f964db9bfbe42b31dc9f191e687cb2f5f7db0d8) - remove prefix from data type and cleanup *(commit by [@tobymao](https://github.com/tobymao))*
- [`1150e39`](https://github.com/tobymao/sqlglot/commit/1150e3911b0b82a9683f765de11605b14fd66ddb) - expression_core which is now compilable by mypyc *(PR [#7117](https://github.com/tobymao/sqlglot/pull/7117) by [@tobymao](https://github.com/tobymao))*
### :wrench: Chores
- [`1c5e168`](https://github.com/tobymao/sqlglot/commit/1c5e1684dbb6f508f08b30e9ea96393b25ef0185) - generate CNAME file at docs build time *(PR [#6958](https://github.com/tobymao/sqlglot/pull/6958) by [@georgesittas](https://github.com/georgesittas))*
- [`fd80f4b`](https://github.com/tobymao/sqlglot/commit/fd80f4b9dbbb2a3709e4ea09118b826677b0d3e8) - transpilation test for LEAD from Snowflake to DuckDB *(PR [#6968](https://github.com/tobymao/sqlglot/pull/6968) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`4f82c90`](https://github.com/tobymao/sqlglot/commit/4f82c901bcc829d142248306202c89d440cbed86) - duckdb version() tests *(commit by [@geooo109](https://github.com/geooo109))*
- [`eabd68f`](https://github.com/tobymao/sqlglot/commit/eabd68fa952b0b7ce86927a22e5fb03f94915a21) - used dictionary comprehension in annotators *(PR [#7025](https://github.com/tobymao/sqlglot/pull/7025) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`11da02f`](https://github.com/tobymao/sqlglot/commit/11da02f2bf7128c191576f68ffb0b5d881a1e8f2) - **optimizer**: move `CurrentVersion` annotator to base *(PR [#6997](https://github.com/tobymao/sqlglot/pull/6997) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`b1f0542`](https://github.com/tobymao/sqlglot/commit/b1f05428d8a4d441398c0f3d4a65b49b0eda2729) - tokenizer optimizations *(PR [#7038](https://github.com/tobymao/sqlglot/pull/7038) by [@geooo109](https://github.com/geooo109))*
- [`214043c`](https://github.com/tobymao/sqlglot/commit/214043c5a9f3215d2811603c62701b59b0e61f05) - update license version *(PR [#7047](https://github.com/tobymao/sqlglot/pull/7047) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`5172f1a`](https://github.com/tobymao/sqlglot/commit/5172f1a5ff62ebc0bcca4f27ab5b79c0aefbdf6a) - refactor _scan *(PR [#7051](https://github.com/tobymao/sqlglot/pull/7051) by [@geooo109](https://github.com/geooo109))*
- [`6c08a77`](https://github.com/tobymao/sqlglot/commit/6c08a77598dd672ae0f05eb4b36edfba520f4002) - improve scope module perf by replacing instance checks with type checks *(PR [#7066](https://github.com/tobymao/sqlglot/pull/7066) by [@georgesittas](https://github.com/georgesittas))*
- [`c2f7761`](https://github.com/tobymao/sqlglot/commit/c2f7761f4f75ceabf7df781e5431b19b6eade3d6) - improve schema module perf by caching normalized tables/names *(PR [#7068](https://github.com/tobymao/sqlglot/pull/7068) by [@georgesittas](https://github.com/georgesittas))*
- [`13f1b06`](https://github.com/tobymao/sqlglot/commit/13f1b06570a20d2f8e6a9cc22b5a20e2d1af8674) - **snowflake**: add transpilation test for LAST_VALUE from snowflake to duckdb *(PR [#7079](https://github.com/tobymao/sqlglot/pull/7079) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`92c364a`](https://github.com/tobymao/sqlglot/commit/92c364ae64cf68fc60d9418cfea17a8414e37333) - refactor map_contains_key from sf to duckdb *(commit by [@geooo109](https://github.com/geooo109))*
- [`9b4524a`](https://github.com/tobymao/sqlglot/commit/9b4524aa4c2deac4dcc46a628370101e9677a4c2) - small opts for generator sql method *(PR [#7085](https://github.com/tobymao/sqlglot/pull/7085) by [@geooo109](https://github.com/geooo109))*
- [`aba0db1`](https://github.com/tobymao/sqlglot/commit/aba0db107a0cf02471234c54ffb982f8dca9cfcd) - remove `classproperty` as it is dead code *(PR [#7087](https://github.com/tobymao/sqlglot/pull/7087) by [@georgesittas](https://github.com/georgesittas))*
- [`f927329`](https://github.com/tobymao/sqlglot/commit/f927329f3f47d2ed7835715103015d5316d2943a) - add some type hints *(PR [#7089](https://github.com/tobymao/sqlglot/pull/7089) by [@georgesittas](https://github.com/georgesittas))*
- [`2935e95`](https://github.com/tobymao/sqlglot/commit/2935e957116e584287572a770a1ecd48a2407a9d) - refactor RANK/DENSE_RANK for exasol *(commit by [@geooo109](https://github.com/geooo109))*
- [`37fa8c7`](https://github.com/tobymao/sqlglot/commit/37fa8c7219a2f17a351f948d6eb314a543f8784d) - **tokenizer**: Split core functionality to TokenizerCore *(PR [#7116](https://github.com/tobymao/sqlglot/pull/7116) by [@VaggelisD](https://github.com/VaggelisD))*
- [`3e8f551`](https://github.com/tobymao/sqlglot/commit/3e8f551addd2240f8c79d88692180c4ca27a4149) - update claude.md *(commit by [@tobymao](https://github.com/tobymao))*
## [v28.10.0] - 2026-02-04
### :boom: BREAKING CHANGES
- due to [`55698db`](https://github.com/tobymao/sqlglot/commit/55698dbca84078160248e412cf595dd26aababef) - Annotate MAKE_TIME(expr) for DuckDB *(PR [#6931](https://github.com/tobymao/sqlglot/pull/6931) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate MAKE_TIME(expr) for DuckDB (#6931)
- due to [`e750ce7`](https://github.com/tobymao/sqlglot/commit/e750ce7c4ac8235e395fe077c6c9b6d5572affaf) - Transpilation for SHA2 and SHA2_BINARY from Snowflake to DuckDB *(PR [#6929](https://github.com/tobymao/sqlglot/pull/6929) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
Transpilation for SHA2 and SHA2_BINARY from Snowflake to DuckDB (#6929)
- due to [`9b05968`](https://github.com/tobymao/sqlglot/commit/9b05968e23fe94f804d22d77bf91ab44071aea73) - Annotate BIT_LENGTH(expr) for DuckDB *(PR [#6932](https://github.com/tobymao/sqlglot/pull/6932) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate BIT_LENGTH(expr) for DuckDB (#6932)
- due to [`2050362`](https://github.com/tobymao/sqlglot/commit/20503623debdc11d739746461e8bfb8c13514a58) - Annotate LENGTH(expr) for DuckDB *(PR [#6937](https://github.com/tobymao/sqlglot/pull/6937) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate LENGTH(expr) for DuckDB (#6937)
- due to [`e803c7f`](https://github.com/tobymao/sqlglot/commit/e803c7f86e518dccfc19c2543394cd9758c59899) - Moved SIN, COS, TAN, COT to Base *(PR [#6936](https://github.com/tobymao/sqlglot/pull/6936) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Moved SIN, COS, TAN, COT to Base (#6936)
- due to [`973d25d`](https://github.com/tobymao/sqlglot/commit/973d25dac469934394af4b1a6e0a11e04ad8524f) - support transpilation of ARRAY_REMOVE_AT *(PR [#6930](https://github.com/tobymao/sqlglot/pull/6930) by [@fivetran-MichaelLee](https://github.com/fivetran-MichaelLee))*:
support transpilation of ARRAY_REMOVE_AT (#6930)
- due to [`2e2ff03`](https://github.com/tobymao/sqlglot/commit/2e2ff0363d72cc7cc80b308c6c62496969199b50) - Refactor RPAD/LPAD *(PR [#6869](https://github.com/tobymao/sqlglot/pull/6869) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*:
Refactor RPAD/LPAD (#6869)
- due to [`62aeff8`](https://github.com/tobymao/sqlglot/commit/62aeff8b978f372615a113cbd2ea86e26dd3ba55) - Annotate CURRENT_CATALOG to Base *(PR [#6940](https://github.com/tobymao/sqlglot/pull/6940) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate CURRENT_CATALOG to Base (#6940)
- due to [`04002ae`](https://github.com/tobymao/sqlglot/commit/04002aedb48ee1d11f077b66a63722127f027243) - transpile NTH_VALUE from Snowflake to DuckDB *(PR [#6882](https://github.com/tobymao/sqlglot/pull/6882) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*:
transpile NTH_VALUE from Snowflake to DuckDB (#6882)
- due to [`bdce7c7`](https://github.com/tobymao/sqlglot/commit/bdce7c722efa37d44ee1ba85aa4c77f958e0b19f) - Annotate DAYOFMONTH(expr), DAYOFYEAR(expr) for MySQL *(PR [#6941](https://github.com/tobymao/sqlglot/pull/6941) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate DAYOFMONTH(expr), DAYOFYEAR(expr) for MySQL (#6941)
- due to [`edbbb59`](https://github.com/tobymao/sqlglot/commit/edbbb597998dbdb77fa89e9a98d6ae56f0915b00) - Annotate WEEK(expr) for MySQL *(PR [#6942](https://github.com/tobymao/sqlglot/pull/6942) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate WEEK(expr) for MySQL (#6942)
- due to [`ccb484b`](https://github.com/tobymao/sqlglot/commit/ccb484b82bc665b39e6a0700a885567d19882623) - Annotate HOUR(expr) for MySQL, Hive, Spark, DBX *(PR [#6943](https://github.com/tobymao/sqlglot/pull/6943) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate HOUR(expr) for MySQL, Hive, Spark, DBX (#6943)
- due to [`852adec`](https://github.com/tobymao/sqlglot/commit/852adeca09c7776810eb691a04a570e0cf673aa3) - Move `MD5(expr)` to Base *(PR [#6944](https://github.com/tobymao/sqlglot/pull/6944) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Move `MD5(expr)` to Base (#6944)
- due to [`2326eae`](https://github.com/tobymao/sqlglot/commit/2326eae50e6ecd47d4a8b2c848a93b720538187a) - Move ASIN, ACOS, ATAN to Base *(PR [#6945](https://github.com/tobymao/sqlglot/pull/6945) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Move ASIN, ACOS, ATAN to Base (#6945)
- due to [`7989906`](https://github.com/tobymao/sqlglot/commit/79899060ed3331a55ca1c935e00376a1c137840c) - Move ASINH, ACOSH, ATANH to Base *(PR [#6946](https://github.com/tobymao/sqlglot/pull/6946) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Move ASINH, ACOSH, ATANH to Base (#6946)
- due to [`713d22f`](https://github.com/tobymao/sqlglot/commit/713d22f0d44790f8dc7d80ba12ae920815a28c51) - Annotate LENGTH, LEVENSHTEIN_DISTANCE for Presto/Trino *(PR [#6947](https://github.com/tobymao/sqlglot/pull/6947) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate LENGTH, LEVENSHTEIN_DISTANCE for Presto/Trino (#6947)
- due to [`0e872dc`](https://github.com/tobymao/sqlglot/commit/0e872dcb5337d13befe981261466ca14a788ef1e) - Annotate POSITION and STRPOS for Trino/Presto *(PR [#6948](https://github.com/tobymao/sqlglot/pull/6948) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate POSITION and STRPOS for Trino/Presto (#6948)
- due to [`d01657a`](https://github.com/tobymao/sqlglot/commit/d01657a581a42f1588436882d190b20f4ea004a0) - Annotate WIDTH_BUCKET(expr) for Presto/Trino *(PR [#6950](https://github.com/tobymao/sqlglot/pull/6950) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate WIDTH_BUCKET(expr) for Presto/Trino (#6950)
- due to [`cec0f27`](https://github.com/tobymao/sqlglot/commit/cec0f27f17f01c7b1355f1c1306a0f08af639331) - Annotate BITWISE OPERATORS for Presto/Trino *(PR [#6951](https://github.com/tobymao/sqlglot/pull/6951) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate BITWISE OPERATORS for Presto/Trino (#6951)
- due to [`2292d0d`](https://github.com/tobymao/sqlglot/commit/2292d0d477ea9aaa7016539deb1435164ee749da) - Move SINH, COSH, TANH to Base *(PR [#6954](https://github.com/tobymao/sqlglot/pull/6954) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Move SINH, COSH, TANH to Base (#6954)
- due to [`686ab6a`](https://github.com/tobymao/sqlglot/commit/686ab6ab6da7a1bc7652846989aedd014a9a6d41) - Use replace instead of set for JSON dot access identifiers *(PR [#6953](https://github.com/tobymao/sqlglot/pull/6953) by [@georgesittas](https://github.com/georgesittas))*:
Use replace instead of set for JSON dot access identifiers (#6953)
### :sparkles: New Features
- [`55698db`](https://github.com/tobymao/sqlglot/commit/55698dbca84078160248e412cf595dd26aababef) - **optimizer**: Annotate MAKE_TIME(expr) for DuckDB *(PR [#6931](https://github.com/tobymao/sqlglot/pull/6931) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`e750ce7`](https://github.com/tobymao/sqlglot/commit/e750ce7c4ac8235e395fe077c6c9b6d5572affaf) - **snowflake**: Transpilation for SHA2 and SHA2_BINARY from Snowflake to DuckDB *(PR [#6929](https://github.com/tobymao/sqlglot/pull/6929) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*
- [`9b05968`](https://github.com/tobymao/sqlglot/commit/9b05968e23fe94f804d22d77bf91ab44071aea73) - **optimizer**: Annotate BIT_LENGTH(expr) for DuckDB *(PR [#6932](https://github.com/tobymao/sqlglot/pull/6932) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`2050362`](https://github.com/tobymao/sqlglot/commit/20503623debdc11d739746461e8bfb8c13514a58) - **optimizer**: Annotate LENGTH(expr) for DuckDB *(PR [#6937](https://github.com/tobymao/sqlglot/pull/6937) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`e803c7f`](https://github.com/tobymao/sqlglot/commit/e803c7f86e518dccfc19c2543394cd9758c59899) - **optimizer**: Moved SIN, COS, TAN, COT to Base *(PR [#6936](https://github.com/tobymao/sqlglot/pull/6936) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`973d25d`](https://github.com/tobymao/sqlglot/commit/973d25dac469934394af4b1a6e0a11e04ad8524f) - **duckdb**: support transpilation of ARRAY_REMOVE_AT *(PR [#6930](https://github.com/tobymao/sqlglot/pull/6930) by [@fivetran-MichaelLee](https://github.com/fivetran-MichaelLee))*
- [`2e2ff03`](https://github.com/tobymao/sqlglot/commit/2e2ff0363d72cc7cc80b308c6c62496969199b50) - **snowflake**: Refactor RPAD/LPAD *(PR [#6869](https://github.com/tobymao/sqlglot/pull/6869) by [@fivetran-ashashankar](https://github.com/fivetran-ashashankar))*
- [`62aeff8`](https://github.com/tobymao/sqlglot/commit/62aeff8b978f372615a113cbd2ea86e26dd3ba55) - **optimizer**: Annotate CURRENT_CATALOG to Base *(PR [#6940](https://github.com/tobymao/sqlglot/pull/6940) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`04002ae`](https://github.com/tobymao/sqlglot/commit/04002aedb48ee1d11f077b66a63722127f027243) - **snowflake**: transpile NTH_VALUE from Snowflake to DuckDB *(PR [#6882](https://github.com/tobymao/sqlglot/pull/6882) by [@fivetran-felixhuang](https://github.com/fivetran-felixhuang))*
- [`ccb484b`](https://github.com/tobymao/sqlglot/commit/ccb484b82bc665b39e6a0700a885567d19882623) - **optimizer**: Annotate HOUR(expr) for MySQL, Hive, Spark, DBX *(PR [#6943](https://github.com/tobymao/sqlglot/pull/6943) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`852adec`](https://github.com/tobymao/sqlglot/commit/852adeca09c7776810eb691a04a570e0cf673aa3) - **optimizer**: Move `MD5(expr)` to Base *(PR [#6944](https://github.com/tobymao/sqlglot/pull/6944) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`2326eae`](https://github.com/tobymao/sqlglot/commit/2326eae50e6ecd47d4a8b2c848a93b720538187a) - **optimizer**: Move ASIN, ACOS, ATAN to Base *(PR [#6945](https://github.com/tobymao/sqlglot/pull/6945) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`7989906`](https://github.com/tobymao/sqlglot/commit/79899060ed3331a55ca1c935e00376a1c137840c) - **optimizer**: Move ASINH, ACOSH, ATANH to Base *(PR [#6946](https://github.com/tobymao/sqlglot/pull/6946) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`713d22f`](https://github.com/tobymao/sqlglot/commit/713d22f0d44790f8dc7d80ba12ae920815a28c51) - **optimizer**: Annotate LENGTH, LEVENSHTEIN_DISTANCE for Presto/Trino *(PR [#6947](https://github.com/tobymao/sqlglot/pull/6947) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`0e872dc`](https://github.com/tobymao/sqlglot/commit/0e872dcb5337d13befe981261466ca14a788ef1e) - **optimizer**: Annotate POSITION and STRPOS for Trino/Presto *(PR [#6948](https://github.com/tobymao/sqlglot/pull/6948) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`d01657a`](https://github.com/tobymao/sqlglot/commit/d01657a581a42f1588436882d190b20f4ea004a0) - **optimizer**: Annotate WIDTH_BUCKET(expr) for Presto/Trino *(PR [#6950](https://github.com/tobymao/sqlglot/pull/6950) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`cec0f27`](https://github.com/tobymao/sqlglot/commit/cec0f27f17f01c7b1355f1c1306a0f08af639331) - **optimizer**: Annotate BITWISE OPERATORS for Presto/Trino *(PR [#6951](https://github.com/tobymao/sqlglot/pull/6951) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`2292d0d`](https://github.com/tobymao/sqlglot/commit/2292d0d477ea9aaa7016539deb1435164ee749da) - **optimizer**: Move SINH, COSH, TANH to Base *(PR [#6954](https://github.com/tobymao/sqlglot/pull/6954) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
### :bug: Bug Fixes
- [`12c7cf4`](https://github.com/tobymao/sqlglot/commit/12c7cf46e47d7be0a54881db171fb07e6793507a) - **dremio**: Generate exp.TryCast as CAST *(PR [#6928](https://github.com/tobymao/sqlglot/pull/6928) by [@VaggelisD](https://github.com/VaggelisD))*
- :arrow_lower_right: *fixes issue [#6927](https://github.com/tobymao/sqlglot/issues/6927) opened by [@AyushPatel101](https://github.com/AyushPatel101)*
- [`087f70b`](https://github.com/tobymao/sqlglot/commit/087f70b8f7a0c7a7858580a20b0d7542a0b53c6b) - **tsql**: datepart when part is quoted *(PR [#6934](https://github.com/tobymao/sqlglot/pull/6934) by [@flow3d](https://github.com/flow3d))*
- [`bdce7c7`](https://github.com/tobymao/sqlglot/commit/bdce7c722efa37d44ee1ba85aa4c77f958e0b19f) - **optimizer**: Annotate DAYOFMONTH(expr), DAYOFYEAR(expr) for MySQL *(PR [#6941](https://github.com/tobymao/sqlglot/pull/6941) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`edbbb59`](https://github.com/tobymao/sqlglot/commit/edbbb597998dbdb77fa89e9a98d6ae56f0915b00) - **optimizer**: Annotate WEEK(expr) for MySQL *(PR [#6942](https://github.com/tobymao/sqlglot/pull/6942) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`686ab6a`](https://github.com/tobymao/sqlglot/commit/686ab6ab6da7a1bc7652846989aedd014a9a6d41) - **optimizer**: Use replace instead of set for JSON dot access identifiers *(PR [#6953](https://github.com/tobymao/sqlglot/pull/6953) by [@georgesittas](https://github.com/georgesittas))*
## [v28.9.0] - 2026-02-02
### :boom: BREAKING CHANGES
- due to [`e9ff474`](https://github.com/tobymao/sqlglot/commit/e9ff4743e63c332ae8a4a101f976d4909918992a) - Annotate MINUTE, MONTH for DuckDB *(PR [#6919](https://github.com/tobymao/sqlglot/pull/6919) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate MINUTE, MONTH for DuckDB (#6919)
- due to [`96dc339`](https://github.com/tobymao/sqlglot/commit/96dc339e0811c70dd12f92c297d2ff25456c71b7) - Annotate DAYOFWEEK, DAYOFYEAR for DuckDB *(PR [#6920](https://github.com/tobymao/sqlglot/pull/6920) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate DAYOFWEEK, DAYOFYEAR for DuckDB (#6920)
- due to [`b56f685`](https://github.com/tobymao/sqlglot/commit/b56f685193982590ea03b681cf542c0157e751d4) - Annotate DAY, HOUR, SECOND and DAYOFMONTH *(PR [#6922](https://github.com/tobymao/sqlglot/pull/6922) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate DAY, HOUR, SECOND and DAYOFMONTH (#6922)
- due to [`6e418ec`](https://github.com/tobymao/sqlglot/commit/6e418ecc95085e41a4fe4fed856bc3a08f4c46f8) - Annotate EPOCH(expr) for DuckDB *(PR [#6924](https://github.com/tobymao/sqlglot/pull/6924) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate EPOCH(expr) for DuckDB (#6924)
- due to [`abd8d1b`](https://github.com/tobymao/sqlglot/commit/abd8d1bc5d892299dbe46a8208e23a4b2c1c833b) - Transpilation of SHA1 from Snowflake to DuckDB *(PR [#6888](https://github.com/tobymao/sqlglot/pull/6888) by [@fivetran-kwoodbeck](https://github.com/fivetran-kwoodbeck))*:
Transpilation of SHA1 from Snowflake to DuckDB (#6888)
- due to [`b2f5430`](https://github.com/tobymao/sqlglot/commit/b2f543030789ccf889fc6e065985fbeb821c26b7) - Annotate TO_DAYS(expr) for DuckDB *(PR [#6925](https://github.com/tobymao/sqlglot/pull/6925) by [@AbhishekASLK](https://github.com/AbhishekASLK))*:
Annotate TO_DAYS(expr) for DuckDB (#6925)
### :sparkles: New Features
- [`e9ff474`](https://github.com/tobymao/sqlglot/commit/e9ff4743e63c332ae8a4a101f976d4909918992a) - **optimizer**: Annotate MINUTE, MONTH for DuckDB *(PR [#6919](https://github.com/tobymao/sqlglot/pull/6919) by [@AbhishekASLK](https://github.com/AbhishekASLK))*
- [`96dc339`](https://github.com/tobymao/sqlglot/commit/96dc339e0811c70dd12f92c297d2ff25456c71b7) - **optimize
gitextract_0kn1s5v0/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ ├── scripts/
│ │ ├── get_integration_test_params.py
│ │ └── integration_tests_sync.sh
│ └── workflows/
│ ├── benchmark-sqlglot.yml
│ ├── package-publish.yml
│ ├── package-test.yml
│ └── run-integration-tests.yml
├── .gitignore
├── .gitmodules
├── .gitpod.yml
├── .pre-commit-config.yaml
├── AGENTS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── MANIFEST.in
├── Makefile
├── README.md
├── benchmarks/
│ ├── __init__.py
│ ├── compare.py
│ ├── optimize.py
│ └── parse.py
├── pdoc/
│ ├── cli.py
│ └── templates/
│ └── module.html.jinja2
├── posts/
│ ├── ast_primer.md
│ ├── onboarding.md
│ ├── python_sql_engine.md
│ └── sql_diff.md
├── pyproject.toml
├── setup.cfg
├── setup.py
├── sqlglot/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _typing.py
│ ├── dialects/
│ │ ├── __init__.py
│ │ ├── athena.py
│ │ ├── bigquery.py
│ │ ├── clickhouse.py
│ │ ├── databricks.py
│ │ ├── dialect.py
│ │ ├── doris.py
│ │ ├── dremio.py
│ │ ├── drill.py
│ │ ├── druid.py
│ │ ├── duckdb.py
│ │ ├── dune.py
│ │ ├── exasol.py
│ │ ├── fabric.py
│ │ ├── hive.py
│ │ ├── materialize.py
│ │ ├── mysql.py
│ │ ├── oracle.py
│ │ ├── postgres.py
│ │ ├── presto.py
│ │ ├── prql.py
│ │ ├── redshift.py
│ │ ├── risingwave.py
│ │ ├── singlestore.py
│ │ ├── snowflake.py
│ │ ├── solr.py
│ │ ├── spark.py
│ │ ├── spark2.py
│ │ ├── sqlite.py
│ │ ├── starrocks.py
│ │ ├── tableau.py
│ │ ├── teradata.py
│ │ ├── trino.py
│ │ └── tsql.py
│ ├── diff.py
│ ├── errors.py
│ ├── executor/
│ │ ├── __init__.py
│ │ ├── context.py
│ │ ├── env.py
│ │ ├── python.py
│ │ └── table.py
│ ├── expressions/
│ │ ├── __init__.py
│ │ ├── aggregate.py
│ │ ├── array.py
│ │ ├── builders.py
│ │ ├── constraints.py
│ │ ├── core.py
│ │ ├── datatypes.py
│ │ ├── ddl.py
│ │ ├── dml.py
│ │ ├── functions.py
│ │ ├── json.py
│ │ ├── math.py
│ │ ├── properties.py
│ │ ├── query.py
│ │ ├── string.py
│ │ └── temporal.py
│ ├── generator.py
│ ├── helper.py
│ ├── jsonpath.py
│ ├── lineage.py
│ ├── optimizer/
│ │ ├── __init__.py
│ │ ├── annotate_types.py
│ │ ├── canonicalize.py
│ │ ├── eliminate_ctes.py
│ │ ├── eliminate_joins.py
│ │ ├── eliminate_subqueries.py
│ │ ├── isolate_table_selects.py
│ │ ├── merge_subqueries.py
│ │ ├── normalize.py
│ │ ├── normalize_identifiers.py
│ │ ├── optimize_joins.py
│ │ ├── optimizer.py
│ │ ├── pushdown_predicates.py
│ │ ├── pushdown_projections.py
│ │ ├── qualify.py
│ │ ├── qualify_columns.py
│ │ ├── qualify_tables.py
│ │ ├── resolver.py
│ │ ├── scope.py
│ │ ├── simplify.py
│ │ └── unnest_subqueries.py
│ ├── parser.py
│ ├── parsers/
│ │ ├── __init__.py
│ │ ├── athena.py
│ │ ├── base.py
│ │ ├── bigquery.py
│ │ ├── clickhouse.py
│ │ ├── databricks.py
│ │ ├── doris.py
│ │ ├── dremio.py
│ │ ├── drill.py
│ │ ├── druid.py
│ │ ├── duckdb.py
│ │ ├── dune.py
│ │ ├── exasol.py
│ │ ├── fabric.py
│ │ ├── hive.py
│ │ ├── materialize.py
│ │ ├── mysql.py
│ │ ├── oracle.py
│ │ ├── postgres.py
│ │ ├── presto.py
│ │ ├── prql.py
│ │ ├── redshift.py
│ │ ├── risingwave.py
│ │ ├── singlestore.py
│ │ ├── snowflake.py
│ │ ├── solr.py
│ │ ├── spark.py
│ │ ├── spark2.py
│ │ ├── sqlite.py
│ │ ├── starrocks.py
│ │ ├── tableau.py
│ │ ├── teradata.py
│ │ ├── trino.py
│ │ └── tsql.py
│ ├── planner.py
│ ├── py.typed
│ ├── schema.py
│ ├── serde.py
│ ├── time.py
│ ├── tokenizer_core.py
│ ├── tokens.py
│ ├── transforms.py
│ ├── trie.py
│ └── typing/
│ ├── __init__.py
│ ├── bigquery.py
│ ├── clickhouse.py
│ ├── duckdb.py
│ ├── hive.py
│ ├── mysql.py
│ ├── presto.py
│ ├── redshift.py
│ ├── snowflake.py
│ ├── spark.py
│ ├── spark2.py
│ └── tsql.py
├── sqlglotc/
│ ├── MANIFEST.in
│ ├── pyproject.toml
│ └── setup.py
└── tests/
├── __init__.py
├── dialects/
│ ├── __init__.py
│ ├── test_athena.py
│ ├── test_bigquery.py
│ ├── test_clickhouse.py
│ ├── test_databricks.py
│ ├── test_dialect.py
│ ├── test_doris.py
│ ├── test_dremio.py
│ ├── test_drill.py
│ ├── test_druid.py
│ ├── test_duckdb.py
│ ├── test_dune.py
│ ├── test_exasol.py
│ ├── test_fabric.py
│ ├── test_hive.py
│ ├── test_materialize.py
│ ├── test_mysql.py
│ ├── test_oracle.py
│ ├── test_pipe_syntax.py
│ ├── test_postgres.py
│ ├── test_presto.py
│ ├── test_prql.py
│ ├── test_redshift.py
│ ├── test_risingwave.py
│ ├── test_singlestore.py
│ ├── test_snowflake.py
│ ├── test_solr.py
│ ├── test_spark.py
│ ├── test_sqlite.py
│ ├── test_starrocks.py
│ ├── test_tableau.py
│ ├── test_teradata.py
│ ├── test_trino.py
│ └── test_tsql.py
├── fixtures/
│ ├── identity.sql
│ ├── jsonpath/
│ │ ├── LICENSE
│ │ └── cts.json
│ ├── optimizer/
│ │ ├── annotate_functions.sql
│ │ ├── annotate_types.sql
│ │ ├── canonicalize.sql
│ │ ├── eliminate_ctes.sql
│ │ ├── eliminate_joins.sql
│ │ ├── eliminate_subqueries.sql
│ │ ├── isolate_table_selects.sql
│ │ ├── merge_subqueries.sql
│ │ ├── normalize.sql
│ │ ├── normalize_identifiers.sql
│ │ ├── optimize_joins.sql
│ │ ├── optimizer.sql
│ │ ├── pushdown_cte_alias_columns.sql
│ │ ├── pushdown_predicates.sql
│ │ ├── pushdown_projections.sql
│ │ ├── qualify_columns.sql
│ │ ├── qualify_columns__invalid.sql
│ │ ├── qualify_columns__with_invisible.sql
│ │ ├── qualify_columns_ddl.sql
│ │ ├── qualify_tables.sql
│ │ ├── quote_identifiers.sql
│ │ ├── simplify.sql
│ │ ├── tpc-ds/
│ │ │ └── tpc-ds.sql
│ │ ├── tpc-h/
│ │ │ └── tpc-h.sql
│ │ └── unnest_subqueries.sql
│ ├── partial.sql
│ └── pretty.sql
├── gen_fixtures.py
├── helpers.py
├── test_build.py
├── test_dialect_entry_points.py
├── test_dialect_imports.py
├── test_diff.py
├── test_docs.py
├── test_errors.py
├── test_executor.py
├── test_expressions.py
├── test_generator.py
├── test_helper.py
├── test_integration_loader.py
├── test_jsonpath.py
├── test_lineage.py
├── test_optimizer.py
├── test_parser.py
├── test_schema.py
├── test_serde.py
├── test_time.py
├── test_tokens.py
├── test_transforms.py
└── test_transpile.py
Showing preview only (441K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5289 symbols across 193 files)
FILE: .github/scripts/get_integration_test_params.py
function get_dialects_from_manual_trigger (line 38) | def get_dialects_from_manual_trigger(trigger: str) -> t.Set[str]:
function get_dialects_from_git (line 68) | def get_dialects_from_git(base_ref: str, current_ref: str) -> t.Set[str]:
FILE: benchmarks/compare.py
function _fmt_time (line 8) | def _fmt_time(seconds):
function _indicator (line 16) | def _indicator(ratio):
function _diff_text (line 33) | def _diff_text(ratio):
function compare (line 42) | def compare(main_file, pr_file):
FILE: benchmarks/optimize.py
function gen_condition (line 16) | def gen_condition(n):
function get_tpch_setup (line 21) | def get_tpch_setup():
function get_tpcds_setup (line 28) | def get_tpcds_setup():
function get_condition_10_setup (line 35) | def get_condition_10_setup():
function get_condition_100_setup (line 39) | def get_condition_100_setup():
function get_condition_1000_setup (line 43) | def get_condition_1000_setup():
function optimize_queries (line 48) | def optimize_queries(expressions, schema):
function run_benchmarks (line 53) | def run_benchmarks():
FILE: benchmarks/parse.py
function sqlglot_parse (line 190) | def sqlglot_parse(sql):
function sqltree_parse (line 196) | def sqltree_parse(sql):
function sqlparse_parse (line 202) | def sqlparse_parse(sql):
function moz_sql_parser_parse (line 208) | def moz_sql_parser_parse(sql):
function sqloxide_parse (line 214) | def sqloxide_parse(sql):
function sqlfluff_parse (line 220) | def sqlfluff_parse(sql):
function polyglot_sql_parse (line 226) | def polyglot_sql_parse(sql):
function _check_parser (line 256) | def _check_parser(parse_fn, queries):
function _discover_parsers (line 294) | def _discover_parsers():
function _bench (line 314) | def _bench(name, fn, *args, iterations=5):
function _bench_sqlglot (line 330) | def _bench_sqlglot(results):
function _bench_third_party (line 340) | def _bench_third_party(results):
function _fmt_ratio (line 355) | def _fmt_ratio(ratio):
function _fmt_time (line 359) | def _fmt_time(seconds):
function _print_table (line 367) | def _print_table(base_parser, all_parsers, results):
function _has_so_files (line 412) | def _has_so_files():
function _run_subprocess (line 418) | def _run_subprocess():
function _parse_args (line 431) | def _parse_args():
FILE: pdoc/cli.py
function mocked_import (line 17) | def mocked_import(*args, **kwargs):
FILE: sqlglot/__init__.py
function tokenize (line 90) | def tokenize(sql: str, read: DialectType = None, dialect: DialectType = ...
function parse (line 105) | def parse(
function parse_one (line 124) | def parse_one(sql: str, *, into: t.Type[E], **opts) -> E: ...
function parse_one (line 128) | def parse_one(sql: str, **opts) -> Expr: ...
function parse_one (line 131) | def parse_one(
function transpile (line 165) | def transpile(
FILE: sqlglot/dialects/__init__.py
function __getattr__ (line 119) | def __getattr__(name):
FILE: sqlglot/dialects/athena.py
class Athena (line 11) | class Athena(Dialect):
method __init__ (line 49) | def __init__(self, **kwargs):
method tokenize (line 55) | def tokenize(self, sql: str, **opts) -> t.List[Token]:
method parse (line 60) | def parse(self, sql: str, **opts) -> t.List[t.Optional[exp.Expr]]:
method parse_into (line 65) | def parse_into(
method generate (line 72) | def generate(self, expression: exp.Expr, copy: bool = True, **opts) ->...
class Tokenizer (line 79) | class Tokenizer(tokens.Tokenizer):
method __init__ (line 96) | def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
method tokenize (line 105) | def tokenize(self, sql: str) -> t.List[Token]:
class Generator (line 115) | class Generator(generator.Generator):
method __init__ (line 116) | def __init__(self, *args: t.Any, **kwargs: t.Any) -> None:
method generate (line 125) | def generate(self, expression: exp.Expr, copy: bool = True) -> str:
function _tokenize_as_hive (line 134) | def _tokenize_as_hive(tokens: t.List[Token]) -> bool:
function _generate_as_hive (line 159) | def _generate_as_hive(expression: exp.Expr) -> bool:
function _is_iceberg_table (line 185) | def _is_iceberg_table(properties: exp.Properties) -> bool:
function _location_property_sql (line 193) | def _location_property_sql(self: Athena.Generator, e: exp.LocationProper...
function _partitioned_by_property_sql (line 207) | def _partitioned_by_property_sql(self: Athena.Generator, e: exp.Partitio...
class _HiveGenerator (line 222) | class _HiveGenerator(Hive.Generator):
method alter_sql (line 223) | def alter_sql(self, expression: exp.Alter) -> str:
class _TrinoTokenizer (line 236) | class _TrinoTokenizer(Trino.Tokenizer):
class _TrinoGenerator (line 245) | class _TrinoGenerator(Trino.Generator):
FILE: sqlglot/dialects/bigquery.py
function _derived_table_values_to_unnest (line 52) | def _derived_table_values_to_unnest(self: BigQuery.Generator, expression...
function _returnsproperty_sql (line 77) | def _returnsproperty_sql(self: BigQuery.Generator, expression: exp.Retur...
function _create_sql (line 86) | def _create_sql(self: BigQuery.Generator, expression: exp.Create) -> str:
function _alias_ordered_group (line 104) | def _alias_ordered_group(expression: exp.Expr) -> exp.Expr:
function _pushdown_cte_column_names (line 126) | def _pushdown_cte_column_names(expression: exp.Expr) -> exp.Expr:
function _array_contains_sql (line 153) | def _array_contains_sql(self: BigQuery.Generator, expression: exp.ArrayC...
function _ts_or_ds_add_sql (line 163) | def _ts_or_ds_add_sql(self: BigQuery.Generator, expression: exp.TsOrDsAd...
function _ts_or_ds_diff_sql (line 167) | def _ts_or_ds_diff_sql(self: BigQuery.Generator, expression: exp.TsOrDsD...
function _unix_to_time_sql (line 174) | def _unix_to_time_sql(self: BigQuery.Generator, expression: exp.UnixToTi...
function _str_to_datetime_sql (line 191) | def _str_to_datetime_sql(
function _levenshtein_sql (line 210) | def _levenshtein_sql(self: BigQuery.Generator, expression: exp.Levenshte...
function _json_extract_sql (line 218) | def _json_extract_sql(self: BigQuery.Generator, expression: JSON_EXTRACT...
class BigQuery (line 235) | class BigQuery(Dialect):
method normalize_identifier (line 333) | def normalize_identifier(self, expression: E) -> E:
class JSONPathTokenizer (line 362) | class JSONPathTokenizer(jsonpath.JSONPathTokenizer):
class Tokenizer (line 368) | class Tokenizer(tokens.Tokenizer):
class Generator (line 415) | class Generator(generator.Generator):
method datetrunc_sql (line 746) | def datetrunc_sql(self, expression: exp.DateTrunc) -> str:
method mod_sql (line 751) | def mod_sql(self, expression: exp.Mod) -> str:
method column_parts (line 760) | def column_parts(self, expression: exp.Column) -> str:
method table_parts (line 770) | def table_parts(self, expression: exp.Table) -> str:
method timetostr_sql (line 785) | def timetostr_sql(self, expression: exp.TimeToStr) -> str:
method eq_sql (line 801) | def eq_sql(self, expression: exp.EQ) -> str:
method attimezone_sql (line 809) | def attimezone_sql(self, expression: exp.AtTimeZone) -> str:
method trycast_sql (line 821) | def trycast_sql(self, expression: exp.TryCast) -> str:
method bracket_sql (line 824) | def bracket_sql(self, expression: exp.Bracket) -> str:
method in_unnest_op (line 854) | def in_unnest_op(self, expression: exp.Unnest) -> str:
method version_sql (line 857) | def version_sql(self, expression: exp.Version) -> str:
method contains_sql (line 862) | def contains_sql(self, expression: exp.Contains) -> str:
method cast_sql (line 872) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
FILE: sqlglot/dialects/clickhouse.py
function _unix_to_time_sql (line 36) | def _unix_to_time_sql(self: ClickHouse.Generator, expression: exp.UnixTo...
function _lower_func (line 55) | def _lower_func(sql: str) -> str:
function _quantile_sql (line 60) | def _quantile_sql(self: ClickHouse.Generator, expression: exp.Quantile) ...
function _datetime_delta_sql (line 72) | def _datetime_delta_sql(name: str) -> t.Callable[[Generator, DATETIME_DE...
function _timestrtotime_sql (line 88) | def _timestrtotime_sql(self: ClickHouse.Generator, expression: exp.TimeS...
function _map_sql (line 140) | def _map_sql(self: ClickHouse.Generator, expression: exp.Map | exp.VarMa...
function _json_cast_sql (line 160) | def _json_cast_sql(self: ClickHouse.Generator, expression: exp.JSONCast)...
class ClickHouse (line 171) | class ClickHouse(Dialect):
method generate_values_aliases (line 201) | def generate_values_aliases(self, expression: exp.Values) -> t.List[ex...
class Tokenizer (line 227) | class Tokenizer(tokens.Tokenizer):
class Generator (line 286) | class Generator(generator.Generator):
method offset_sql (line 521) | def offset_sql(self, expression: exp.Offset) -> str:
method strtodate_sql (line 532) | def strtodate_sql(self, expression: exp.StrToDate) -> str:
method cast_sql (line 542) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method trycast_sql (line 550) | def trycast_sql(self, expression: exp.TryCast) -> str:
method _jsonpathsubscript_sql (line 558) | def _jsonpathsubscript_sql(self, expression: exp.JSONPathSubscript) ...
method likeproperty_sql (line 562) | def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
method _any_to_has (line 565) | def _any_to_has(
method eq_sql (line 582) | def eq_sql(self, expression: exp.EQ) -> str:
method neq_sql (line 585) | def neq_sql(self, expression: exp.NEQ) -> str:
method regexpilike_sql (line 588) | def regexpilike_sql(self, expression: exp.RegexpILike) -> str:
method datatype_sql (line 593) | def datatype_sql(self, expression: exp.DataType) -> str:
method cte_sql (line 625) | def cte_sql(self, expression: exp.CTE) -> str:
method after_limit_modifiers (line 633) | def after_limit_modifiers(self, expression: exp.Expr) -> t.List[str]:
method placeholder_sql (line 647) | def placeholder_sql(self, expression: exp.Placeholder) -> str:
method oncluster_sql (line 650) | def oncluster_sql(self, expression: exp.OnCluster) -> str:
method createable_sql (line 653) | def createable_sql(self, expression: exp.Create, locations: t.Defaul...
method create_sql (line 671) | def create_sql(self, expression: exp.Create) -> str:
method prewhere_sql (line 689) | def prewhere_sql(self, expression: exp.PreWhere) -> str:
method indexcolumnconstraint_sql (line 693) | def indexcolumnconstraint_sql(self, expression: exp.IndexColumnConst...
method partition_sql (line 705) | def partition_sql(self, expression: exp.Partition) -> str:
method partitionid_sql (line 708) | def partitionid_sql(self, expression: exp.PartitionId) -> str:
method replacepartition_sql (line 711) | def replacepartition_sql(self, expression: exp.ReplacePartition) -> ...
method projectiondef_sql (line 716) | def projectiondef_sql(self, expression: exp.ProjectionDef) -> str:
method nestedjsonselect_sql (line 719) | def nestedjsonselect_sql(self, expression: exp.NestedJSONSelect) -> ...
method is_sql (line 722) | def is_sql(self, expression: exp.Is) -> str:
method in_sql (line 731) | def in_sql(self, expression: exp.In) -> str:
method not_sql (line 739) | def not_sql(self, expression: exp.Not) -> str:
method values_sql (line 749) | def values_sql(self, expression: exp.Values, values_as_table: bool =...
method timestamptrunc_sql (line 762) | def timestamptrunc_sql(self, expression: exp.TimestampTrunc) -> str:
FILE: sqlglot/dialects/databricks.py
function _jsonextract_sql (line 18) | def _jsonextract_sql(
class Databricks (line 26) | class Databricks(Spark):
class JSONPathTokenizer (line 40) | class JSONPathTokenizer(Spark.JSONPathTokenizer):
class Tokenizer (line 43) | class Tokenizer(Spark.Tokenizer):
class Generator (line 52) | class Generator(Spark.Generator):
method columndef_sql (line 103) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -...
method jsonpath_sql (line 116) | def jsonpath_sql(self, expression: exp.JSONPath) -> str:
method uniform_sql (line 120) | def uniform_sql(self, expression: exp.Uniform) -> str:
FILE: sqlglot/dialects/dialect.py
class Dialects (line 77) | class Dialects(str, Enum):
class NormalizationStrategy (line 115) | class NormalizationStrategy(str, AutoName):
class _Dialect (line 134) | class _Dialect(type):
method __eq__ (line 137) | def __eq__(cls, other: t.Any) -> bool:
method __hash__ (line 147) | def __hash__(cls) -> int:
method classes (line 151) | def classes(cls):
method _try_load (line 159) | def _try_load(cls, key: str | Dialects) -> None:
method __getitem__ (line 213) | def __getitem__(cls, key: str) -> t.Type[Dialect]:
method get (line 220) | def get(
method __new__ (line 228) | def __new__(cls, clsname, bases, attrs):
class Dialect (line 333) | class Dialect(metaclass=_Dialect):
method get_or_raise (line 899) | def get_or_raise(cls, dialect: DialectType) -> Dialect:
method format_time (line 958) | def format_time(cls, expression: t.Optional[str | exp.Expr]) -> t.Opti...
method __init__ (line 971) | def __init__(self, **kwargs) -> None:
method __eq__ (line 987) | def __eq__(self, other: t.Any) -> bool:
method __hash__ (line 991) | def __hash__(self) -> int:
method normalize_identifier (line 995) | def normalize_identifier(self, expression: E) -> E:
method case_sensitive (line 1039) | def case_sensitive(self, text: str) -> bool:
method can_quote (line 1051) | def can_quote(self, identifier: exp.Identifier, identify: str | bool =...
method quote_identifier (line 1084) | def quote_identifier(self, expression: E, identify: bool = True) -> E:
method to_json_path (line 1097) | def to_json_path(self, path: t.Optional[exp.Expr]) -> t.Optional[exp.E...
method parse (line 1112) | def parse(self, sql: str, **opts) -> t.List[t.Optional[exp.Expr]]:
method parse_into (line 1115) | def parse_into(
method generate (line 1120) | def generate(self, expression: exp.Expr, copy: bool = True, **opts) ->...
method transpile (line 1123) | def transpile(self, sql: str, **opts) -> t.List[str]:
method tokenize (line 1129) | def tokenize(self, sql: str, **opts) -> t.List[Token]:
method tokenizer (line 1132) | def tokenizer(self, **opts) -> Tokenizer:
method jsonpath_tokenizer (line 1135) | def jsonpath_tokenizer(self, **opts) -> JSONPathTokenizer:
method parser (line 1138) | def parser(self, **opts) -> Parser:
method generator (line 1141) | def generator(self, **opts) -> Generator:
method generate_values_aliases (line 1144) | def generate_values_aliases(self, expression: exp.Values) -> t.List[ex...
function rename_func (line 1154) | def rename_func(name: str) -> t.Callable[[Generator, exp.Expr], str]:
function bracket_to_element_at_sql (line 1158) | def bracket_to_element_at_sql(self: Generator, expression: exp.Bracket) ...
function approx_count_distinct_sql (line 1172) | def approx_count_distinct_sql(self: Generator, expression: exp.ApproxDis...
function if_sql (line 1176) | def if_sql(
function arrow_json_extract_sql (line 1190) | def arrow_json_extract_sql(self: Generator, expression: JSON_EXTRACT_TYP...
function inline_array_sql (line 1198) | def inline_array_sql(self: Generator, expression: exp.Expr) -> str:
function inline_array_unless_query (line 1202) | def inline_array_unless_query(self: Generator, expression: exp.Expr) -> ...
function no_ilike_sql (line 1209) | def no_ilike_sql(self: Generator, expression: exp.ILike) -> str:
function no_paren_current_date_sql (line 1217) | def no_paren_current_date_sql(self: Generator, expression: exp.CurrentDa...
function no_recursive_cte_sql (line 1222) | def no_recursive_cte_sql(self: Generator, expression: exp.With) -> str:
function no_tablesample_sql (line 1229) | def no_tablesample_sql(self: Generator, expression: exp.TableSample) -> ...
function no_pivot_sql (line 1234) | def no_pivot_sql(self: Generator, expression: exp.Pivot) -> str:
function no_trycast_sql (line 1239) | def no_trycast_sql(self: Generator, expression: exp.TryCast) -> str:
function no_comment_column_constraint_sql (line 1243) | def no_comment_column_constraint_sql(
function no_map_from_entries_sql (line 1250) | def no_map_from_entries_sql(self: Generator, expression: exp.MapFromEntr...
function property_sql (line 1255) | def property_sql(self: Generator, expression: exp.Property) -> str:
function strposition_sql (line 1259) | def strposition_sql(
function struct_extract_sql (line 1302) | def struct_extract_sql(self: Generator, expression: exp.StructExtract) -...
function array_append_sql (line 1308) | def array_append_sql(
function generate_series_sql (line 1358) | def generate_series_sql(
function array_concat_sql (line 1377) | def array_concat_sql(
function var_map_sql (line 1459) | def var_map_sql(
function months_between_sql (line 1477) | def months_between_sql(self: Generator, expression: exp.MonthsBetween) -...
function build_formatted_time (line 1530) | def build_formatted_time(
function time_format (line 1556) | def time_format(
function build_date_delta (line 1570) | def build_date_delta(
function build_date_delta_with_interval (line 1592) | def build_date_delta_with_interval(
function date_trunc_to_time (line 1609) | def date_trunc_to_time(args: t.List) -> exp.DateTrunc | exp.TimestampTrunc:
function date_add_interval_sql (line 1618) | def date_add_interval_sql(data_type: str, kind: str) -> t.Callable[[Gene...
function timestamptrunc_sql (line 1627) | def timestamptrunc_sql(
function no_timestamp_sql (line 1639) | def no_timestamp_sql(self: Generator, expression: exp.Timestamp) -> str:
function no_time_sql (line 1656) | def no_time_sql(self: Generator, expression: exp.Time) -> str:
function no_datetime_sql (line 1663) | def no_datetime_sql(self: Generator, expression: exp.Datetime) -> str:
function left_to_substring_sql (line 1679) | def left_to_substring_sql(self: Generator, expression: exp.Left) -> str:
function right_to_substring_sql (line 1687) | def right_to_substring_sql(self: Generator, expression: exp.Left) -> str:
function timestrtotime_sql (line 1696) | def timestrtotime_sql(
function datestrtodate_sql (line 1715) | def datestrtodate_sql(self: Generator, expression: exp.DateStrToDate) ->...
function encode_decode_sql (line 1720) | def encode_decode_sql(
function min_or_least (line 1730) | def min_or_least(self: Generator, expression: exp.Min) -> str:
function max_or_greatest (line 1735) | def max_or_greatest(self: Generator, expression: exp.Max) -> str:
function count_if_to_sum (line 1740) | def count_if_to_sum(self: Generator, expression: exp.CountIf) -> str:
function trim_sql (line 1750) | def trim_sql(self: Generator, expression: exp.Trim, default_trim_type: s...
function str_to_time_sql (line 1767) | def str_to_time_sql(self: Generator, expression: exp.Expr) -> str:
function concat_to_dpipe_sql (line 1771) | def concat_to_dpipe_sql(self: Generator, expression: exp.Concat) -> str:
function concat_ws_to_dpipe_sql (line 1775) | def concat_ws_to_dpipe_sql(self: Generator, expression: exp.ConcatWs) ->...
function regexp_extract_sql (line 1786) | def regexp_extract_sql(
function regexp_replace_sql (line 1799) | def regexp_replace_sql(self: Generator, expression: exp.RegexpReplace) -...
function pivot_column_names (line 1805) | def pivot_column_names(aggregations: t.List[exp.Expr], dialect: DialectT...
function binary_from_function (line 1829) | def binary_from_function(expr_type: t.Type[B]) -> t.Callable[[t.List], B]:
function build_timestamp_trunc (line 1834) | def build_timestamp_trunc(args: t.List) -> exp.TimestampTrunc:
function build_trunc (line 1838) | def build_trunc(
function any_value_to_max_sql (line 1878) | def any_value_to_max_sql(self: Generator, expression: exp.AnyValue) -> str:
function bool_xor_sql (line 1882) | def bool_xor_sql(self: Generator, expression: exp.Xor) -> str:
function is_parse_json (line 1888) | def is_parse_json(expression: exp.Expr) -> bool:
function isnull_to_is_null (line 1894) | def isnull_to_is_null(args: t.List) -> exp.Expr:
function generatedasidentitycolumnconstraint_sql (line 1898) | def generatedasidentitycolumnconstraint_sql(
function arg_max_or_min_no_count (line 1906) | def arg_max_or_min_no_count(name: str) -> t.Callable[[Generator, exp.Arg...
function ts_or_ds_add_cast (line 1914) | def ts_or_ds_add_cast(expression: exp.TsOrDsAdd) -> exp.TsOrDsAdd:
function date_delta_sql (line 1927) | def date_delta_sql(name: str, cast: bool = False) -> t.Callable[[Generat...
function date_delta_to_binary_interval_op (line 1942) | def date_delta_to_binary_interval_op(
function unit_to_str (line 1972) | def unit_to_str(expression: exp.Expr, default: str = "DAY") -> t.Optiona...
function unit_to_var (line 1983) | def unit_to_var(expression: exp.Expr, default: str = "DAY") -> t.Optiona...
function map_date_part (line 1994) | def map_date_part(part: exp.Expr, dialect: DialectType = Dialect) -> exp...
function map_date_part (line 1999) | def map_date_part(
function map_date_part (line 2005) | def map_date_part(part, dialect: DialectType = Dialect):
function no_last_day_sql (line 2017) | def no_last_day_sql(self: Generator, expression: exp.LastDay) -> str:
function merge_without_target_sql (line 2025) | def merge_without_target_sql(self: Generator, expression: exp.Merge) -> ...
function build_json_extract_path (line 2061) | def build_json_extract_path(
function json_extract_segments (line 2102) | def json_extract_segments(
function json_path_key_only_name (line 2133) | def json_path_key_only_name(self: Generator, expression: exp.JSONPathKey...
function filter_array_using_unnest (line 2140) | def filter_array_using_unnest(
function array_compact_sql (line 2161) | def array_compact_sql(self: Generator, expression: exp.ArrayCompact) -> ...
function remove_from_array_using_filter (line 2172) | def remove_from_array_using_filter(self: Generator, expression: exp.Arra...
function to_number_with_nls_param (line 2210) | def to_number_with_nls_param(self: Generator, expression: exp.ToNumber) ...
function build_default_decimal_type (line 2219) | def build_default_decimal_type(
function build_timestamp_from_parts (line 2232) | def build_timestamp_from_parts(args: t.List) -> exp.Func:
function sha256_sql (line 2241) | def sha256_sql(self: Generator, expression: exp.SHA2) -> str:
function sha2_digest_sql (line 2245) | def sha2_digest_sql(self: Generator, expression: exp.SHA2Digest) -> str:
function sequence_sql (line 2249) | def sequence_sql(self: Generator, expression: exp.GenerateSeries | exp.G...
function build_like (line 2297) | def build_like(expr_type: t.Type[E], not_like: bool = False) -> t.Callab...
function build_regexp_extract (line 2312) | def build_regexp_extract(expr_type: t.Type[E]) -> t.Callable[[t.List, Di...
function explode_to_unnest_sql (line 2334) | def explode_to_unnest_sql(self: Generator, expression: exp.Lateral) -> str:
function timestampdiff_sql (line 2372) | def timestampdiff_sql(self: Generator, expression: exp.DatetimeDiff | ex...
function no_make_interval_sql (line 2376) | def no_make_interval_sql(self: Generator, expression: exp.MakeInterval, ...
function length_or_char_length_sql (line 2387) | def length_or_char_length_sql(self: Generator, expression: exp.Length) -...
function groupconcat_sql (line 2392) | def groupconcat_sql(
function build_timetostr_or_tochar (line 2439) | def build_timetostr_or_tochar(args: t.List, dialect: DialectType) -> exp...
function build_replace_with_optional_replacement (line 2454) | def build_replace_with_optional_replacement(args: t.List) -> exp.Replace:
function regexp_replace_global_modifier (line 2462) | def regexp_replace_global_modifier(expression: exp.RegexpReplace) -> exp...
function getbit_sql (line 2478) | def getbit_sql(self: Generator, expression: exp.Getbit) -> str:
function jarowinkler_similarity (line 2499) | def jarowinkler_similarity(func: str) -> t.Callable[[Generator, exp.Jaro...
FILE: sqlglot/dialects/doris.py
function _lag_lead_sql (line 15) | def _lag_lead_sql(self, expression: exp.Lag | exp.Lead) -> str:
class Doris (line 24) | class Doris(MySQL):
class Generator (line 31) | class Generator(MySQL.Generator):
method uniquekeyproperty_sql (line 567) | def uniquekeyproperty_sql(
method partitionrange_sql (line 576) | def partitionrange_sql(self, expression: exp.PartitionRange) -> str:
method partitionbyrangepropertydynamic_sql (line 593) | def partitionbyrangepropertydynamic_sql(
method partitionedbyproperty_sql (line 609) | def partitionedbyproperty_sql(self, expression: exp.PartitionedByPro...
method table_sql (line 615) | def table_sql(self, expression: exp.Table, sep: str = " AS ") -> str:
FILE: sqlglot/dialects/dremio.py
function _date_delta_sql (line 16) | def _date_delta_sql(name: str) -> t.Callable[[Dremio.Generator, DATE_DEL...
class Dremio (line 33) | class Dremio(Dialect):
class Tokenizer (line 90) | class Tokenizer(tokens.Tokenizer):
class Generator (line 95) | class Generator(generator.Generator):
method datatype_sql (line 131) | def datatype_sql(self, expression: exp.DataType) -> str:
method cast_sql (line 143) | def cast_sql(self, expression: exp.Cast, safe_prefix: str | None = N...
FILE: sqlglot/dialects/drill.py
function _str_to_date (line 19) | def _str_to_date(self: Drill.Generator, expression: exp.StrToDate) -> str:
class Drill (line 27) | class Drill(Dialect):
class Tokenizer (line 70) | class Tokenizer(tokens.Tokenizer):
class Generator (line 79) | class Generator(generator.Generator):
FILE: sqlglot/dialects/druid.py
class Druid (line 6) | class Druid(Dialect):
class Generator (line 9) | class Generator(generator.Generator):
FILE: sqlglot/dialects/duckdb.py
function _apply_base64_alphabet_replacements (line 97) | def _apply_base64_alphabet_replacements(
function _base64_decode_sql (line 126) | def _base64_decode_sql(self: DuckDB.Generator, expression: exp.Expr, to_...
function _last_day_sql (line 148) | def _last_day_sql(self: DuckDB.Generator, expression: exp.LastDay) -> str:
function _is_nanosecond_unit (line 201) | def _is_nanosecond_unit(unit: t.Optional[exp.Expr]) -> bool:
function _handle_nanosecond_diff (line 205) | def _handle_nanosecond_diff(
function _to_boolean_sql (line 220) | def _to_boolean_sql(self: DuckDB.Generator, expression: exp.ToBoolean) -...
function _date_sql (line 274) | def _date_sql(self: DuckDB.Generator, expression: exp.Date) -> str:
function _timediff_sql (line 292) | def _timediff_sql(self: DuckDB.Generator, expression: exp.TimeDiff) -> str:
function _date_delta_to_binary_interval_op (line 306) | def _date_delta_to_binary_interval_op(
function _array_insert_sql (line 346) | def _array_insert_sql(self: DuckDB.Generator, expression: exp.ArrayInser...
function _array_remove_at_sql (line 440) | def _array_remove_at_sql(self: DuckDB.Generator, expression: exp.ArrayRe...
function _array_sort_sql (line 531) | def _array_sort_sql(self: DuckDB.Generator, expression: exp.ArraySort) -...
function _array_contains_sql (line 535) | def _array_contains_sql(self: DuckDB.Generator, expression: exp.ArrayCon...
function _array_overlaps_sql (line 551) | def _array_overlaps_sql(self: DuckDB.Generator, expression: exp.ArrayOve...
function _struct_sql (line 593) | def _struct_sql(self: DuckDB.Generator, expression: exp.Struct) -> str:
function _datatype_sql (line 640) | def _datatype_sql(self: DuckDB.Generator, expression: exp.DataType) -> str:
function _json_format_sql (line 651) | def _json_format_sql(self: DuckDB.Generator, expression: exp.JSONFormat)...
function _build_seq_expression (line 656) | def _build_seq_expression(base: exp.Expr, byte_width: int, signed: bool)...
function _seq_to_range_in_generator (line 671) | def _seq_to_range_in_generator(expression: exp.Expr) -> exp.Expr:
function _seq_sql (line 699) | def _seq_sql(self: DuckDB.Generator, expression: exp.Func, byte_width: i...
function _unix_to_time_sql (line 720) | def _unix_to_time_sql(self: DuckDB.Generator, expression: exp.UnixToTime...
function _arrow_json_extract_sql (line 753) | def _arrow_json_extract_sql(self: DuckDB.Generator, expression: JSON_EXT...
function _implicit_datetime_cast (line 762) | def _implicit_datetime_cast(
function _week_unit_to_dow (line 775) | def _week_unit_to_dow(unit: t.Optional[exp.Expr]) -> t.Optional[int]:
function _build_week_trunc_expression (line 802) | def _build_week_trunc_expression(
function _date_diff_sql (line 841) | def _date_diff_sql(self: DuckDB.Generator, expression: exp.DateDiff) -> ...
function _generate_datetime_array_sql (line 869) | def _generate_datetime_array_sql(
function _json_extract_value_array_sql (line 891) | def _json_extract_value_array_sql(
function _cast_to_varchar (line 899) | def _cast_to_varchar(arg: t.Optional[exp.Expr]) -> t.Optional[exp.Expr]:
function _cast_to_boolean (line 905) | def _cast_to_boolean(arg: t.Optional[exp.Expr]) -> t.Optional[exp.Expr]:
function _is_binary (line 911) | def _is_binary(arg: exp.Expr) -> bool:
function _gen_with_cast_to_blob (line 919) | def _gen_with_cast_to_blob(self: DuckDB.Generator, expression: exp.Expr,...
function _cast_to_bit (line 926) | def _cast_to_bit(arg: exp.Expr) -> exp.Expr:
function _prepare_binary_bitwise_args (line 936) | def _prepare_binary_bitwise_args(expression: exp.Binary) -> None:
function _day_navigation_sql (line 943) | def _day_navigation_sql(
function _anyvalue_sql (line 1013) | def _anyvalue_sql(self: DuckDB.Generator, expression: exp.AnyValue) -> str:
function _bitwise_agg_sql (line 1022) | def _bitwise_agg_sql(
function _literal_sql_with_ws_chr (line 1055) | def _literal_sql_with_ws_chr(self: DuckDB.Generator, literal: str) -> str:
function _escape_regex_metachars (line 1073) | def _escape_regex_metachars(
function _build_capitalization_sql (line 1101) | def _build_capitalization_sql(
function _initcap_sql (line 1138) | def _initcap_sql(self: DuckDB.Generator, expression: exp.Initcap) -> str:
function _boolxor_agg_sql (line 1151) | def _boolxor_agg_sql(self: DuckDB.Generator, expression: exp.BoolxorAgg)...
function _bitshift_sql (line 1166) | def _bitshift_sql(
function _scale_rounding_sql (line 1202) | def _scale_rounding_sql(
function _ceil_floor (line 1243) | def _ceil_floor(self: DuckDB.Generator, expression: exp.Floor | exp.Ceil...
function _regr_val_sql (line 1250) | def _regr_val_sql(
function _maybe_corr_null_to_false (line 1304) | def _maybe_corr_null_to_false(
function _date_from_parts_sql (line 1318) | def _date_from_parts_sql(self, expression: exp.DateFromParts) -> str:
function _round_arg (line 1349) | def _round_arg(arg: exp.Expr, round_input: t.Optional[bool] = None) -> e...
function _boolnot_sql (line 1355) | def _boolnot_sql(self: DuckDB.Generator, expression: exp.Boolnot) -> str:
function _booland_sql (line 1360) | def _booland_sql(self: DuckDB.Generator, expression: exp.Booland) -> str:
function _boolor_sql (line 1367) | def _boolor_sql(self: DuckDB.Generator, expression: exp.Boolor) -> str:
function _xor_sql (line 1374) | def _xor_sql(self: DuckDB.Generator, expression: exp.Xor) -> str:
function _explode_to_unnest_sql (line 1387) | def _explode_to_unnest_sql(self: DuckDB.Generator, expression: exp.Later...
function _sha_sql (line 1416) | def _sha_sql(
class DuckDB (line 1443) | class DuckDB(Dialect):
method to_json_path (line 1481) | def to_json_path(self, path: t.Optional[exp.Expr]) -> t.Optional[exp.E...
class Tokenizer (line 1493) | class Tokenizer(tokens.Tokenizer):
class Generator (line 1550) | class Generator(generator.Generator):
method _array_bag_sql (line 2257) | def _array_bag_sql(self, condition: exp.Expr, arr1: exp.Expr, arr2: ...
method timeslice_sql (line 2263) | def timeslice_sql(self: DuckDB.Generator, expression: exp.TimeSlice)...
method bitmapbucketnumber_sql (line 2299) | def bitmapbucketnumber_sql(
method bitmapbitposition_sql (line 2326) | def bitmapbitposition_sql(self: DuckDB.Generator, expression: exp.Bi...
method bitmapconstructagg_sql (line 2349) | def bitmapconstructagg_sql(
method nthvalue_sql (line 2363) | def nthvalue_sql(self: DuckDB.Generator, expression: exp.NthValue) -...
method randstr_sql (line 2370) | def randstr_sql(self: DuckDB.Generator, expression: exp.Randstr) -> ...
method zipf_sql (line 2397) | def zipf_sql(self: DuckDB.Generator, expression: exp.Zipf) -> str:
method tobinary_sql (line 2424) | def tobinary_sql(self: DuckDB.Generator, expression: exp.ToBinary) -...
method _greatest_least_sql (line 2461) | def _greatest_least_sql(
method generator_sql (line 2487) | def generator_sql(self, expression: exp.Generator) -> str:
method greatest_sql (line 2501) | def greatest_sql(self: DuckDB.Generator, expression: exp.Greatest) -...
method least_sql (line 2504) | def least_sql(self: DuckDB.Generator, expression: exp.Least) -> str:
method lambda_sql (line 2507) | def lambda_sql(
method show_sql (line 2520) | def show_sql(self, expression: exp.Show) -> str:
method sortarray_sql (line 2523) | def sortarray_sql(self, expression: exp.SortArray) -> str:
method install_sql (line 2550) | def install_sql(self, expression: exp.Install) -> str:
method approxtopk_sql (line 2557) | def approxtopk_sql(self, expression: exp.ApproxTopK) -> str:
method fromiso8601timestamp_sql (line 2563) | def fromiso8601timestamp_sql(self, expression: exp.FromISO8601Timest...
method strposition_sql (line 2566) | def strposition_sql(self, expression: exp.StrPosition) -> str:
method strtotime_sql (line 2581) | def strtotime_sql(self, expression: exp.StrToTime) -> str:
method strtodate_sql (line 2606) | def strtodate_sql(self, expression: exp.StrToDate) -> str:
method tsordstotime_sql (line 2616) | def tsordstotime_sql(self, expression: exp.TsOrDsToTime) -> str:
method currentdate_sql (line 2633) | def currentdate_sql(self, expression: exp.CurrentDate) -> str:
method parsejson_sql (line 2643) | def parsejson_sql(self, expression: exp.ParseJSON) -> str:
method trunc_sql (line 2650) | def trunc_sql(self, expression: exp.Trunc) -> str:
method normal_sql (line 2653) | def normal_sql(self, expression: exp.Normal) -> str:
method uniform_sql (line 2679) | def uniform_sql(self, expression: exp.Uniform) -> str:
method timefromparts_sql (line 2728) | def timefromparts_sql(self, expression: exp.TimeFromParts) -> str:
method extract_sql (line 2774) | def extract_sql(self, expression: exp.Extract) -> str:
method timestampfromparts_sql (line 2843) | def timestampfromparts_sql(self, expression: exp.TimestampFromParts)...
method timestampltzfromparts_sql (line 2872) | def timestampltzfromparts_sql(self, expression: exp.TimestampLtzFrom...
method timestamptzfromparts_sql (line 2881) | def timestamptzfromparts_sql(self, expression: exp.TimestampTzFromPa...
method tablesample_sql (line 2899) | def tablesample_sql(
method columndef_sql (line 2919) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -...
method join_sql (line 2924) | def join_sql(self, expression: exp.Join) -> str:
method countif_sql (line 2941) | def countif_sql(self, expression: exp.CountIf) -> str:
method bracket_sql (line 2948) | def bracket_sql(self, expression: exp.Bracket) -> str:
method withingroup_sql (line 2970) | def withingroup_sql(self, expression: exp.WithinGroup) -> str:
method length_sql (line 3012) | def length_sql(self, expression: exp.Length) -> str:
method _validate_regexp_flags (line 3039) | def _validate_regexp_flags(
method regexpcount_sql (line 3071) | def regexpcount_sql(self, expression: exp.RegexpCount) -> str:
method regexpreplace_sql (line 3105) | def regexpreplace_sql(self, expression: exp.RegexpReplace) -> str:
method regexplike_sql (line 3156) | def regexplike_sql(self, expression: exp.RegexpLike) -> str:
method levenshtein_sql (line 3181) | def levenshtein_sql(self, expression: exp.Levenshtein) -> str:
method pad_sql (line 3193) | def pad_sql(self, expression: exp.Pad) -> str:
method minhash_sql (line 3224) | def minhash_sql(self, expression: exp.Minhash) -> str:
method minhashcombine_sql (line 3238) | def minhashcombine_sql(self, expression: exp.MinhashCombine) -> str:
method approximatesimilarity_sql (line 3243) | def approximatesimilarity_sql(self, expression: exp.ApproximateSimil...
method arraydistinct_sql (line 3250) | def arraydistinct_sql(self, expression: exp.ArrayDistinct) -> str:
method arrayintersect_sql (line 3270) | def arrayintersect_sql(self, expression: exp.ArrayIntersect) -> str:
method arrayexcept_sql (line 3279) | def arrayexcept_sql(self, expression: exp.ArrayExcept) -> str:
method arrayslice_sql (line 3287) | def arrayslice_sql(self, expression: exp.ArraySlice) -> str:
method arrayszip_sql (line 3321) | def arrayszip_sql(self, expression: exp.ArraysZip) -> str:
method lower_sql (line 3374) | def lower_sql(self, expression: exp.Lower) -> str:
method upper_sql (line 3378) | def upper_sql(self, expression: exp.Upper) -> str:
method reverse_sql (line 3382) | def reverse_sql(self, expression: exp.Reverse) -> str:
method right_sql (line 3386) | def right_sql(self, expression: exp.Right) -> str:
method rand_sql (line 3405) | def rand_sql(self, expression: exp.Rand) -> str:
method base64encode_sql (line 3425) | def base64encode_sql(self, expression: exp.Base64Encode) -> str:
method replace_sql (line 3465) | def replace_sql(self, expression: exp.Replace) -> str:
method _bitwise_op (line 3474) | def _bitwise_op(self, expression: exp.Binary, op: str) -> str:
method bitwisexor_sql (line 3479) | def bitwisexor_sql(self, expression: exp.BitwiseXor) -> str:
method objectinsert_sql (line 3484) | def objectinsert_sql(self, expression: exp.ObjectInsert) -> str:
method mapcat_sql (line 3499) | def mapcat_sql(self, expression: exp.MapCat) -> str:
method mapcontainskey_sql (line 3507) | def mapcontainskey_sql(self, expression: exp.MapContainsKey) -> str:
method mapdelete_sql (line 3512) | def mapdelete_sql(self, expression: exp.MapDelete) -> str:
method mappick_sql (line 3528) | def mappick_sql(self, expression: exp.MapPick) -> str:
method mapsize_sql (line 3551) | def mapsize_sql(self, expression: exp.MapSize) -> str:
method mapinsert_sql (line 3555) | def mapinsert_sql(self, expression: exp.MapInsert) -> str:
method startswith_sql (line 3580) | def startswith_sql(self, expression: exp.StartsWith) -> str:
method space_sql (line 3587) | def space_sql(self, expression: exp.Space) -> str:
method tablefromrows_sql (line 3596) | def tablefromrows_sql(self, expression: exp.TableFromRows) -> str:
method unnest_sql (line 3609) | def unnest_sql(self, expression: exp.Unnest) -> str:
method ignorenulls_sql (line 3631) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method split_sql (line 3647) | def split_sql(self, expression: exp.Split) -> str:
method splitpart_sql (line 3667) | def splitpart_sql(self, expression: exp.SplitPart) -> str:
method respectnulls_sql (line 3727) | def respectnulls_sql(self, expression: exp.RespectNulls) -> str:
method arraytostring_sql (line 3736) | def arraytostring_sql(self, expression: exp.ArrayToString) -> str:
method _regexp_extract_sql (line 3778) | def _regexp_extract_sql(self, expression: exp.RegexpExtract | exp.Re...
method regexpextract_sql (line 3830) | def regexpextract_sql(self, expression: exp.RegexpExtract) -> str:
method regexpextractall_sql (line 3833) | def regexpextractall_sql(self, expression: exp.RegexpExtractAll) -> ...
method regexpinstr_sql (line 3836) | def regexpinstr_sql(self, expression: exp.RegexpInstr) -> str:
method numbertostr_sql (line 3921) | def numbertostr_sql(self, expression: exp.NumberToStr) -> str:
method autoincrementcolumnconstraint_sql (line 3929) | def autoincrementcolumnconstraint_sql(self, _) -> str:
method aliases_sql (line 3933) | def aliases_sql(self, expression: exp.Aliases) -> str:
method posexplode_sql (line 3940) | def posexplode_sql(self, expression: exp.Posexplode) -> str:
method addmonths_sql (line 3978) | def addmonths_sql(self, expression: exp.AddMonths) -> str:
method format_sql (line 4037) | def format_sql(self, expression: exp.Format) -> str:
method hexstring_sql (line 4043) | def hexstring_sql(
method datetrunc_sql (line 4049) | def datetrunc_sql(self, expression: exp.DateTrunc) -> str:
method timestamptrunc_sql (line 4072) | def timestamptrunc_sql(self, expression: exp.TimestampTrunc) -> str:
method trim_sql (line 4105) | def trim_sql(self, expression: exp.Trim) -> str:
method round_sql (line 4113) | def round_sql(self, expression: exp.Round) -> str:
method strtok_sql (line 4136) | def strtok_sql(self, expression: exp.Strtok) -> str:
method approxquantile_sql (line 4199) | def approxquantile_sql(self, expression: exp.ApproxQuantile) -> str:
method approxquantiles_sql (line 4208) | def approxquantiles_sql(self, expression: exp.ApproxQuantiles) -> str:
method jsonextractscalar_sql (line 4245) | def jsonextractscalar_sql(self, expression: exp.JSONExtractScalar) -...
method bitwisenot_sql (line 4252) | def bitwisenot_sql(self, expression: exp.BitwiseNot) -> str:
method window_sql (line 4269) | def window_sql(self, expression: exp.Window) -> str:
method filter_sql (line 4278) | def filter_sql(self, expression: exp.Filter) -> str:
method _corr_sql (line 4284) | def _corr_sql(
FILE: sqlglot/dialects/dune.py
class Dune (line 9) | class Dune(Trino):
class Tokenizer (line 12) | class Tokenizer(Trino.Tokenizer):
class Generator (line 15) | class Generator(Trino.Generator):
FILE: sqlglot/dialects/exasol.py
function _sha2_sql (line 23) | def _sha2_sql(self: Exasol.Generator, expression: exp.SHA2) -> str:
function _date_diff_sql (line 29) | def _date_diff_sql(self: Exasol.Generator, expression: exp.DateDiff | ex...
function _add_local_prefix_for_aliases (line 40) | def _add_local_prefix_for_aliases(expression: exp.Expr) -> exp.Expr:
function _trunc_sql (line 89) | def _trunc_sql(self: Exasol.Generator, kind: str, expression: exp.DateTr...
function _date_trunc_sql (line 102) | def _date_trunc_sql(self: Exasol.Generator, expression: exp.DateTrunc) -...
function _timestamp_trunc_sql (line 106) | def _timestamp_trunc_sql(self: Exasol.Generator, expression: exp.DateTru...
function is_case_insensitive (line 110) | def is_case_insensitive(node: exp.Expr) -> bool:
function _substring_index_sql (line 114) | def _substring_index_sql(self: Exasol.Generator, expression: exp.Substri...
function _qualify_unscoped_star (line 151) | def _qualify_unscoped_star(expression: exp.Expr) -> exp.Expr:
function _add_date_sql (line 210) | def _add_date_sql(self: Exasol.Generator, expression: DATE_ADD_OR_SUB) -...
function _group_by_all (line 233) | def _group_by_all(expression: exp.Expr) -> exp.Expr:
class Exasol (line 266) | class Exasol(Dialect):
class Tokenizer (line 305) | class Tokenizer(tokens.Tokenizer):
class Generator (line 321) | class Generator(generator.Generator):
method datatype_sql (line 352) | def datatype_sql(self, expression: exp.DataType) -> str:
method converttimezone_sql (line 929) | def converttimezone_sql(self, expression: exp.ConvertTimezone) -> str:
method if_sql (line 937) | def if_sql(self, expression: exp.If) -> str:
method collate_sql (line 943) | def collate_sql(self, expression: exp.Collate) -> str:
method jsonextract_sql (line 946) | def jsonextract_sql(self, expression: exp.JSONExtract) -> str:
method regexplike_sql (line 958) | def regexplike_sql(self, expression: exp.RegexpLike) -> str:
FILE: sqlglot/dialects/fabric.py
function _cap_data_type_precision (line 11) | def _cap_data_type_precision(expression: exp.DataType, max_precision: in...
function _add_default_precision_to_varchar (line 31) | def _add_default_precision_to_varchar(expression: exp.Expr) -> exp.Expr:
class Fabric (line 52) | class Fabric(TSQL):
class Tokenizer (line 75) | class Tokenizer(TSQL.Tokenizer):
class Generator (line 87) | class Generator(TSQL.Generator):
method datatype_sql (line 117) | def datatype_sql(self, expression: exp.DataType) -> str:
method cast_sql (line 129) | def cast_sql(self, expression: exp.Cast, safe_prefix: str | None = N...
method attimezone_sql (line 153) | def attimezone_sql(self, expression: exp.AtTimeZone) -> str:
method unixtotime_sql (line 172) | def unixtotime_sql(self, expression: exp.UnixToTime) -> str:
FILE: sqlglot/dialects/hive.py
function _add_date_sql (line 70) | def _add_date_sql(self: Hive.Generator, expression: DATE_ADD_OR_SUB) -> ...
function _date_diff_sql (line 90) | def _date_diff_sql(self: Hive.Generator, expression: exp.DateDiff | exp....
function _json_format_sql (line 114) | def _json_format_sql(self: Hive.Generator, expression: exp.JSONFormat) -...
function _array_sort_sql (line 136) | def _array_sort_sql(self: Hive.Generator, expression: exp.ArraySort) -> ...
function _str_to_unix_sql (line 140) | def _str_to_unix_sql(self: Hive.Generator, expression: exp.StrToUnix) ->...
function _unix_to_time_sql (line 144) | def _unix_to_time_sql(self: Hive.Generator, expression: exp.UnixToTime) ...
function _str_to_date_sql (line 153) | def _str_to_date_sql(self: Hive.Generator, expression: exp.StrToDate) ->...
function _str_to_time_sql (line 161) | def _str_to_time_sql(self: Hive.Generator, expression: exp.StrToTime) ->...
function _to_date_sql (line 169) | def _to_date_sql(self: Hive.Generator, expression: exp.TsOrDsToDate) -> ...
class Hive (line 180) | class Hive(Dialect):
class JSONPathTokenizer (line 244) | class JSONPathTokenizer(jsonpath.JSONPathTokenizer):
class Tokenizer (line 250) | class Tokenizer(tokens.Tokenizer):
class Generator (line 287) | class Generator(generator.Generator):
method ignorenulls_sql (line 477) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method unnest_sql (line 484) | def unnest_sql(self, expression: exp.Unnest) -> str:
method _jsonpathkey_sql (line 487) | def _jsonpathkey_sql(self, expression: exp.JSONPathKey) -> str:
method parameter_sql (line 494) | def parameter_sql(self, expression: exp.Parameter) -> str:
method schema_sql (line 507) | def schema_sql(self, expression: exp.Schema) -> str:
method constraint_sql (line 514) | def constraint_sql(self, expression: exp.Constraint) -> str:
method rowformatserdeproperty_sql (line 522) | def rowformatserdeproperty_sql(self, expression: exp.RowFormatSerdeP...
method arrayagg_sql (line 527) | def arrayagg_sql(self, expression: exp.ArrayAgg) -> str:
method trunc_sql (line 537) | def trunc_sql(self, expression: exp.Trunc) -> str:
method datatype_sql (line 540) | def datatype_sql(self, expression: exp.DataType) -> str:
method version_sql (line 559) | def version_sql(self, expression: exp.Version) -> str:
method struct_sql (line 563) | def struct_sql(self, expression: exp.Struct) -> str:
method columndef_sql (line 575) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -...
method altercolumn_sql (line 586) | def altercolumn_sql(self, expression: exp.AlterColumn) -> str:
method renamecolumn_sql (line 608) | def renamecolumn_sql(self, expression: exp.RenameColumn) -> str:
method alterset_sql (line 612) | def alterset_sql(self, expression: exp.AlterSet) -> str:
method serdeproperties_sql (line 626) | def serdeproperties_sql(self, expression: exp.SerdeProperties) -> str:
method exists_sql (line 632) | def exists_sql(self, expression: exp.Exists) -> str:
method timetostr_sql (line 638) | def timetostr_sql(self, expression: exp.TimeToStr) -> str:
method fileformatproperty_sql (line 645) | def fileformatproperty_sql(self, expression: exp.FileFormatProperty)...
FILE: sqlglot/dialects/materialize.py
class Materialize (line 15) | class Materialize(Postgres):
class Generator (line 18) | class Generator(Postgres.Generator):
method propertyeq_sql (line 37) | def propertyeq_sql(self, expression: exp.PropertyEQ) -> str:
method datatype_sql (line 40) | def datatype_sql(self, expression: exp.DataType) -> str:
method list_sql (line 52) | def list_sql(self, expression: exp.List) -> str:
method tomap_sql (line 58) | def tomap_sql(self, expression: exp.ToMap) -> str:
FILE: sqlglot/dialects/mysql.py
function _date_trunc_sql (line 34) | def _date_trunc_sql(self: MySQL.Generator, expression: exp.DateTrunc) ->...
function _str_to_date_sql (line 58) | def _str_to_date_sql(
function _unix_to_time_sql (line 64) | def _unix_to_time_sql(self: MySQL.Generator, expression: exp.UnixToTime)...
function date_add_sql (line 78) | def date_add_sql(
function _ts_or_ds_to_date_sql (line 91) | def _ts_or_ds_to_date_sql(self: MySQL.Generator, expression: exp.TsOrDsT...
function _remove_ts_or_ds_to_date (line 96) | def _remove_ts_or_ds_to_date(
class MySQL (line 113) | class MySQL(Dialect):
class Tokenizer (line 165) | class Tokenizer(tokens.Tokenizer):
class Generator (line 257) | class Generator(generator.Generator):
method locate_properties (line 714) | def locate_properties(self, properties: exp.Properties) -> t.Default...
method computedcolumnconstraint_sql (line 728) | def computedcolumnconstraint_sql(self, expression: exp.ComputedColum...
method array_sql (line 732) | def array_sql(self, expression: exp.Array) -> str:
method arraycontainsall_sql (line 736) | def arraycontainsall_sql(self, expression: exp.ArrayContainsAll) -> ...
method dpipe_sql (line 740) | def dpipe_sql(self, expression: exp.DPipe) -> str:
method extract_sql (line 743) | def extract_sql(self, expression: exp.Extract) -> str:
method datatype_sql (line 750) | def datatype_sql(self, expression: exp.DataType) -> str:
method jsonarraycontains_sql (line 766) | def jsonarraycontains_sql(self, expression: exp.JSONArrayContains) -...
method cast_sql (line 769) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method show_sql (line 779) | def show_sql(self, expression: exp.Show) -> str:
method alterrename_sql (line 830) | def alterrename_sql(self, expression: exp.AlterRename, include_to: b...
method altercolumn_sql (line 836) | def altercolumn_sql(self, expression: exp.AlterColumn) -> str:
method _prefixed_sql (line 844) | def _prefixed_sql(self, prefix: str, expression: exp.Expr, arg: str)...
method _oldstyle_limit_sql (line 848) | def _oldstyle_limit_sql(self, expression: exp.Show) -> str:
method timestamptrunc_sql (line 856) | def timestamptrunc_sql(self, expression: exp.TimestampTrunc) -> str:
method converttimezone_sql (line 869) | def converttimezone_sql(self, expression: exp.ConvertTimezone) -> str:
method attimezone_sql (line 876) | def attimezone_sql(self, expression: exp.AtTimeZone) -> str:
method isascii_sql (line 880) | def isascii_sql(self, expression: exp.IsAscii) -> str:
method ignorenulls_sql (line 883) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method currentschema_sql (line 889) | def currentschema_sql(self, expression: exp.CurrentSchema) -> str:
method partition_sql (line 892) | def partition_sql(self, expression: exp.Partition) -> str:
method _partition_by_sql (line 898) | def _partition_by_sql(
method partitionbyrangeproperty_sql (line 905) | def partitionbyrangeproperty_sql(self, expression: exp.PartitionByRa...
method partitionbylistproperty_sql (line 908) | def partitionbylistproperty_sql(self, expression: exp.PartitionByLis...
method partitionlist_sql (line 911) | def partitionlist_sql(self, expression: exp.PartitionList) -> str:
method partitionrange_sql (line 916) | def partitionrange_sql(self, expression: exp.PartitionRange) -> str:
FILE: sqlglot/dialects/oracle.py
function _trim_sql (line 19) | def _trim_sql(self: Oracle.Generator, expression: exp.Trim) -> str:
class Oracle (line 28) | class Oracle(Dialect):
method can_quote (line 65) | def can_quote(self, identifier: exp.Identifier, identify: str | bool =...
class Tokenizer (line 72) | class Tokenizer(tokens.Tokenizer):
class Generator (line 103) | class Generator(generator.Generator):
method currenttimestamp_sql (line 185) | def currenttimestamp_sql(self, expression: exp.CurrentTimestamp) -> ...
method offset_sql (line 192) | def offset_sql(self, expression: exp.Offset) -> str:
method add_column_sql (line 195) | def add_column_sql(self, expression: exp.Expr) -> str:
method queryoption_sql (line 198) | def queryoption_sql(self, expression: exp.QueryOption) -> str:
method coalesce_sql (line 205) | def coalesce_sql(self, expression: exp.Coalesce) -> str:
method into_sql (line 209) | def into_sql(self, expression: exp.Into) -> str:
method hint_sql (line 216) | def hint_sql(self, expression: exp.Hint) -> str:
method isascii_sql (line 228) | def isascii_sql(self, expression: exp.IsAscii) -> str:
method interval_sql (line 231) | def interval_sql(self, expression: exp.Interval) -> str:
method columndef_sql (line 234) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -...
FILE: sqlglot/dialects/postgres.py
function _date_add_sql (line 58) | def _date_add_sql(kind: str) -> t.Callable[[Postgres.Generator, DATE_ADD...
function _date_diff_sql (line 79) | def _date_diff_sql(self: Postgres.Generator, expression: exp.DateDiff) -...
function _substring_sql (line 105) | def _substring_sql(self: Postgres.Generator, expression: exp.Substring) ...
function _auto_increment_to_serial (line 116) | def _auto_increment_to_serial(expression: exp.Expr) -> exp.Expr:
function _serial_to_generated (line 133) | def _serial_to_generated(expression: exp.Expr) -> exp.Expr:
function _json_extract_sql (line 163) | def _json_extract_sql(
function _unix_to_time_sql (line 174) | def _unix_to_time_sql(self: Postgres.Generator, expression: exp.UnixToTi...
function _levenshtein_sql (line 188) | def _levenshtein_sql(self: Postgres.Generator, expression: exp.Levenshte...
function _versioned_anyvalue_sql (line 194) | def _versioned_anyvalue_sql(self: Postgres.Generator, expression: exp.An...
function _round_sql (line 203) | def _round_sql(self: Postgres.Generator, expression: exp.Round) -> str:
class Postgres (line 224) | class Postgres(Dialect):
class Tokenizer (line 274) | class Tokenizer(tokens.Tokenizer):
class Generator (line 342) | class Generator(generator.Generator):
method lateral_sql (line 374) | def lateral_sql(self, expression: exp.Lateral) -> str:
method schemacommentproperty_sql (line 515) | def schemacommentproperty_sql(self, expression: exp.SchemaCommentPro...
method commentcolumnconstraint_sql (line 519) | def commentcolumnconstraint_sql(self, expression: exp.CommentColumnC...
method columndef_sql (line 523) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -...
method unnest_sql (line 535) | def unnest_sql(self, expression: exp.Unnest) -> str:
method bracket_sql (line 566) | def bracket_sql(self, expression: exp.Bracket) -> str:
method matchagainst_sql (line 573) | def matchagainst_sql(self, expression: exp.MatchAgainst) -> str:
method alterset_sql (line 579) | def alterset_sql(self, expression: exp.AlterSet) -> str:
method datatype_sql (line 591) | def datatype_sql(self, expression: exp.DataType) -> str:
method cast_sql (line 604) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method array_sql (line 613) | def array_sql(self, expression: exp.Array) -> str:
method computedcolumnconstraint_sql (line 622) | def computedcolumnconstraint_sql(self, expression: exp.ComputedColum...
method isascii_sql (line 625) | def isascii_sql(self, expression: exp.IsAscii) -> str:
method ignorenulls_sql (line 628) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method respectnulls_sql (line 633) | def respectnulls_sql(self, expression: exp.RespectNulls) -> str:
method currentschema_sql (line 639) | def currentschema_sql(self, expression: exp.CurrentSchema) -> str:
method interval_sql (line 642) | def interval_sql(self, expression: exp.Interval) -> str:
method placeholder_sql (line 652) | def placeholder_sql(self, expression: exp.Placeholder) -> str:
method arraycontains_sql (line 659) | def arraycontains_sql(self, expression: exp.ArrayContains) -> str:
FILE: sqlglot/dialects/presto.py
function _initcap_sql (line 44) | def _initcap_sql(self: Presto.Generator, expression: exp.Initcap) -> str:
function _no_sort_array (line 55) | def _no_sort_array(self: Presto.Generator, expression: exp.SortArray) ->...
function _schema_sql (line 63) | def _schema_sql(self: Presto.Generator, expression: exp.Schema) -> str:
function _quantile_sql (line 86) | def _quantile_sql(self: Presto.Generator, expression: exp.Quantile) -> str:
function _str_to_time_sql (line 91) | def _str_to_time_sql(
function _ts_or_ds_to_date_sql (line 97) | def _ts_or_ds_to_date_sql(self: Presto.Generator, expression: exp.TsOrDs...
function _ts_or_ds_add_sql (line 104) | def _ts_or_ds_add_sql(self: Presto.Generator, expression: exp.TsOrDsAdd)...
function _ts_or_ds_diff_sql (line 110) | def _ts_or_ds_diff_sql(self: Presto.Generator, expression: exp.TsOrDsDif...
function _first_last_sql (line 117) | def _first_last_sql(self: Presto.Generator, expression: exp.Func) -> str:
function _unix_to_time_sql (line 131) | def _unix_to_time_sql(self: Presto.Generator, expression: exp.UnixToTime...
function _to_int (line 140) | def _to_int(self: Presto.Generator, expression: exp.Expr) -> exp.Expr:
function _date_delta_sql (line 150) | def _date_delta_sql(
function _explode_to_unnest_sql (line 165) | def _explode_to_unnest_sql(self: Presto.Generator, expression: exp.Later...
function amend_exploded_column_table (line 187) | def amend_exploded_column_table(expression: exp.Expr) -> exp.Expr:
class Presto (line 215) | class Presto(Dialect):
class Tokenizer (line 240) | class Tokenizer(tokens.Tokenizer):
class Generator (line 269) | class Generator(generator.Generator):
method extract_sql (line 517) | def extract_sql(self, expression: exp.Extract) -> str:
method jsonformat_sql (line 542) | def jsonformat_sql(self, expression: exp.JSONFormat) -> str:
method md5_sql (line 556) | def md5_sql(self, expression: exp.MD5) -> str:
method strtounix_sql (line 569) | def strtounix_sql(self, expression: exp.StrToUnix) -> str:
method bracket_sql (line 592) | def bracket_sql(self, expression: exp.Bracket) -> str:
method struct_sql (line 597) | def struct_sql(self, expression: exp.Struct) -> str:
method interval_sql (line 627) | def interval_sql(self, expression: exp.Interval) -> str:
method transaction_sql (line 632) | def transaction_sql(self, expression: exp.Transaction) -> str:
method offset_limit_modifiers (line 637) | def offset_limit_modifiers(
method create_sql (line 645) | def create_sql(self, expression: exp.Create) -> str:
method delete_sql (line 656) | def delete_sql(self, expression: exp.Delete) -> str:
method jsonextract_sql (line 678) | def jsonextract_sql(self, expression: exp.JSONExtract) -> str:
method groupconcat_sql (line 708) | def groupconcat_sql(self, expression: exp.GroupConcat) -> str:
FILE: sqlglot/dialects/prql.py
class PRQL (line 9) | class PRQL(Dialect):
class Tokenizer (line 12) | class Tokenizer(tokens.Tokenizer):
FILE: sqlglot/dialects/redshift.py
class Redshift (line 25) | class Redshift(Postgres):
class Tokenizer (line 45) | class Tokenizer(Postgres.Tokenizer):
class Generator (line 67) | class Generator(Postgres.Generator):
method unnest_sql (line 330) | def unnest_sql(self, expression: exp.Unnest) -> str:
method cast_sql (line 347) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method datatype_sql (line 354) | def datatype_sql(self, expression: exp.DataType) -> str:
method alterset_sql (line 370) | def alterset_sql(self, expression: exp.AlterSet) -> str:
method array_sql (line 380) | def array_sql(self, expression: exp.Array) -> str:
method ignorenulls_sql (line 386) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method respectnulls_sql (line 389) | def respectnulls_sql(self, expression: exp.RespectNulls) -> str:
method explode_sql (line 392) | def explode_sql(self, expression: exp.Explode) -> str:
method _unix_to_time_sql (line 396) | def _unix_to_time_sql(self, expression: exp.UnixToTime) -> str:
FILE: sqlglot/dialects/risingwave.py
class RisingWave (line 10) | class RisingWave(Postgres):
class Tokenizer (line 14) | class Tokenizer(Postgres.Tokenizer):
class Generator (line 23) | class Generator(Postgres.Generator):
method computedcolumnconstraint_sql (line 39) | def computedcolumnconstraint_sql(self, expression: exp.ComputedColum...
method datatype_sql (line 42) | def datatype_sql(self, expression: exp.DataType) -> str:
FILE: sqlglot/dialects/singlestore.py
class SingleStore (line 23) | class SingleStore(MySQL):
class Tokenizer (line 55) | class Tokenizer(MySQL.Tokenizer):
class Generator (line 76) | class Generator(MySQL.Generator):
method _unicode_substitute (line 83) | def _unicode_substitute(m: re.Match[str]) -> str:
method jsonextractscalar_sql (line 1473) | def jsonextractscalar_sql(self, expression: exp.JSONExtractScalar) -...
method jsonbextractscalar_sql (line 1478) | def jsonbextractscalar_sql(self, expression: exp.JSONBExtractScalar)...
method jsonextractarray_sql (line 1483) | def jsonextractarray_sql(self, expression: exp.JSONExtractArray) -> ...
method jsonvalue_sql (line 1488) | def jsonvalue_sql(self, expression: exp.JSONValue) -> str:
method all_sql (line 1501) | def all_sql(self, expression: exp.All) -> str:
method jsonarraycontains_sql (line 1505) | def jsonarraycontains_sql(self, expression: exp.JSONArrayContains) -...
method datatype_sql (line 1520) | def datatype_sql(self, expression: exp.DataType) -> str:
method collate_sql (line 1561) | def collate_sql(self, expression: exp.Collate) -> str:
method currentdate_sql (line 1566) | def currentdate_sql(self, expression: exp.CurrentDate) -> str:
method currenttime_sql (line 1575) | def currenttime_sql(self, expression: exp.CurrentTime) -> str:
method currenttimestamp_sql (line 1586) | def currenttimestamp_sql(self, expression: exp.CurrentTimestamp) -> ...
method standardhash_sql (line 1597) | def standardhash_sql(self, expression: exp.StandardHash) -> str:
method truncatetable_sql (line 1616) | def truncatetable_sql(self, expression: exp.TruncateTable) -> str:
method renamecolumn_sql (line 1624) | def renamecolumn_sql(self, expression: exp.RenameColumn) -> str:
method altercolumn_sql (line 1630) | def altercolumn_sql(self, expression: exp.AlterColumn) -> str:
method computedcolumnconstraint_sql (line 1637) | def computedcolumnconstraint_sql(self, expression: exp.ComputedColum...
FILE: sqlglot/dialects/snowflake.py
function _build_datediff (line 45) | def _build_datediff(args: t.List) -> exp.DateDiff:
function _build_date_time_add (line 54) | def _build_date_time_add(expr_type: t.Type[E]) -> t.Callable[[t.List], E]:
function _regexpilike_sql (line 65) | def _regexpilike_sql(self: Snowflake.Generator, expression: exp.RegexpIL...
function _unqualify_pivot_columns (line 76) | def _unqualify_pivot_columns(expression: exp.Expr) -> exp.Expr:
function _flatten_structured_types_unless_iceberg (line 101) | def _flatten_structured_types_unless_iceberg(expression: exp.Expr) -> ex...
function _unnest_generate_date_array (line 120) | def _unnest_generate_date_array(unnest: exp.Unnest) -> None:
function _transform_generate_date_array (line 180) | def _transform_generate_date_array(expression: exp.Expr) -> exp.Expr:
function _regexpextract_sql (line 204) | def _regexpextract_sql(self, expression: exp.RegexpExtract | exp.RegexpE...
function _json_extract_value_array_sql (line 229) | def _json_extract_value_array_sql(
function _qualify_unnested_columns (line 245) | def _qualify_unnested_columns(expression: exp.Expr) -> exp.Expr:
function _eliminate_dot_variant_lookup (line 341) | def _eliminate_dot_variant_lookup(expression: exp.Expr) -> exp.Expr:
class Snowflake (line 375) | class Snowflake(Dialect):
method can_quote (line 476) | def can_quote(self, identifier: exp.Identifier, identify: str | bool =...
class JSONPathTokenizer (line 485) | class JSONPathTokenizer(jsonpath.JSONPathTokenizer):
class Tokenizer (line 491) | class Tokenizer(tokens.Tokenizer):
class Generator (line 545) | class Generator(generator.Generator):
method sortarray_sql (line 793) | def sortarray_sql(self, expression: exp.SortArray) -> str:
method nthvalue_sql (line 800) | def nthvalue_sql(self, expression: exp.NthValue) -> str:
method with_properties (line 849) | def with_properties(self, properties: exp.Properties) -> str:
method values_sql (line 852) | def values_sql(self, expression: exp.Values, values_as_table: bool =...
method datatype_sql (line 858) | def datatype_sql(self, expression: exp.DataType) -> str:
method tonumber_sql (line 889) | def tonumber_sql(self, expression: exp.ToNumber) -> str:
method timestampfromparts_sql (line 898) | def timestampfromparts_sql(self, expression: exp.TimestampFromParts)...
method cast_sql (line 906) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method trycast_sql (line 914) | def trycast_sql(self, expression: exp.TryCast) -> str:
method log_sql (line 930) | def log_sql(self, expression: exp.Log) -> str:
method greatest_sql (line 936) | def greatest_sql(self, expression: exp.Greatest) -> str:
method least_sql (line 940) | def least_sql(self, expression: exp.Least) -> str:
method generator_sql (line 944) | def generator_sql(self, expression: exp.Generator) -> str:
method unnest_sql (line 956) | def unnest_sql(self, expression: exp.Unnest) -> str:
method show_sql (line 998) | def show_sql(self, expression: exp.Show) -> str:
method describe_sql (line 1026) | def describe_sql(self, expression: exp.Describe) -> str:
method generatedasidentitycolumnconstraint_sql (line 1041) | def generatedasidentitycolumnconstraint_sql(
method cluster_sql (line 1057) | def cluster_sql(self, expression: exp.Cluster) -> str:
method struct_sql (line 1060) | def struct_sql(self, expression: exp.Struct) -> str:
method approxquantile_sql (line 1083) | def approxquantile_sql(self, expression: exp.ApproxQuantile) -> str:
method alterset_sql (line 1086) | def alterset_sql(self, expression: exp.AlterSet) -> str:
method strtotime_sql (line 1098) | def strtotime_sql(self, expression: exp.StrToTime):
method timestampsub_sql (line 1118) | def timestampsub_sql(self, expression: exp.TimestampSub):
method jsonextract_sql (line 1127) | def jsonextract_sql(self, expression: exp.JSONExtract):
method timetostr_sql (line 1143) | def timetostr_sql(self, expression: exp.TimeToStr) -> str:
method datesub_sql (line 1150) | def datesub_sql(self, expression: exp.DateSub) -> str:
method select_sql (line 1159) | def select_sql(self, expression: exp.Select) -> str:
method createable_sql (line 1166) | def createable_sql(self, expression: exp.Create, locations: t.Defaul...
method arrayagg_sql (line 1188) | def arrayagg_sql(self, expression: exp.ArrayAgg) -> str:
method arraytostring_sql (line 1204) | def arraytostring_sql(self, expression: exp.ArrayToString) -> str:
method array_sql (line 1207) | def array_sql(self, expression: exp.Array) -> str:
method currentdate_sql (line 1233) | def currentdate_sql(self, expression: exp.CurrentDate) -> str:
method dot_sql (line 1244) | def dot_sql(self, expression: exp.Dot) -> str:
method modelattribute_sql (line 1258) | def modelattribute_sql(self, expression: exp.ModelAttribute) -> str:
method format_sql (line 1261) | def format_sql(self, expression: exp.Format) -> str:
method splitpart_sql (line 1267) | def splitpart_sql(self, expression: exp.SplitPart) -> str:
method uniform_sql (line 1277) | def uniform_sql(self, expression: exp.Uniform) -> str:
method window_sql (line 1291) | def window_sql(self, expression: exp.Window) -> str:
FILE: sqlglot/dialects/solr.py
class Solr (line 9) | class Solr(Dialect):
class Tokenizer (line 15) | class Tokenizer(tokens.Tokenizer):
FILE: sqlglot/dialects/spark.py
function _normalize_partition (line 28) | def _normalize_partition(e: exp.Expr) -> exp.Expr:
function _dateadd_sql (line 37) | def _dateadd_sql(self: Spark.Generator, expression: exp.TsOrDsAdd | exp....
function _groupconcat_sql (line 61) | def _groupconcat_sql(self: Spark.Generator, expression: exp.GroupConcat)...
class Spark (line 72) | class Spark(Spark2):
class Tokenizer (line 78) | class Tokenizer(Spark2.Tokenizer):
class Generator (line 94) | class Generator(Spark2.Generator):
method ignorenulls_sql (line 165) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method bracket_sql (line 168) | def bracket_sql(self, expression: exp.Bracket) -> str:
method computedcolumnconstraint_sql (line 175) | def computedcolumnconstraint_sql(self, expression: exp.ComputedColum...
method anyvalue_sql (line 178) | def anyvalue_sql(self, expression: exp.AnyValue) -> str:
method datediff_sql (line 181) | def datediff_sql(self, expression: exp.DateDiff) -> str:
method placeholder_sql (line 190) | def placeholder_sql(self, expression: exp.Placeholder) -> str:
method readparquet_sql (line 196) | def readparquet_sql(self, expression: exp.ReadParquet) -> str:
method ifblock_sql (line 204) | def ifblock_sql(self, expression: exp.IfBlock) -> str:
FILE: sqlglot/dialects/spark2.py
function _map_sql (line 24) | def _map_sql(self: Spark2.Generator, expression: exp.Map) -> str:
function _str_to_date (line 34) | def _str_to_date(self: Spark2.Generator, expression: exp.StrToDate) -> str:
function _unix_to_time_sql (line 41) | def _unix_to_time_sql(self: Spark2.Generator, expression: exp.UnixToTime...
function _unalias_pivot (line 58) | def _unalias_pivot(expression: exp.Expr) -> exp.Expr:
function _unqualify_pivot_columns (line 84) | def _unqualify_pivot_columns(expression: exp.Expr) -> exp.Expr:
function temporary_storage_provider (line 103) | def temporary_storage_provider(expression: exp.Expr) -> exp.Expr:
class Spark2 (line 110) | class Spark2(Hive):
class Tokenizer (line 120) | class Tokenizer(Hive.Tokenizer):
class Generator (line 130) | class Generator(Hive.Generator):
method struct_sql (line 228) | def struct_sql(self, expression: exp.Struct) -> str:
method cast_sql (line 233) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method fileformatproperty_sql (line 249) | def fileformatproperty_sql(self, expression: exp.FileFormatProperty)...
method altercolumn_sql (line 255) | def altercolumn_sql(self, expression: exp.AlterColumn) -> str:
method renamecolumn_sql (line 265) | def renamecolumn_sql(self, expression: exp.RenameColumn) -> str:
method bracket_sql (line 268) | def bracket_sql(self, expression: exp.Bracket) -> str:
FILE: sqlglot/dialects/sqlite.py
function _transform_create (line 25) | def _transform_create(expression: exp.Expr) -> exp.Expr:
function _generated_to_auto_increment (line 59) | def _generated_to_auto_increment(expression: exp.Expr) -> exp.Expr:
class SQLite (line 79) | class SQLite(Dialect):
class Tokenizer (line 86) | class Tokenizer(tokens.Tokenizer):
class Generator (line 106) | class Generator(generator.Generator):
method bitwiseandagg_sql (line 206) | def bitwiseandagg_sql(self, expression: exp.BitwiseAndAgg) -> str:
method bitwiseoragg_sql (line 210) | def bitwiseoragg_sql(self, expression: exp.BitwiseOrAgg) -> str:
method bitwisexoragg_sql (line 214) | def bitwisexoragg_sql(self, expression: exp.BitwiseXorAgg) -> str:
method jsonextract_sql (line 218) | def jsonextract_sql(self, expression: exp.JSONExtract) -> str:
method dateadd_sql (line 223) | def dateadd_sql(self, expression: exp.DateAdd) -> str:
method cast_sql (line 230) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method trunc_sql (line 241) | def trunc_sql(self, expression: exp.Trunc) -> str:
method generateseries_sql (line 244) | def generateseries_sql(self, expression: exp.GenerateSeries) -> str:
method datediff_sql (line 259) | def datediff_sql(self, expression: exp.DateDiff) -> str:
method groupconcat_sql (line 287) | def groupconcat_sql(self, expression: exp.GroupConcat) -> str:
method least_sql (line 305) | def least_sql(self, expression: exp.Least) -> str:
method greatest_sql (line 311) | def greatest_sql(self, expression: exp.Greatest) -> str:
method transaction_sql (line 317) | def transaction_sql(self, expression: exp.Transaction) -> str:
method isascii_sql (line 322) | def isascii_sql(self, expression: exp.IsAscii) -> str:
method currentschema_sql (line 326) | def currentschema_sql(self, expression: exp.CurrentSchema) -> str:
method ignorenulls_sql (line 329) | def ignorenulls_sql(self, expression: exp.IgnoreNulls) -> str:
method respectnulls_sql (line 333) | def respectnulls_sql(self, expression: exp.RespectNulls) -> str:
method windowspec_sql (line 336) | def windowspec_sql(self, expression: exp.WindowSpec) -> str:
FILE: sqlglot/dialects/starrocks.py
function _eliminate_between_in_delete (line 19) | def _eliminate_between_in_delete(expression: exp.Expr) -> exp.Expr:
function st_distance_sphere (line 45) | def st_distance_sphere(self, expression: exp.StDistance) -> str:
class StarRocks (line 57) | class StarRocks(MySQL):
class Tokenizer (line 61) | class Tokenizer(MySQL.Tokenizer):
class Generator (line 69) | class Generator(MySQL.Generator):
method create_sql (line 287) | def create_sql(self, expression: exp.Create) -> str:
method partitionedbyproperty_sql (line 308) | def partitionedbyproperty_sql(self, expression: exp.PartitionedByPro...
method cluster_sql (line 324) | def cluster_sql(self, expression: exp.Cluster) -> str:
method refreshtriggerproperty_sql (line 329) | def refreshtriggerproperty_sql(self, expression: exp.RefreshTriggerP...
FILE: sqlglot/dialects/tableau.py
class Tableau (line 8) | class Tableau(Dialect):
class Tokenizer (line 11) | class Tokenizer(tokens.Tokenizer):
class Generator (line 15) | class Generator(generator.Generator):
method if_sql (line 31) | def if_sql(self, expression: exp.If) -> str:
method count_sql (line 37) | def count_sql(self, expression: exp.Count) -> str:
method strposition_sql (line 43) | def strposition_sql(self, expression: exp.StrPosition) -> str:
FILE: sqlglot/dialects/teradata.py
function _date_add_sql (line 18) | def _date_add_sql(
class Teradata (line 41) | class Teradata(Dialect):
class Tokenizer (line 73) | class Tokenizer(tokens.Tokenizer):
class Generator (line 112) | class Generator(generator.Generator):
method currenttimestamp_sql (line 162) | def currenttimestamp_sql(self, expression: exp.CurrentTimestamp) -> ...
method cast_sql (line 166) | def cast_sql(self, expression: exp.Cast, safe_prefix: t.Optional[str...
method trycast_sql (line 173) | def trycast_sql(self, expression: exp.TryCast) -> str:
method tablesample_sql (line 176) | def tablesample_sql(
method partitionedbyproperty_sql (line 183) | def partitionedbyproperty_sql(self, expression: exp.PartitionedByPro...
method update_sql (line 188) | def update_sql(self, expression: exp.Update) -> str:
method mod_sql (line 196) | def mod_sql(self, expression: exp.Mod) -> str:
method rangen_sql (line 199) | def rangen_sql(self, expression: exp.RangeN) -> str:
method lockingstatement_sql (line 207) | def lockingstatement_sql(self, expression: exp.LockingStatement) -> ...
method createable_sql (line 214) | def createable_sql(self, expression: exp.Create, locations: t.Defaul...
method extract_sql (line 228) | def extract_sql(self, expression: exp.Extract) -> str:
method interval_sql (line 236) | def interval_sql(self, expression: exp.Interval) -> str:
FILE: sqlglot/dialects/trino.py
class Trino (line 16) | class Trino(Presto):
class Tokenizer (line 20) | class Tokenizer(Presto.Tokenizer):
class Generator (line 28) | class Generator(Presto.Generator):
method jsonextract_sql (line 64) | def jsonextract_sql(self, expression: exp.JSONExtract) -> str:
FILE: sqlglot/dialects/tsql.py
function _format_sql (line 36) | def _format_sql(self: TSQL.Generator, expression: exp.NumberToStr | exp....
function _string_agg_sql (line 51) | def _string_agg_sql(self: TSQL.Generator, expression: exp.GroupConcat) -...
function qualify_derived_table_outputs (line 70) | def qualify_derived_table_outputs(expression: exp.Expr) -> exp.Expr:
function _json_extract_sql (line 102) | def _json_extract_sql(
function _timestrtotime_sql (line 110) | def _timestrtotime_sql(self: TSQL.Generator, expression: exp.TimeStrToTi...
class TSQL (line 120) | class TSQL(Dialect):
class Tokenizer (line 255) | class Tokenizer(tokens.Tokenizer):
class Generator (line 297) | class Generator(generator.Generator):
method scope_resolution (line 431) | def scope_resolution(self, rhs: str, scope_name: str) -> str:
method select_sql (line 434) | def select_sql(self, expression: exp.Select) -> str:
method convert_sql (line 458) | def convert_sql(self, expression: exp.Convert) -> str:
method queryoption_sql (line 464) | def queryoption_sql(self, expression: exp.QueryOption) -> str:
method lateral_op (line 472) | def lateral_op(self, expression: exp.Lateral) -> str:
method splitpart_sql (line 483) | def splitpart_sql(self: TSQL.Generator, expression: exp.SplitPart) -...
method extract_sql (line 504) | def extract_sql(self, expression: exp.Extract) -> str:
method timefromparts_sql (line 510) | def timefromparts_sql(self, expression: exp.TimeFromParts) -> str:
method timestampfromparts_sql (line 523) | def timestampfromparts_sql(self, expression: exp.TimestampFromParts)...
method setitem_sql (line 539) | def setitem_sql(self, expression: exp.SetItem) -> str:
method boolean_sql (line 547) | def boolean_sql(self, expression: exp.Boolean) -> str:
method is_sql (line 555) | def is_sql(self, expression: exp.Is) -> str:
method createable_sql (line 560) | def createable_sql(self, expression: exp.Create, locations: t.Defaul...
method create_sql (line 572) | def create_sql(self, expression: exp.Create) -> str:
method into_sql (line 635) | def into_sql(self, expression: exp.Into) -> str:
method count_sql (line 644) | def count_sql(self, expression: exp.Count) -> str:
method datediff_sql (line 648) | def datediff_sql(self, expression: exp.DateDiff) -> str:
method offset_sql (line 652) | def offset_sql(self, expression: exp.Offset) -> str:
method version_sql (line 655) | def version_sql(self, expression: exp.Version) -> str:
method returnsproperty_sql (line 670) | def returnsproperty_sql(self, expression: exp.ReturnsProperty) -> str:
method returning_sql (line 675) | def returning_sql(self, expression: exp.Returning) -> str:
method transaction_sql (line 680) | def transaction_sql(self, expression: exp.Transaction) -> str:
method commit_sql (line 687) | def commit_sql(self, expression: exp.Commit) -> str:
method rollback_sql (line 698) | def rollback_sql(self, expression: exp.Rollback) -> str:
method identifier_sql (line 703) | def identifier_sql(self, expression: exp.Identifier) -> str:
method constraint_sql (line 713) | def constraint_sql(self, expression: exp.Constraint) -> str:
method length_sql (line 718) | def length_sql(self, expression: exp.Length) -> str:
method right_sql (line 721) | def right_sql(self, expression: exp.Right) -> str:
method left_sql (line 724) | def left_sql(self, expression: exp.Left) -> str:
method _uncast_text (line 727) | def _uncast_text(self, expression: exp.Expr, name: str) -> str:
method partition_sql (line 736) | def partition_sql(self, expression: exp.Partition) -> str:
method alter_sql (line 739) | def alter_sql(self, expression: exp.Alter) -> str:
method drop_sql (line 745) | def drop_sql(self, expression: exp.Drop) -> str:
method options_modifier (line 750) | def options_modifier(self, expression: exp.Expr) -> str:
method dpipe_sql (line 754) | def dpipe_sql(self, expression: exp.DPipe) -> str:
method isascii_sql (line 759) | def isascii_sql(self, expression: exp.IsAscii) -> str:
method columndef_sql (line 762) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -...
method coalesce_sql (line 770) | def coalesce_sql(self, expression: exp.Coalesce) -> str:
method storedprocedure_sql (line 774) | def storedprocedure_sql(self, expression: exp.StoredProcedure) -> str:
method ifblock_sql (line 782) | def ifblock_sql(self, expression: exp.IfBlock) -> str:
method whileblock_sql (line 790) | def whileblock_sql(self, expression: exp.WhileBlock) -> str:
method execute_sql (line 796) | def execute_sql(self, expression: exp.Execute) -> str:
method executesql_sql (line 802) | def executesql_sql(self, expression: exp.ExecuteSql) -> str:
FILE: sqlglot/diff.py
class Insert (line 24) | class Insert:
class Remove (line 31) | class Remove:
class Move (line 38) | class Move:
class Update (line 46) | class Update:
class Keep (line 54) | class Keep:
function diff (line 67) | def diff(
class ChangeDistiller (line 165) | class ChangeDistiller:
method __init__ (line 172) | def __init__(self, f: float = 0.6, t: float = 0.6, dialect: DialectTyp...
method diff (line 177) | def diff(
method _generate_edit_script (line 202) | def _generate_edit_script(self, matchings: t.Dict[int, int], delta_onl...
method _generate_move_edits (line 246) | def _generate_move_edits(
method _compute_matching_set (line 265) | def _compute_matching_set(self) -> t.Set[t.Tuple[int, int]]:
method _compute_leaf_matching_set (line 310) | def _compute_leaf_matching_set(self) -> t.Set[t.Tuple[int, int]]:
method _dice_coefficient (line 344) | def _dice_coefficient(self, source: exp.Expr, target: exp.Expr) -> float:
method _bigram_histo (line 359) | def _bigram_histo(self, expression: exp.Expr) -> t.DefaultDict[str, int]:
function _get_expression_leaves (line 373) | def _get_expression_leaves(expression: exp.Expr) -> Iterator[exp.Expr]:
function _get_non_expression_leaves (line 385) | def _get_non_expression_leaves(expression: exp.Expr) -> Iterator[tuple[s...
function _is_same_type (line 397) | def _is_same_type(source: exp.Expr, target: exp.Expr) -> bool:
function _parent_similarity_score (line 410) | def _parent_similarity_score(source: t.Optional[exp.Expr], target: t.Opt...
function _expression_only_args (line 417) | def _expression_only_args(expression: exp.Expr) -> Iterator[exp.Expr]:
function _lcs (line 425) | def _lcs(
FILE: sqlglot/errors.py
class ErrorLevel (line 15) | class ErrorLevel(AutoName):
class SqlglotError (line 29) | class SqlglotError(Exception):
class UnsupportedError (line 33) | class UnsupportedError(SqlglotError):
class ParseError (line 37) | class ParseError(SqlglotError):
method __init__ (line 38) | def __init__(
method new (line 47) | def new(
class TokenError (line 74) | class TokenError(SqlglotError):
class OptimizeError (line 78) | class OptimizeError(SqlglotError):
class SchemaError (line 82) | class SchemaError(SqlglotError):
class ExecuteError (line 86) | class ExecuteError(SqlglotError):
function highlight_sql (line 90) | def highlight_sql(
function concat_messages (line 153) | def concat_messages(errors: Sequence[t.Any], maximum: int) -> str:
function merge_errors (line 161) | def merge_errors(errors: Sequence[ParseError]) -> list[dict[str, t.Any]]:
FILE: sqlglot/executor/__init__.py
function execute (line 31) | def execute(
FILE: sqlglot/executor/context.py
class Context (line 11) | class Context:
method __init__ (line 22) | def __init__(self, tables: t.Dict[str, Table], env: t.Optional[t.Dict]...
method eval (line 34) | def eval(self, code):
method eval_tuple (line 37) | def eval_tuple(self, codes):
method table (line 41) | def table(self) -> Table:
method add_columns (line 53) | def add_columns(self, *columns: str) -> None:
method columns (line 58) | def columns(self) -> t.Tuple:
method __iter__ (line 61) | def __iter__(self):
method table_iter (line 68) | def table_iter(self, table: str) -> TableIter:
method filter (line 72) | def filter(self, condition) -> None:
method sort (line 78) | def sort(self, key) -> None:
method set_row (line 85) | def set_row(self, row: t.Tuple) -> None:
method set_index (line 90) | def set_index(self, index: int) -> None:
method set_range (line 95) | def set_range(self, start: int, end: int) -> None:
method __contains__ (line 100) | def __contains__(self, table: str) -> bool:
FILE: sqlglot/executor/env.py
class reverse_key (line 12) | class reverse_key:
method __init__ (line 13) | def __init__(self, obj):
method __eq__ (line 16) | def __eq__(self, other):
method __lt__ (line 19) | def __lt__(self, other):
function filter_nulls (line 23) | def filter_nulls(func, empty_null=True):
function null_if_any (line 34) | def null_if_any(*required):
function str_position (line 79) | def str_position(this, substr, position=None):
function substring (line 85) | def substring(this, start=None, length=None):
function cast (line 101) | def cast(this, to):
function ordered (line 134) | def ordered(this, desc, nulls_first):
function interval (line 141) | def interval(this, unit):
function arraytostring (line 149) | def arraytostring(this, expression, null=None):
function jsonextract (line 154) | def jsonextract(this, expression):
FILE: sqlglot/executor/python.py
class PythonExecutor (line 14) | class PythonExecutor:
method __init__ (line 15) | def __init__(self, env=None, tables=None):
method execute (line 20) | def execute(self, plan):
method generate (line 64) | def generate(self, expression):
method generate_tuple (line 72) | def generate_tuple(self, expressions):
method context (line 78) | def context(self, tables):
method table (line 81) | def table(self, expressions):
method scan (line 87) | def scan(self, step, context):
method _project_and_filter (line 104) | def _project_and_filter(self, context, step, table_iter):
method static (line 123) | def static(self):
method scan_table (line 126) | def scan_table(self, step):
method join (line 131) | def join(self, step, context):
method nested_loop_join (line 178) | def nested_loop_join(self, _join, source_context, join_context):
method hash_join (line 187) | def hash_join(self, join, source_context, join_context):
method aggregate (line 214) | def aggregate(self, step, context):
method sort (line 281) | def sort(self, step, context):
method set_operation (line 306) | def set_operation(self, step, context):
function _ordered_py (line 327) | def _ordered_py(self, expression):
function _rename (line 334) | def _rename(self, e):
function _case_sql (line 353) | def _case_sql(self, expression):
function _lambda_sql (line 366) | def _lambda_sql(self, e: exp.Lambda) -> str:
function _div_sql (line 378) | def _div_sql(self: generator.Generator, e: exp.Div) -> str:
class Python (line 392) | class Python(Dialect):
class Tokenizer (line 393) | class Tokenizer(tokens.Tokenizer):
class Generator (line 396) | class Generator(generator.Generator):
FILE: sqlglot/executor/table.py
class Table (line 10) | class Table:
method __init__ (line 11) | def __init__(
method add_columns (line 25) | def add_columns(self, *columns: str) -> None:
method append (line 33) | def append(self, row: t.Any) -> None:
method pop (line 37) | def pop(self) -> None:
method to_pylist (line 40) | def to_pylist(self) -> t.List:
method width (line 44) | def width(self) -> int:
method __len__ (line 47) | def __len__(self) -> int:
method __iter__ (line 50) | def __iter__(self) -> TableIter:
method __getitem__ (line 53) | def __getitem__(self, index: int) -> RowReader:
method __repr__ (line 57) | def __repr__(self) -> str:
class TableIter (line 78) | class TableIter:
method __init__ (line 79) | def __init__(self, table: Table) -> None:
method __iter__ (line 83) | def __iter__(self) -> TableIter:
method __next__ (line 86) | def __next__(self) -> RowReader:
class RangeReader (line 93) | class RangeReader:
method __init__ (line 94) | def __init__(self, table: t.Any = None) -> None:
method __len__ (line 98) | def __len__(self) -> int:
method __getitem__ (line 101) | def __getitem__(self, column: str):
class RowReader (line 105) | class RowReader:
method __init__ (line 106) | def __init__(self, columns=None, column_range=None):
method __getitem__ (line 114) | def __getitem__(self, column):
class Tables (line 118) | class Tables(AbstractMappingSchema):
function ensure_tables (line 122) | def ensure_tables(d: t.Optional[t.Dict], dialect: DialectType = None) ->...
function _ensure_tables (line 126) | def _ensure_tables(d: t.Optional[t.Dict], dialect: DialectType = None) -...
FILE: sqlglot/expressions/__init__.py
function _init_subclasses (line 55) | def _init_subclasses(cls: t.Type[Expr]) -> None:
FILE: sqlglot/expressions/aggregate.py
class AIAgg (line 8) | class AIAgg(Expression, AggFunc):
class AISummarizeAgg (line 13) | class AISummarizeAgg(Expression, AggFunc):
class AnyValue (line 17) | class AnyValue(Expression, AggFunc):
class ApproximateSimilarity (line 21) | class ApproximateSimilarity(Expression, AggFunc):
class ApproxPercentileAccumulate (line 25) | class ApproxPercentileAccumulate(Expression, AggFunc):
class ApproxPercentileCombine (line 29) | class ApproxPercentileCombine(Expression, AggFunc):
class ApproxPercentileEstimate (line 33) | class ApproxPercentileEstimate(Expression, Func):
class ApproxQuantiles (line 37) | class ApproxQuantiles(Expression, AggFunc):
class ApproxTopK (line 41) | class ApproxTopK(Expression, AggFunc):
class ApproxTopKAccumulate (line 45) | class ApproxTopKAccumulate(Expression, AggFunc):
class ApproxTopKCombine (line 49) | class ApproxTopKCombine(Expression, AggFunc):
class ApproxTopKEstimate (line 53) | class ApproxTopKEstimate(Expression, Func):
class ApproxTopSum (line 57) | class ApproxTopSum(Expression, AggFunc):
class ArgMax (line 61) | class ArgMax(Expression, AggFunc):
class ArgMin (line 66) | class ArgMin(Expression, AggFunc):
class ArrayAgg (line 71) | class ArrayAgg(Expression, AggFunc):
class ArrayConcatAgg (line 75) | class ArrayConcatAgg(Expression, AggFunc):
class ArrayUnionAgg (line 79) | class ArrayUnionAgg(Expression, AggFunc):
class ArrayUniqueAgg (line 83) | class ArrayUniqueAgg(Expression, AggFunc):
class Avg (line 87) | class Avg(Expression, AggFunc):
class Corr (line 91) | class Corr(Expression, AggFunc, Binary):
class Count (line 98) | class Count(Expression, AggFunc):
class CountIf (line 103) | class CountIf(Expression, AggFunc):
class CovarPop (line 107) | class CovarPop(Expression, AggFunc):
class CovarSamp (line 111) | class CovarSamp(Expression, AggFunc):
class CumeDist (line 115) | class CumeDist(Expression, AggFunc):
class DenseRank (line 120) | class DenseRank(Expression, AggFunc):
class First (line 125) | class First(Expression, AggFunc):
class FirstValue (line 129) | class FirstValue(Expression, AggFunc):
class GroupConcat (line 133) | class GroupConcat(Expression, AggFunc):
class Grouping (line 137) | class Grouping(Expression, AggFunc):
class GroupingId (line 142) | class GroupingId(Expression, AggFunc):
class Kurtosis (line 147) | class Kurtosis(Expression, AggFunc):
class Lag (line 151) | class Lag(Expression, AggFunc):
class Last (line 155) | class Last(Expression, AggFunc):
class LastValue (line 159) | class LastValue(Expression, AggFunc):
class Lead (line 163) | class Lead(Expression, AggFunc):
class LogicalAnd (line 167) | class LogicalAnd(Expression, AggFunc):
class LogicalOr (line 171) | class LogicalOr(Expression, AggFunc):
class Max (line 175) | class Max(Expression, AggFunc):
class Median (line 180) | class Median(Expression, AggFunc):
class Min (line 184) | class Min(Expression, AggFunc):
class Minhash (line 189) | class Minhash(Expression, AggFunc):
class MinhashCombine (line 194) | class MinhashCombine(Expression, AggFunc):
class Mode (line 198) | class Mode(Expression, AggFunc):
class Ntile (line 202) | class Ntile(Expression, AggFunc):
class NthValue (line 206) | class NthValue(Expression, AggFunc):
class ObjectAgg (line 210) | class ObjectAgg(Expression, AggFunc):
class PercentileCont (line 214) | class PercentileCont(Expression, AggFunc):
class PercentileDisc (line 218) | class PercentileDisc(Expression, AggFunc):
class PercentRank (line 225) | class PercentRank(Expression, AggFunc):
class Quantile (line 230) | class Quantile(Expression, AggFunc):
class ApproxQuantile (line 234) | class ApproxQuantile(Quantile):
class Rank (line 244) | class Rank(Expression, AggFunc):
class RegrAvgx (line 249) | class RegrAvgx(Expression, AggFunc):
class RegrAvgy (line 253) | class RegrAvgy(Expression, AggFunc):
class RegrCount (line 257) | class RegrCount(Expression, AggFunc):
class RegrIntercept (line 261) | class RegrIntercept(Expression, AggFunc):
class RegrR2 (line 265) | class RegrR2(Expression, AggFunc):
class RegrSlope (line 269) | class RegrSlope(Expression, AggFunc):
class RegrSxx (line 273) | class RegrSxx(Expression, AggFunc):
class RegrSxy (line 277) | class RegrSxy(Expression, AggFunc):
class RegrSyy (line 281) | class RegrSyy(Expression, AggFunc):
class RegrValx (line 285) | class RegrValx(Expression, AggFunc):
class RegrValy (line 289) | class RegrValy(Expression, AggFunc):
class RowNumber (line 293) | class RowNumber(Expression, Func):
class Skewness (line 297) | class Skewness(Expression, AggFunc):
class Stddev (line 301) | class Stddev(Expression, AggFunc):
class StddevPop (line 305) | class StddevPop(Expression, AggFunc):
class StddevSamp (line 309) | class StddevSamp(Expression, AggFunc):
class Sum (line 313) | class Sum(Expression, AggFunc):
class Variance (line 317) | class Variance(Expression, AggFunc):
class VariancePop (line 321) | class VariancePop(Expression, AggFunc):
FILE: sqlglot/expressions/array.py
class Array (line 21) | class Array(Expression, Func):
class ArrayConstructCompact (line 30) | class ArrayConstructCompact(Expression, Func):
class List (line 35) | class List(Expression, Func):
class ToArray (line 40) | class ToArray(Expression, Func):
class ArrayAppend (line 47) | class ArrayAppend(Expression, Func):
class ArrayCompact (line 51) | class ArrayCompact(Expression, Func):
class ArrayConcat (line 55) | class ArrayConcat(Expression, Func):
class ArrayFilter (line 61) | class ArrayFilter(Expression, Func):
class ArrayInsert (line 66) | class ArrayInsert(Expression, Func):
class ArrayPrepend (line 70) | class ArrayPrepend(Expression, Func):
class ArrayRemove (line 74) | class ArrayRemove(Expression, Func):
class ArrayRemoveAt (line 78) | class ArrayRemoveAt(Expression, Func):
class ArrayReverse (line 82) | class ArrayReverse(Expression, Func):
class ArraySlice (line 86) | class ArraySlice(Expression, Func):
class ArraySort (line 90) | class ArraySort(Expression, Func):
class SortArray (line 94) | class SortArray(Expression, Func):
class ArrayAll (line 101) | class ArrayAll(Expression, Func):
class ArrayAny (line 105) | class ArrayAny(Expression, Func):
class ArrayContains (line 109) | class ArrayContains(Expression, Binary, Func):
class ArrayContainsAll (line 114) | class ArrayContainsAll(Expression, Binary, Func):
class ArrayExcept (line 118) | class ArrayExcept(Expression, Func):
class ArrayIntersect (line 122) | class ArrayIntersect(Expression, Func):
class ArrayOverlaps (line 128) | class ArrayOverlaps(Expression, Binary, Func):
class ArrayPosition (line 132) | class ArrayPosition(Expression, Binary, Func):
class ArrayDistinct (line 139) | class ArrayDistinct(Expression, Func):
class ArrayFirst (line 143) | class ArrayFirst(Expression, Func):
class ArrayLast (line 147) | class ArrayLast(Expression, Func):
class ArrayMax (line 151) | class ArrayMax(Expression, Func):
class ArrayMin (line 155) | class ArrayMin(Expression, Func):
class ArraySize (line 159) | class ArraySize(Expression, Func):
class ArraySum (line 164) | class ArraySum(Expression, Func):
class ArraysZip (line 171) | class ArraysZip(Expression, Func):
class ArrayToString (line 176) | class ArrayToString(Expression, Func):
class Flatten (line 187) | class Flatten(Expression, Func):
class StringToArray (line 191) | class StringToArray(Expression, Func):
class Apply (line 199) | class Apply(Expression, Func):
class Reduce (line 203) | class Reduce(Expression, Func):
class Transform (line 207) | class Transform(Expression, Func):
class GenerateSeries (line 214) | class GenerateSeries(Expression, Func):
class ExplodingGenerateSeries (line 218) | class ExplodingGenerateSeries(GenerateSeries):
class Generator (line 222) | class Generator(Expression, Func, UDTF):
class Explode (line 226) | class Explode(Expression, Func, UDTF):
class Inline (line 231) | class Inline(Expression, Func):
class ExplodeOuter (line 236) | class ExplodeOuter(Expr):
class _ExplodeOuter (line 240) | class _ExplodeOuter(Explode, ExplodeOuter):
class Posexplode (line 244) | class Posexplode(Explode):
class PosexplodeOuter (line 248) | class PosexplodeOuter(Posexplode, ExplodeOuter):
class PositionalColumn (line 252) | class PositionalColumn(Expression):
class Unnest (line 256) | class Unnest(Expression, Func, UDTF):
method selects (line 265) | def selects(self) -> t.List[Expr]:
class Map (line 276) | class Map(Expression, Func):
method keys (line 280) | def keys(self) -> t.List[Expr]:
method values (line 285) | def values(self) -> t.List[Expr]:
class MapCat (line 290) | class MapCat(Expression, Func):
class MapContainsKey (line 294) | class MapContainsKey(Expression, Func):
class MapDelete (line 298) | class MapDelete(Expression, Func):
class MapFromEntries (line 303) | class MapFromEntries(Expression, Func):
class MapInsert (line 307) | class MapInsert(Expression, Func):
class MapKeys (line 311) | class MapKeys(Expression, Func):
class MapPick (line 315) | class MapPick(Expression, Func):
class MapSize (line 320) | class MapSize(Expression, Func):
class StarMap (line 324) | class StarMap(Expression, Func):
class ToMap (line 328) | class ToMap(Expression, Func):
class VarMap (line 332) | class VarMap(Expression, Func):
method keys (line 337) | def keys(self) -> t.List[Expr]:
method values (line 341) | def values(self) -> t.List[Expr]:
class Struct (line 348) | class Struct(Expression, Func):
class StructExtract (line 353) | class StructExtract(Expression, Func):
class StDistance (line 360) | class StDistance(Expression, Func):
class StPoint (line 364) | class StPoint(Expression, Func):
FILE: sqlglot/expressions/builders.py
function select (line 60) | def select(*expressions: ExpOrStr, dialect: DialectType = None, **opts) ...
function from_ (line 82) | def from_(expression: ExpOrStr, dialect: DialectType = None, **opts) -> ...
function update (line 104) | def update(
function delete (line 165) | def delete(
function insert (line 196) | def insert(
function merge (line 240) | def merge(
function parse_identifier (line 294) | def parse_identifier(name: str | Identifier, dialect: DialectType = None...
function to_interval (line 321) | def to_interval(interval: str | Expr) -> Interval:
function to_table (line 334) | def to_table(
function to_column (line 369) | def to_column(
function subquery (line 408) | def subquery(
function cast (line 436) | def cast(
function table_ (line 488) | def table_(
function values (line 515) | def values(
function var (line 548) | def var(name: t.Optional[ExpOrStr]) -> Var:
function rename_table (line 572) | def rename_table(
function rename_column (line 598) | def rename_column(
function replace_children (line 629) | def replace_children(expression: Expr, fun: t.Callable, *args, **kwargs)...
function replace_tree (line 652) | def replace_tree(
function find_tables (line 678) | def find_tables(expression: Expr) -> t.Set[Table]:
function column_table_names (line 698) | def column_table_names(expression: Expr, exclude: str = "") -> t.Set[str]:
function table_name (line 721) | def table_name(table: Table | str, dialect: DialectType = None, identify...
function normalize_table_name (line 755) | def normalize_table_name(table: str | Table, dialect: DialectType = None...
function replace_tables (line 777) | def replace_tables(
function replace_placeholders (line 817) | def replace_placeholders(expression: Expr, *args, **kwargs) -> Expr:
function expand (line 853) | def expand(
function func (line 899) | def func(name: str, *args, copy: bool = True, dialect: DialectType = Non...
function case (line 964) | def case(
function array (line 985) | def array(
function tuple_ (line 1012) | def tuple_(
function true (line 1039) | def true() -> Boolean:
function false (line 1046) | def false() -> Boolean:
function null (line 1053) | def null() -> Null:
function apply_index_offset (line 1060) | def apply_index_offset(
FILE: sqlglot/expressions/constraints.py
class IndexConstraintOption (line 8) | class IndexConstraintOption(Expression):
class Reference (line 20) | class Reference(Expression):
class ColumnConstraint (line 24) | class ColumnConstraint(Expression):
method kind (line 28) | def kind(self) -> ColumnConstraintKind | Reference:
class AutoIncrementColumnConstraint (line 32) | class AutoIncrementColumnConstraint(Expression, ColumnConstraintKind):
class ZeroFillColumnConstraint (line 36) | class ZeroFillColumnConstraint(ColumnConstraint):
class PeriodForSystemTimeConstraint (line 40) | class PeriodForSystemTimeConstraint(Expression, ColumnConstraintKind):
class CaseSpecificColumnConstraint (line 44) | class CaseSpecificColumnConstraint(Expression, ColumnConstraintKind):
class CharacterSetColumnConstraint (line 48) | class CharacterSetColumnConstraint(Expression, ColumnConstraintKind):
class CheckColumnConstraint (line 52) | class CheckColumnConstraint(Expression, ColumnConstraintKind):
class AssumeColumnConstraint (line 56) | class AssumeColumnConstraint(Expression, ColumnConstraintKind):
class ClusteredColumnConstraint (line 60) | class ClusteredColumnConstraint(Expression, ColumnConstraintKind):
class CollateColumnConstraint (line 64) | class CollateColumnConstraint(Expression, ColumnConstraintKind):
class CommentColumnConstraint (line 68) | class CommentColumnConstraint(Expression, ColumnConstraintKind):
class CompressColumnConstraint (line 72) | class CompressColumnConstraint(Expression, ColumnConstraintKind):
class DateFormatColumnConstraint (line 76) | class DateFormatColumnConstraint(Expression, ColumnConstraintKind):
class DefaultColumnConstraint (line 80) | class DefaultColumnConstraint(Expression, ColumnConstraintKind):
class EncodeColumnConstraint (line 84) | class EncodeColumnConstraint(Expression, ColumnConstraintKind):
class ExcludeColumnConstraint (line 88) | class ExcludeColumnConstraint(Expression, ColumnConstraintKind):
class EphemeralColumnConstraint (line 92) | class EphemeralColumnConstraint(Expression, ColumnConstraintKind):
class WithOperator (line 96) | class WithOperator(Expression):
class GeneratedAsIdentityColumnConstraint (line 100) | class GeneratedAsIdentityColumnConstraint(Expression, ColumnConstraintKi...
class GeneratedAsRowColumnConstraint (line 115) | class GeneratedAsRowColumnConstraint(Expression, ColumnConstraintKind):
class IndexColumnConstraint (line 119) | class IndexColumnConstraint(Expression, ColumnConstraintKind):
class InlineLengthColumnConstraint (line 131) | class InlineLengthColumnConstraint(Expression, ColumnConstraintKind):
class NonClusteredColumnConstraint (line 135) | class NonClusteredColumnConstraint(Expression, ColumnConstraintKind):
class NotForReplicationColumnConstraint (line 139) | class NotForReplicationColumnConstraint(Expression, ColumnConstraintKind):
class MaskingPolicyColumnConstraint (line 143) | class MaskingPolicyColumnConstraint(Expression, ColumnConstraintKind):
class NotNullColumnConstraint (line 147) | class NotNullColumnConstraint(Expression, ColumnConstraintKind):
class OnUpdateColumnConstraint (line 151) | class OnUpdateColumnConstraint(Expression, ColumnConstraintKind):
class PrimaryKeyColumnConstraint (line 155) | class PrimaryKeyColumnConstraint(Expression, ColumnConstraintKind):
class TitleColumnConstraint (line 159) | class TitleColumnConstraint(Expression, ColumnConstraintKind):
class UniqueColumnConstraint (line 163) | class UniqueColumnConstraint(Expression, ColumnConstraintKind):
class UppercaseColumnConstraint (line 173) | class UppercaseColumnConstraint(Expression, ColumnConstraintKind):
class WatermarkColumnConstraint (line 177) | class WatermarkColumnConstraint(Expression):
class PathColumnConstraint (line 181) | class PathColumnConstraint(Expression, ColumnConstraintKind):
class ProjectionPolicyColumnConstraint (line 185) | class ProjectionPolicyColumnConstraint(Expression, ColumnConstraintKind):
class ComputedColumnConstraint (line 189) | class ComputedColumnConstraint(Expression, ColumnConstraintKind):
class InOutColumnConstraint (line 193) | class InOutColumnConstraint(Expression, ColumnConstraintKind):
class Constraint (line 197) | class Constraint(Expression):
class ForeignKey (line 201) | class ForeignKey(Expression):
class ColumnPrefix (line 211) | class ColumnPrefix(Expression):
class PrimaryKey (line 215) | class PrimaryKey(Expression):
class IndexParameters (line 219) | class IndexParameters(Expression):
class AddConstraint (line 232) | class AddConstraint(Expression):
FILE: sqlglot/expressions/core.py
class Expr (line 47) | class Expr:
method __init_subclass__ (line 97) | def __init_subclass__(cls, **kwargs: t.Any) -> None:
method __init__ (line 108) | def __init__(self, **args: object) -> None:
method this (line 123) | def this(self) -> t.Any:
method expression (line 127) | def expression(self) -> t.Any:
method expressions (line 131) | def expressions(self) -> t.List[t.Any]:
method text (line 134) | def text(self, key: str) -> str:
method is_string (line 138) | def is_string(self) -> bool:
method is_number (line 142) | def is_number(self) -> bool:
method to_py (line 145) | def to_py(self) -> t.Any:
method is_int (line 149) | def is_int(self) -> bool:
method is_star (line 153) | def is_star(self) -> bool:
method alias (line 157) | def alias(self) -> str:
method alias_column_names (line 161) | def alias_column_names(self) -> t.List[str]:
method name (line 165) | def name(self) -> str:
method alias_or_name (line 169) | def alias_or_name(self) -> str:
method output_name (line 173) | def output_name(self) -> str:
method type (line 177) | def type(self) -> t.Optional[DataType]:
method type (line 181) | def type(self, dtype: t.Optional[DataType | DType | str]) -> None:
method is_type (line 184) | def is_type(self, *dtypes: DATA_TYPE) -> bool:
method is_leaf (line 187) | def is_leaf(self) -> bool:
method meta (line 191) | def meta(self) -> t.Dict[str, t.Any]:
method __deepcopy__ (line 194) | def __deepcopy__(self, memo: t.Any) -> Expr:
method copy (line 197) | def copy(self: E) -> E:
method add_comments (line 200) | def add_comments(self, comments: t.Optional[t.List[str]] = None, prepe...
method pop_comments (line 203) | def pop_comments(self) -> t.List[str]:
method append (line 206) | def append(self, arg_key: str, value: t.Any) -> None:
method set (line 209) | def set(
method _set_parent (line 218) | def _set_parent(self, arg_key: str, value: object, index: t.Optional[i...
method depth (line 222) | def depth(self) -> int:
method iter_expressions (line 225) | def iter_expressions(self: E, reverse: bool = False) -> Iterator[E]:
method find (line 228) | def find(self, *expression_types: Type[E], bfs: bool = True) -> t.Opti...
method find_all (line 231) | def find_all(self, *expression_types: Type[E], bfs: bool = True) -> It...
method find_ancestor (line 234) | def find_ancestor(self, *expression_types: Type[E]) -> t.Optional[E]:
method parent_select (line 238) | def parent_select(self) -> t.Optional[Select]:
method same_parent (line 242) | def same_parent(self) -> bool:
method root (line 245) | def root(self) -> Expr:
method walk (line 248) | def walk(
method dfs (line 253) | def dfs(self, prune: t.Optional[t.Callable[[Expr], bool]] = None) -> I...
method bfs (line 256) | def bfs(self, prune: t.Optional[t.Callable[[Expr], bool]] = None) -> I...
method unnest (line 259) | def unnest(self) -> Expr:
method unalias (line 262) | def unalias(self) -> Expr:
method unnest_operands (line 265) | def unnest_operands(self) -> t.Tuple[Expr, ...]:
method flatten (line 268) | def flatten(self, unnest: bool = True) -> Iterator[Expr]:
method to_s (line 271) | def to_s(self) -> str:
method sql (line 274) | def sql(self, dialect: DialectType = None, **opts: t.Any) -> str:
method transform (line 277) | def transform(
method replace (line 282) | def replace(self, expression: t.Any) -> t.Any:
method pop (line 285) | def pop(self: E) -> E:
method assert_is (line 288) | def assert_is(self, type_: Type[E]) -> E:
method error_messages (line 291) | def error_messages(self, args: t.Optional[Sequence[object]] = None) ->...
method dump (line 294) | def dump(self) -> t.Any:
method load (line 303) | def load(cls, obj: t.Any) -> Expr:
method and_ (line 313) | def and_(
method or_ (line 323) | def or_(
method not_ (line 333) | def not_(self, copy: bool = True) -> Not:
method update_positions (line 336) | def update_positions(
method as_ (line 346) | def as_(
method _binop (line 356) | def _binop(self, klass: Type[E], other: t.Any, reverse: bool = False) ...
method __getitem__ (line 359) | def __getitem__(self, other: ExpOrStr | t.Tuple[ExpOrStr, ...]) -> Bra...
method __iter__ (line 362) | def __iter__(self) -> Iterator:
method isin (line 365) | def isin(
method between (line 375) | def between(
method is_ (line 385) | def is_(self, other: ExpOrStr) -> Is:
method like (line 388) | def like(self, other: ExpOrStr) -> Like:
method ilike (line 391) | def ilike(self, other: ExpOrStr) -> ILike:
method eq (line 394) | def eq(self, other: t.Any) -> EQ:
method neq (line 397) | def neq(self, other: t.Any) -> NEQ:
method rlike (line 400) | def rlike(self, other: ExpOrStr) -> RegexpLike:
method div (line 403) | def div(self, other: ExpOrStr, typed: bool = False, safe: bool = False...
method asc (line 406) | def asc(self, nulls_first: bool = True) -> Ordered:
method desc (line 409) | def desc(self, nulls_first: bool = False) -> Ordered:
method __lt__ (line 412) | def __lt__(self, other: t.Any) -> LT:
method __le__ (line 415) | def __le__(self, other: t.Any) -> LTE:
method __gt__ (line 418) | def __gt__(self, other: t.Any) -> GT:
method __ge__ (line 421) | def __ge__(self, other: t.Any) -> GTE:
method __add__ (line 424) | def __add__(self, other: t.Any) -> Add:
method __radd__ (line 427) | def __radd__(self, other: t.Any) -> Add:
method __sub__ (line 430) | def __sub__(self, other: t.Any) -> Sub:
method __rsub__ (line 433) | def __rsub__(self, other: t.Any) -> Sub:
method __mul__ (line 436) | def __mul__(self, other: t.Any) -> Mul:
method __rmul__ (line 439) | def __rmul__(self, other: t.Any) -> Mul:
method __truediv__ (line 442) | def __truediv__(self, other: t.Any) -> Div:
method __rtruediv__ (line 445) | def __rtruediv__(self, other: t.Any) -> Div:
method __floordiv__ (line 448) | def __floordiv__(self, other: t.Any) -> IntDiv:
method __rfloordiv__ (line 451) | def __rfloordiv__(self, other: t.Any) -> IntDiv:
method __mod__ (line 454) | def __mod__(self, other: t.Any) -> Mod:
method __rmod__ (line 457) | def __rmod__(self, other: t.Any) -> Mod:
method __pow__ (line 460) | def __pow__(self, other: t.Any) -> Pow:
method __rpow__ (line 463) | def __rpow__(self, other: t.Any) -> Pow:
method __and__ (line 466) | def __and__(self, other: t.Any) -> And:
method __rand__ (line 469) | def __rand__(self, other: t.Any) -> And:
method __or__ (line 472) | def __or__(self, other: t.Any) -> Or:
method __ror__ (line 475) | def __ror__(self, other: t.Any) -> Or:
method __neg__ (line 478) | def __neg__(self) -> Neg:
method __invert__ (line 481) | def __invert__(self) -> Not:
class Expression (line 485) | class Expression(Expr):
method __eq__ (line 497) | def __eq__(self, other: object) -> bool:
method __ne__ (line 500) | def __ne__(self, other: object) -> bool:
method __hash__ (line 503) | def __hash__(self) -> int:
method __reduce__ (line 541) | def __reduce__(self) -> t.Tuple[t.Callable, t.Tuple[t.List[t.Dict[str,...
method this (line 547) | def this(self) -> t.Any:
method expression (line 554) | def expression(self) -> t.Any:
method expressions (line 561) | def expressions(self) -> t.List[t.Any]:
method text (line 567) | def text(self, key: str) -> str:
method is_string (line 582) | def is_string(self) -> bool:
method is_number (line 589) | def is_number(self) -> bool:
method to_py (line 597) | def to_py(self) -> t.Any:
method is_int (line 604) | def is_int(self) -> bool:
method is_star (line 611) | def is_star(self) -> bool:
method alias (line 616) | def alias(self) -> str:
method alias_column_names (line 626) | def alias_column_names(self) -> t.List[str]:
method name (line 633) | def name(self) -> str:
method alias_or_name (line 637) | def alias_or_name(self) -> str:
method output_name (line 641) | def output_name(self) -> str:
method type (line 659) | def type(self) -> t.Optional[DataType]:
method type (line 665) | def type(self, dtype: t.Optional[DataType | DType | str]) -> None:
method is_type (line 672) | def is_type(self, *dtypes: DATA_TYPE) -> bool:
method is_leaf (line 676) | def is_leaf(self) -> bool:
method meta (line 680) | def meta(self) -> t.Dict[str, t.Any]:
method __deepcopy__ (line 685) | def __deepcopy__(self, memo: t.Any) -> Expr:
method copy (line 719) | def copy(self: E) -> E:
method add_comments (line 725) | def add_comments(self, comments: t.Optional[t.List[str]] = None, prepe...
method pop_comments (line 743) | def pop_comments(self) -> t.List[str]:
method append (line 748) | def append(self, arg_key: str, value: t.Any) -> None:
method set (line 764) | def set(
method _set_parent (line 815) | def _set_parent(self, arg_key: str, value: object, index: t.Optional[i...
method depth (line 828) | def depth(self) -> int:
method iter_expressions (line 836) | def iter_expressions(self: E, reverse: bool = False) -> Iterator[E]:
method find (line 846) | def find(self, *expression_types: Type[E], bfs: bool = True) -> t.Opti...
method find_all (line 860) | def find_all(self, *expression_types: Type[E], bfs: bool = True) -> It...
method find_ancestor (line 876) | def find_ancestor(self, *expression_types: Type[E]) -> t.Optional[E]:
method parent_select (line 892) | def parent_select(self) -> t.Optional[Select]:
method same_parent (line 901) | def same_parent(self) -> bool:
method root (line 905) | def root(self) -> Expr:
method walk (line 914) | def walk(
method dfs (line 934) | def dfs(self, prune: t.Optional[t.Callable[[Expr], bool]] = None) -> I...
method bfs (line 952) | def bfs(self, prune: t.Optional[t.Callable[[Expr], bool]] = None) -> I...
method unnest (line 971) | def unnest(self) -> Expr:
method unalias (line 980) | def unalias(self) -> Expr:
method unnest_operands (line 988) | def unnest_operands(self) -> t.Tuple[Expr, ...]:
method flatten (line 994) | def flatten(self, unnest: bool = True) -> Iterator[Expr]:
method __str__ (line 1004) | def __str__(self) -> str:
method __repr__ (line 1007) | def __repr__(self) -> str:
method to_s (line 1010) | def to_s(self) -> str:
method sql (line 1017) | def sql(self, dialect: DialectType = None, **opts: t.Any) -> str:
method transform (line 1032) | def transform(
method replace (line 1064) | def replace(self, expression: t.Any) -> t.Any:
method pop (line 1109) | def pop(self: E) -> E:
method assert_is (line 1119) | def assert_is(self, type_: Type[E]) -> E:
method error_messages (line 1137) | def error_messages(self, args: t.Optional[Sequence[object]] = None) ->...
method and_ (line 1177) | def and_(
method or_ (line 1207) | def or_(
method not_ (line 1237) | def not_(self, copy: bool = True) -> Not:
method update_positions (line 1253) | def update_positions(
method as_ (line 1295) | def as_(
method _binop (line 1305) | def _binop(self, klass: Type[E], other: t.Any, reverse: bool = False) ...
method __getitem__ (line 1315) | def __getitem__(self, other: ExpOrStr | tuple[ExpOrStr, ...]) -> Bracket:
method __iter__ (line 1320) | def __iter__(self) -> Iterator:
method isin (line 1328) | def isin(
method between (line 1356) | def between(
method is_ (line 1374) | def is_(self, other: ExpOrStr) -> Is:
method like (line 1377) | def like(self, other: ExpOrStr) -> Like:
method ilike (line 1380) | def ilike(self, other: ExpOrStr) -> ILike:
method eq (line 1383) | def eq(self, other: t.Any) -> EQ:
method neq (line 1386) | def neq(self, other: t.Any) -> NEQ:
method rlike (line 1389) | def rlike(self, other: ExpOrStr) -> RegexpLike:
method div (line 1392) | def div(self, other: ExpOrStr, typed: bool = False, safe: bool = False...
method asc (line 1398) | def asc(self, nulls_first: bool = True) -> Ordered:
method desc (line 1401) | def desc(self, nulls_first: bool = False) -> Ordered:
method __lt__ (line 1404) | def __lt__(self, other: t.Any) -> LT:
method __le__ (line 1407) | def __le__(self, other: t.Any) -> LTE:
method __gt__ (line 1410) | def __gt__(self, other: t.Any) -> GT:
method __ge__ (line 1413) | def __ge__(self, other: t.Any) -> GTE:
method __add__ (line 1416) | def __add__(self, other: t.Any) -> Add:
method __radd__ (line 1419) | def __radd__(self, other: t.Any) -> Add:
method __sub__ (line 1422) | def __sub__(self, other: t.Any) -> Sub:
method __rsub__ (line 1425) | def __rsub__(self, other: t.Any) -> Sub:
method __mul__ (line 1428) | def __mul__(self, other: t.Any) -> Mul:
method __rmul__ (line 1431) | def __rmul__(self, other: t.Any) -> Mul:
method __truediv__ (line 1434) | def __truediv__(self, other: t.Any) -> Div:
method __rtruediv__ (line 1437) | def __rtruediv__(self, other: t.Any) -> Div:
method __floordiv__ (line 1440) | def __floordiv__(self, other: t.Any) -> IntDiv:
method __rfloordiv__ (line 1443) | def __rfloordiv__(self, other: t.Any) -> IntDiv:
method __mod__ (line 1446) | def __mod__(self, other: t.Any) -> Mod:
method __rmod__ (line 1449) | def __rmod__(self, other: t.Any) -> Mod:
method __pow__ (line 1452) | def __pow__(self, other: t.Any) -> Pow:
method __rpow__ (line 1455) | def __rpow__(self, other: t.Any) -> Pow:
method __and__ (line 1458) | def __and__(self, other: t.Any) -> And:
method __rand__ (line 1461) | def __rand__(self, other: t.Any) -> And:
method __or__ (line 1464) | def __or__(self, other: t.Any) -> Or:
method __ror__ (line 1467) | def __ror__(self, other: t.Any) -> Or:
method __neg__ (line 1470) | def __neg__(self) -> Neg:
method __invert__ (line 1473) | def __invert__(self) -> Not:
class Condition (line 1482) | class Condition(Expr):
class Predicate (line 1487) | class Predicate(Condition):
class Cache (line 1491) | class Cache(Expression):
class Uncache (line 1500) | class Uncache(Expression):
class Refresh (line 1504) | class Refresh(Expression):
class LockingStatement (line 1508) | class LockingStatement(Expression):
class ColumnConstraintKind (line 1513) | class ColumnConstraintKind(Expr):
class SubqueryPredicate (line 1518) | class SubqueryPredicate(Predicate):
class All (line 1522) | class All(Expression, SubqueryPredicate):
class Any (line 1526) | class Any(Expression, SubqueryPredicate):
class Binary (line 1531) | class Binary(Condition):
method left (line 1535) | def left(self) -> Expr:
method right (line 1539) | def right(self) -> Expr:
class Connector (line 1544) | class Connector(Binary):
class Func (line 1549) | class Func(Condition):
method from_arg_list (line 1566) | def from_arg_list(cls, args):
method sql_names (line 1581) | def sql_names(cls):
method sql_name (line 1591) | def sql_name(cls):
method default_parser_mappings (line 1597) | def default_parser_mappings(cls):
class AggFunc (line 1602) | class AggFunc(Func):
class Column (line 1606) | class Column(Expression, Condition):
method table (line 1610) | def table(self) -> str:
method db (line 1614) | def db(self) -> str:
method catalog (line 1618) | def catalog(self) -> str:
method output_name (line 1622) | def output_name(self) -> str:
method parts (line 1626) | def parts(self) -> t.List[Identifier | Star]:
method to_dot (line 1632) | def to_dot(self, include_dots: bool = True) -> Dot | Identifier | Star:
class Literal (line 1645) | class Literal(Expression, Condition):
method number (line 1651) | def number(cls, number) -> Literal | Neg:
method string (line 1663) | def string(cls, string) -> Literal:
method output_name (line 1667) | def output_name(self) -> str:
method to_py (line 1670) | def to_py(self) -> int | str | Decimal:
class Var (line 1679) | class Var(Expression):
class WithinGroup (line 1683) | class WithinGroup(Expression):
class Pseudocolumn (line 1687) | class Pseudocolumn(Column):
class Hint (line 1691) | class Hint(Expression):
class JoinHint (line 1695) | class JoinHint(Expression):
class Identifier (line 1699) | class Identifier(Expression):
method quoted (line 1705) | def quoted(self) -> bool:
method output_name (line 1709) | def output_name(self) -> str:
class Opclass (line 1713) | class Opclass(Expression):
class Star (line 1717) | class Star(Expression):
method name (line 1721) | def name(self) -> str:
method output_name (line 1725) | def output_name(self) -> str:
class Parameter (line 1729) | class Parameter(Expression, Condition):
class SessionParameter (line 1733) | class SessionParameter(Expression, Condition):
class Placeholder (line 1737) | class Placeholder(Expression, Condition):
method name (line 1741) | def name(self) -> str:
class Null (line 1745) | class Null(Expression, Condition):
method name (line 1749) | def name(self) -> str:
method to_py (line 1752) | def to_py(self) -> t.Literal[None]:
class Boolean (line 1756) | class Boolean(Expression, Condition):
method to_py (line 1759) | def to_py(self) -> bool:
class Dot (line 1763) | class Dot(Expression, Binary):
method is_star (line 1765) | def is_star(self) -> bool:
method name (line 1769) | def name(self) -> str:
method output_name (line 1773) | def output_name(self) -> str:
method build (line 1777) | def build(self, expressions: Sequence[Expr]) -> Dot:
method parts (line 1785) | def parts(self) -> t.List[Expr]:
class Kwarg (line 1801) | class Kwarg(Expression, Binary):
class Alias (line 1805) | class Alias(Expression):
method output_name (line 1809) | def output_name(self) -> str:
class PivotAlias (line 1813) | class PivotAlias(Alias):
class PivotAny (line 1817) | class PivotAny(Expression):
class Aliases (line 1821) | class Aliases(Expression):
method aliases (line 1825) | def aliases(self) -> t.List[Expr]:
class Bracket (line 1829) | class Bracket(Expression, Condition):
method output_name (line 1840) | def output_name(self) -> str:
class ForIn (line 1847) | class ForIn(Expression):
class IgnoreNulls (line 1851) | class IgnoreNulls(Expression):
class RespectNulls (line 1855) | class RespectNulls(Expression):
class HavingMax (line 1859) | class HavingMax(Expression):
class SafeFunc (line 1863) | class SafeFunc(Expression, Func):
class Typeof (line 1867) | class Typeof(Expression, Func):
class ParameterizedAgg (line 1871) | class ParameterizedAgg(Expression, AggFunc):
class Anonymous (line 1875) | class Anonymous(Expression, Func):
method name (line 1880) | def name(self) -> str:
class AnonymousAggFunc (line 1884) | class AnonymousAggFunc(Expression, AggFunc):
class CombinedAggFunc (line 1889) | class CombinedAggFunc(AnonymousAggFunc):
class CombinedParameterizedAgg (line 1893) | class CombinedParameterizedAgg(ParameterizedAgg):
class HashAgg (line 1897) | class HashAgg(Expression, AggFunc):
class Hll (line 1902) | class Hll(Expression, AggFunc):
class ApproxDistinct (line 1907) | class ApproxDistinct(Expression, AggFunc):
class Slice (line 1912) | class Slice(Expression):
class TimeUnit (line 1917) | class TimeUnit(Expr):
method __init__ (line 1935) | def __init__(self, **args: object) -> None:
method unit (line 1951) | def unit(self) -> t.Optional[Expr]:
class _TimeUnit (line 1955) | class _TimeUnit(Expression, TimeUnit):
class IntervalOp (line 1962) | class IntervalOp(TimeUnit):
method interval (line 1963) | def interval(self) -> "Interval":
class Filter (line 1973) | class Filter(Expression):
class Check (line 1977) | class Check(Expression):
class Ordered (line 1981) | class Ordered(Expression):
method name (line 1985) | def name(self) -> str:
class Add (line 1989) | class Add(Expression, Binary):
class BitwiseAnd (line 1993) | class BitwiseAnd(Expression, Binary):
class BitwiseLeftShift (line 1997) | class BitwiseLeftShift(Expression, Binary):
class BitwiseOr (line 2001) | class BitwiseOr(Expression, Binary):
class BitwiseRightShift (line 2005) | class BitwiseRightShift(Expression, Binary):
class BitwiseXor (line 2009) | class BitwiseXor(Expression, Binary):
class Div (line 2013) | class Div(Expression, Binary):
class Overlaps (line 2017) | class Overlaps(Expression, Binary):
class ExtendsLeft (line 2021) | class ExtendsLeft(Expression, Binary):
class ExtendsRight (line 2025) | class ExtendsRight(Expression, Binary):
class DPipe (line 2029) | class DPipe(Expression, Binary):
class EQ (line 2033) | class EQ(Expression, Binary, Predicate):
class NullSafeEQ (line 2037) | class NullSafeEQ(Expression, Binary, Predicate):
class NullSafeNEQ (line 2041) | class NullSafeNEQ(Expression, Binary, Predicate):
class PropertyEQ (line 2045) | class PropertyEQ(Expression, Binary):
class Distance (line 2049) | class Distance(Expression, Binary):
class Escape (line 2053) | class Escape(Expression, Binary):
class Glob (line 2057) | class Glob(Expression, Binary, Predicate):
class GT (line 2061) | class GT(Expression, Binary, Predicate):
class GTE (line 2065) | class GTE(Expression, Binary, Predicate):
class ILike (line 2069) | class ILike(Expression, Binary, Predicate):
class IntDiv (line 2073) | class IntDiv(Expression, Binary):
class Is (line 2077) | class Is(Expression, Binary, Predicate):
class Like (line 2081) | class Like(Expression, Binary, Predicate):
class Match (line 2085) | class Match(Expression, Binary, Predicate):
class LT (line 2089) | class LT(Expression, Binary, Predicate):
class LTE (line 2093) | class LTE(Expression, Binary, Predicate):
class Mod (line 2097) | class Mod(Expression, Binary):
class Mul (line 2101) | class Mul(Expression, Binary):
class NEQ (line 2105) | class NEQ(Expression, Binary, Predicate):
class NestedJSONSelect (line 2109) | class NestedJSONSelect(Expression, Binary):
class Operator (line 2113) | class Operator(Expression, Binary):
class SimilarTo (line 2117) | class SimilarTo(Expression, Binary, Predicate):
class Sub (line 2121) | class Sub(Expression, Binary):
class Adjacent (line 2125) | class Adjacent(Expression, Binary):
class Unary (line 2129) | class Unary(Expression, Condition):
class BitwiseNot (line 2133) | class BitwiseNot(Unary):
class Not (line 2137) | class Not(Unary):
class Paren (line 2141) | class Paren(Unary):
method output_name (line 2143) | def output_name(self) -> str:
class Neg (line 2147) | class Neg(Unary):
method to_py (line 2148) | def to_py(self) -> int | Decimal:
class AtIndex (line 2154) | class AtIndex(Expression):
class AtTimeZone (line 2158) | class AtTimeZone(Expression):
class FromTimeZone (line 2162) | class FromTimeZone(Expression):
class FormatPhrase (line 2166) | class FormatPhrase(Expression):
class Between (line 2176) | class Between(Expression, Predicate):
class Distinct (line 2180) | class Distinct(Expression):
class In (line 2184) | class In(Expression, Predicate):
class And (line 2195) | class And(Expression, Connector, Func):
class Or (line 2199) | class Or(Expression, Connector, Func):
class Xor (line 2203) | class Xor(Expression, Connector, Func):
class Pow (line 2208) | class Pow(Expression, Binary, Func):
class RegexpLike (line 2212) | class RegexpLike(Expression, Binary, Func):
function not_ (line 2216) | def not_(expression: ExpOrStr, dialect: DialectType = None, copy: bool =...
function _lazy_unnest (line 2243) | def _lazy_unnest(**kwargs: object) -> "Expr":
function convert (line 2249) | def convert(value: t.Any, copy: bool = False) -> Expr:
function maybe_parse (line 2373) | def maybe_parse(
function maybe_parse (line 2385) | def maybe_parse(
function maybe_parse (line 2396) | def maybe_parse(
function maybe_copy (line 2445) | def maybe_copy(instance: None, copy: bool = True) -> None: ...
function maybe_copy (line 2449) | def maybe_copy(instance: E, copy: bool = True) -> E: ...
function maybe_copy (line 2452) | def maybe_copy(instance, copy=True):
function _to_s (line 2456) | def _to_s(node: t.Any, verbose: bool = False, level: int = 0, repr_str: ...
function _is_wrong_expression (line 2496) | def _is_wrong_expression(expression, into):
function _apply_builder (line 2500) | def _apply_builder(
function _apply_child_list_builder (line 2525) | def _apply_child_list_builder(
function _apply_list_builder (line 2571) | def _apply_list_builder(
function _apply_conjunction_builder (line 2604) | def _apply_conjunction_builder(
function _combine (line 2630) | def _combine(
function _wrap (line 2654) | def _wrap(expression: None, kind: Type[Expr]) -> None: ...
function _wrap (line 2658) | def _wrap(expression: E, kind: Type[Expr]) -> E | Paren: ...
function _wrap (line 2661) | def _wrap(expression: t.Optional[E], kind: Type[Expr]) -> t.Optional[E] ...
function _apply_set_operation (line 2665) | def _apply_set_operation(
function to_identifier (line 2683) | def to_identifier(name: None, quoted: t.Optional[bool] = None, copy: boo...
function to_identifier (line 2687) | def to_identifier(
function to_identifier (line 2692) | def to_identifier(name, quoted=None, copy=True):
function condition (line 2719) | def condition(expression: ExpOrStr, dialect: DialectType = None, copy: b...
function and_ (line 2754) | def and_(
function or_ (line 2784) | def or_(
function xor (line 2814) | def xor(
function paren (line 2844) | def paren(expression: ExpOrStr, copy: bool = True) -> Paren:
function alias_ (line 2863) | def alias_(
function column (line 2923) | def column(
function column (line 2937) | def column(
function column (line 2950) | def column(
FILE: sqlglot/expressions/datatypes.py
class DataTypeParam (line 22) | class DataTypeParam(Expression):
method name (line 26) | def name(self) -> str:
class DType (line 30) | class DType(AutoName):
class DataType (line 161) | class DataType(Expression):
method build (line 315) | def build(
method is_type (line 365) | def is_type(self, *dtypes: DATA_TYPE, check_nullable: bool = False) ->...
class PseudoType (line 397) | class PseudoType(DataType):
class ObjectIdentifier (line 401) | class ObjectIdentifier(DataType):
class IntervalSpan (line 405) | class IntervalSpan(DataType):
class Interval (line 409) | class Interval(_TimeUnit):
FILE: sqlglot/expressions/ddl.py
class DDL (line 16) | class DDL(Selectable):
method ctes (line 18) | def ctes(self) -> t.List[CTE]:
method selects (line 24) | def selects(self) -> t.List[Expr]:
method named_selects (line 30) | def named_selects(self) -> t.List[str]:
class Create (line 39) | class Create(Expression, DDL):
method kind (line 59) | def kind(self) -> t.Optional[str]:
class SequenceProperties (line 64) | class SequenceProperties(Expression):
class TriggerProperties (line 76) | class TriggerProperties(Expression):
class TriggerExecute (line 92) | class TriggerExecute(Expression):
class TriggerEvent (line 96) | class TriggerEvent(Expression):
class TriggerReferencing (line 100) | class TriggerReferencing(Expression):
class TruncateTable (line 104) | class TruncateTable(Expression):
class Clone (line 117) | class Clone(Expression):
class Describe (line 121) | class Describe(Expression):
class Attach (line 134) | class Attach(Expression):
class Detach (line 138) | class Detach(Expression):
class Install (line 149) | class Install(Expression):
class Summarize (line 153) | class Summarize(Expression):
class Kill (line 157) | class Kill(Expression):
class Pragma (line 161) | class Pragma(Expression):
class Declare (line 165) | class Declare(Expression):
class DeclareItem (line 169) | class DeclareItem(Expression):
class Set (line 173) | class Set(Expression):
class Heredoc (line 177) | class Heredoc(Expression):
class SetItem (line 181) | class SetItem(Expression):
class Show (line 191) | class Show(Expression):
class UserDefinedFunction (line 224) | class UserDefinedFunction(Expression):
class CharacterSet (line 228) | class CharacterSet(Expression):
class AlterColumn (line 232) | class AlterColumn(Expression):
class AlterIndex (line 247) | class AlterIndex(Expression):
class AlterDistStyle (line 251) | class AlterDistStyle(Expression):
class AlterSortKey (line 255) | class AlterSortKey(Expression):
class AlterSet (line 259) | class AlterSet(Expression):
class RenameColumn (line 273) | class RenameColumn(Expression):
class AlterRename (line 277) | class AlterRename(Expression):
class AlterModifySqlSecurity (line 281) | class AlterModifySqlSecurity(Expression):
class SwapTable (line 285) | class SwapTable(Expression):
class Comment (line 289) | class Comment(Expression):
class Comprehension (line 299) | class Comprehension(Expression):
class MergeTreeTTLAction (line 309) | class MergeTreeTTLAction(Expression):
class MergeTreeTTL (line 319) | class MergeTreeTTL(Expression):
class Drop (line 328) | class Drop(Expression):
method kind (line 345) | def kind(self) -> t.Optional[str]:
class Command (line 350) | class Command(Expression):
class Transaction (line 354) | class Transaction(Expression):
class Commit (line 358) | class Commit(Expression):
class Rollback (line 362) | class Rollback(Expression):
class Alter (line 366) | class Alter(Expression):
method kind (line 381) | def kind(self) -> t.Optional[str]:
method actions (line 386) | def actions(self) -> t.List[Expr]:
class AlterSession (line 390) | class AlterSession(Expression):
class Use (line 394) | class Use(Expression):
class NextValueFor (line 398) | class NextValueFor(Expression, Func):
class Execute (line 402) | class Execute(Expression):
method name (line 406) | def name(self) -> str:
class ExecuteSql (line 410) | class ExecuteSql(Execute):
FILE: sqlglot/expressions/dml.py
class DML (line 31) | class DML(Expr):
method returning (line 34) | def returning(
class Delete (line 70) | class Delete(Expression, DML):
method delete (line 83) | def delete(
method where (line 116) | def where(
class Export (line 156) | class Export(Expression):
class CopyParameter (line 160) | class CopyParameter(Expression):
class Copy (line 164) | class Copy(Expression, DML):
class Credentials (line 175) | class Credentials(Expression):
class Directory (line 185) | class Directory(Expression):
class DirectoryStage (line 189) | class DirectoryStage(Expression):
class Insert (line 193) | class Insert(Expression, DDL, DML):
method with_ (line 215) | def with_(
class OnConflict (line 263) | class OnConflict(Expression):
class Returning (line 275) | class Returning(Expression):
class LoadData (line 279) | class LoadData(Expression):
class Update (line 291) | class Update(Expression, DML):
method table (line 304) | def table(
method set_ (line 336) | def set_(
method where (line 373) | def where(
method from_ (line 412) | def from_(
method with_ (line 452) | def with_(
class Merge (line 499) | class Merge(Expression, DML):
class When (line 511) | class When(Expression):
class Whens (line 515) | class Whens(Expression):
FILE: sqlglot/expressions/functions.py
class Cast (line 32) | class Cast(Expression, Func):
method name (line 44) | def name(self) -> str:
method to (line 48) | def to(self) -> DataType:
method output_name (line 52) | def output_name(self) -> str:
method is_type (line 55) | def is_type(self, *dtypes: DATA_TYPE) -> bool:
class TryCast (line 70) | class TryCast(Cast):
class JSONCast (line 74) | class JSONCast(Cast):
class CastToStrType (line 78) | class CastToStrType(Expression, Func):
class Convert (line 82) | class Convert(Expression, Func):
class If (line 89) | class If(Expression, Func):
class Case (line 94) | class Case(Expression, Func):
method when (line 97) | def when(self, condition: ExpOrStr, then: ExpOrStr, copy: bool = True,...
method else_ (line 108) | def else_(self, condition: ExpOrStr, copy: bool = True, **opts) -> Case:
class Coalesce (line 114) | class Coalesce(Expression, Func):
class DecodeCase (line 120) | class DecodeCase(Expression, Func):
class EqualNull (line 125) | class EqualNull(Expression, Func):
class Greatest (line 129) | class Greatest(Expression, Func):
class Least (line 134) | class Least(Expression, Func):
class Nullif (line 139) | class Nullif(Expression, Func):
class Nvl2 (line 143) | class Nvl2(Expression, Func):
class Try (line 147) | class Try(Expression, Func):
class Collate (line 154) | class Collate(Expression, Binary, Func):
class Collation (line 158) | class Collation(Expression, Func):
class ConnectByRoot (line 162) | class ConnectByRoot(Expression, Func):
class CheckXml (line 166) | class CheckXml(Expression, Func):
class Exists (line 170) | class Exists(Expression, Func, SubqueryPredicate):
class Float64 (line 177) | class Float64(Expression, Func):
class Int64 (line 181) | class Int64(Expression, Func):
class IsArray (line 185) | class IsArray(Expression, Func):
class IsNullValue (line 189) | class IsNullValue(Expression, Func):
class LaxBool (line 193) | class LaxBool(Expression, Func):
class LaxFloat64 (line 197) | class LaxFloat64(Expression, Func):
class LaxInt64 (line 201) | class LaxInt64(Expression, Func):
class LaxString (line 205) | class LaxString(Expression, Func):
class ToBoolean (line 209) | class ToBoolean(Expression, Func):
class ToVariant (line 213) | class ToVariant(Expression, Func):
class CurrentAccount (line 220) | class CurrentAccount(Expression, Func):
class CurrentAccountName (line 224) | class CurrentAccountName(Expression, Func):
class CurrentAvailableRoles (line 228) | class CurrentAvailableRoles(Expression, Func):
class CurrentCatalog (line 232) | class CurrentCatalog(Expression, Func):
class CurrentClient (line 236) | class CurrentClient(Expression, Func):
class CurrentDatabase (line 240) | class CurrentDatabase(Expression, Func):
class CurrentIpAddress (line 244) | class CurrentIpAddress(Expression, Func):
class CurrentOrganizationName (line 248) | class CurrentOrganizationName(Expression, Func):
class CurrentOrganizationUser (line 252) | class CurrentOrganizationUser(Expression, Func):
class CurrentRegion (line 256) | class CurrentRegion(Expression, Func):
class CurrentRole (line 260) | class CurrentRole(Expression, Func):
class CurrentRoleType (line 264) | class CurrentRoleType(Expression, Func):
class CurrentSchema (line 268) | class CurrentSchema(Expression, Func):
class CurrentSchemas (line 272) | class CurrentSchemas(Expression, Func):
class CurrentSecondaryRoles (line 276) | class CurrentSecondaryRoles(Expression, Func):
class CurrentSession (line 280) | class CurrentSession(Expression, Func):
class CurrentStatement (line 284) | class CurrentStatement(Expression, Func):
class CurrentTransaction (line 288) | class CurrentTransaction(Expression, Func):
class CurrentUser (line 292) | class CurrentUser(Expression, Func):
class CurrentVersion (line 296) | class CurrentVersion(Expression, Func):
class CurrentWarehouse (line 300) | class CurrentWarehouse(Expression, Func):
class SessionUser (line 304) | class SessionUser(Expression, Func):
class AIClassify (line 311) | class AIClassify(Expression, Func):
class FeaturesAtTime (line 316) | class FeaturesAtTime(Expression, Func):
class GenerateEmbedding (line 320) | class GenerateEmbedding(Expression, Func):
class MLForecast (line 324) | class MLForecast(Expression, Func):
class MLTranslate (line 328) | class MLTranslate(Expression, Func):
class Predict (line 332) | class Predict(Expression, Func):
class VectorSearch (line 336) | class VectorSearch(Expression, Func):
class ReadCSV (line 351) | class ReadCSV(Expression, Func):
class ReadParquet (line 357) | class ReadParquet(Expression, Func):
class XMLElement (line 365) | class XMLElement(Expression, Func):
class XMLGet (line 370) | class XMLGet(Expression, Func):
class XMLTable (line 375) | class XMLTable(Expression, Func):
class Host (line 388) | class Host(Expression, Func):
class NetFunc (line 392) | class NetFunc(Expression, Func):
class ParseIp (line 396) | class ParseIp(Expression, Func):
class RegDomain (line 400) | class RegDomain(Expression, Func):
class Columns (line 407) | class Columns(Expression, Func):
class Normal (line 411) | class Normal(Expression, Func):
class Rand (line 415) | class Rand(Expression, Func):
class Randn (line 420) | class Randn(Expression, Func):
class Randstr (line 424) | class Randstr(Expression, Func):
class RangeBucket (line 428) | class RangeBucket(Expression, Func):
class RangeN (line 432) | class RangeN(Expression, Func):
class Seq1 (line 436) | class Seq1(Expression, Func):
class Seq2 (line 440) | class Seq2(Expression, Func):
class Seq4 (line 444) | class Seq4(Expression, Func):
class Seq8 (line 448) | class Seq8(Expression, Func):
class Uniform (line 452) | class Uniform(Expression, Func):
class Uuid (line 456) | class Uuid(Expression, Func):
class WeekStart (line 462) | class WeekStart(Expression, Func):
class WidthBucket (line 466) | class WidthBucket(Expression, Func):
class Zipf (line 476) | class Zipf(Expression, Func):
FILE: sqlglot/expressions/json.py
class CheckJson (line 8) | class CheckJson(Expression, Func):
class JSONArray (line 12) | class JSONArray(Expression, Func):
class JSONArrayAgg (line 21) | class JSONArrayAgg(Expression, AggFunc):
class JSONArrayAppend (line 31) | class JSONArrayAppend(Expression, Func):
class JSONArrayContains (line 37) | class JSONArrayContains(Expression, Binary, Predicate, Func):
class JSONArrayInsert (line 42) | class JSONArrayInsert(Expression, Func):
class JSONBContains (line 48) | class JSONBContains(Expression, Binary, Func):
class JSONBContainsAllTopKeys (line 52) | class JSONBContainsAllTopKeys(Expression, Binary, Func):
class JSONBContainsAnyTopKeys (line 56) | class JSONBContainsAnyTopKeys(Expression, Binary, Func):
class JSONBDeleteAtPath (line 60) | class JSONBDeleteAtPath(Expression, Binary, Func):
class JSONBExists (line 64) | class JSONBExists(Expression, Func):
class JSONBExtract (line 69) | class JSONBExtract(Expression, Binary, Func):
class JSONBExtractScalar (line 73) | class JSONBExtractScalar(Expression, Binary, Func):
class JSONBObjectAgg (line 78) | class JSONBObjectAgg(Expression, AggFunc):
class JSONBool (line 82) | class JSONBool(Expression, Func):
class JSONExists (line 86) | class JSONExists(Expression, Func):
class JSONExtract (line 96) | class JSONExtract(Expression, Binary, Func):
method output_name (line 114) | def output_name(self) -> str:
class JSONExtractArray (line 118) | class JSONExtractArray(Expression, Func):
class JSONExtractScalar (line 123) | class JSONExtractScalar(Expression, Binary, Func):
method output_name (line 136) | def output_name(self) -> str:
class JSONFormat (line 140) | class JSONFormat(Expression, Func):
class JSONKeys (line 145) | class JSONKeys(Expression, Func):
class JSONKeysAtDepth (line 151) | class JSONKeysAtDepth(Expression, Func):
class JSONObject (line 155) | class JSONObject(Expression, Func):
class JSONObjectAgg (line 165) | class JSONObjectAgg(Expression, AggFunc):
class JSONRemove (line 175) | class JSONRemove(Expression, Func):
class JSONSet (line 181) | class JSONSet(Expression, Func):
class JSONStripNulls (line 187) | class JSONStripNulls(Expression, Func):
class JSONTable (line 197) | class JSONTable(Expression, Func):
class JSONType (line 207) | class JSONType(Expression, Func):
class ObjectId (line 212) | class ObjectId(Expression, Func):
class ObjectInsert (line 216) | class ObjectInsert(Expression, Func):
class OpenJSON (line 225) | class OpenJSON(Expression, Func):
class ParseJSON (line 229) | class ParseJSON(Expression, Func):
FILE: sqlglot/expressions/math.py
class Acos (line 11) | class Acos(Expression, Func):
class Acosh (line 15) | class Acosh(Expression, Func):
class Asin (line 19) | class Asin(Expression, Func):
class Asinh (line 23) | class Asinh(Expression, Func):
class Atan (line 27) | class Atan(Expression, Func):
class Atanh (line 31) | class Atanh(Expression, Func):
class Atan2 (line 35) | class Atan2(Expression, Func):
class Cos (line 39) | class Cos(Expression, Func):
class Cosh (line 43) | class Cosh(Expression, Func):
class Cot (line 47) | class Cot(Expression, Func):
class Coth (line 51) | class Coth(Expression, Func):
class Csc (line 55) | class Csc(Expression, Func):
class Csch (line 59) | class Csch(Expression, Func):
class Degrees (line 63) | class Degrees(Expression, Func):
class Radians (line 67) | class Radians(Expression, Func):
class Sec (line 71) | class Sec(Expression, Func):
class Sech (line 75) | class Sech(Expression, Func):
class Sin (line 79) | class Sin(Expression, Func):
class Sinh (line 83) | class Sinh(Expression, Func):
class Tan (line 87) | class Tan(Expression, Func):
class Tanh (line 91) | class Tanh(Expression, Func):
class CosineDistance (line 98) | class CosineDistance(Expression, Func):
class DotProduct (line 102) | class DotProduct(Expression, Func):
class EuclideanDistance (line 106) | class EuclideanDistance(Expression, Func):
class JarowinklerSimilarity (line 110) | class JarowinklerSimilarity(Expression, Func):
class ManhattanDistance (line 114) | class ManhattanDistance(Expression, Func):
class Abs (line 121) | class Abs(Expression, Func):
class Cbrt (line 125) | class Cbrt(Expression, Func):
class Ceil (line 129) | class Ceil(Expression, Func):
class Exp (line 134) | class Exp(Expression, Func):
class Factorial (line 138) | class Factorial(Expression, Func):
class Floor (line 142) | class Floor(Expression, Func):
class IsInf (line 146) | class IsInf(Expression, Func):
class IsNan (line 150) | class IsNan(Expression, Func):
class Ln (line 154) | class Ln(Expression, Func):
class Log (line 158) | class Log(Expression, Func):
class Pi (line 162) | class Pi(Expression, Func):
class Round (line 166) | class Round(Expression, Func):
class Sign (line 175) | class Sign(Expression, Func):
class Sqrt (line 179) | class Sqrt(Expression, Func):
class Trunc (line 183) | class Trunc(Expression, Func):
class SafeAdd (line 191) | class SafeAdd(Expression, Func):
class SafeDivide (line 195) | class SafeDivide(Expression, Func):
class SafeMultiply (line 199) | class SafeMultiply(Expression, Func):
class SafeNegate (line 203) | class SafeNegate(Expression, Func):
class SafeSubtract (line 207) | class SafeSubtract(Expression, Func):
class BitwiseAndAgg (line 214) | class BitwiseAndAgg(Expression, AggFunc):
class BitwiseCount (line 218) | class BitwiseCount(Expression, Func):
class BitwiseOrAgg (line 222) | class BitwiseOrAgg(Expression, AggFunc):
class BitwiseXorAgg (line 226) | class BitwiseXorAgg(Expression, AggFunc):
class BitmapBitPosition (line 230) | class BitmapBitPosition(Expression, Func):
class BitmapBucketNumber (line 234) | class BitmapBucketNumber(Expression, Func):
class BitmapConstructAgg (line 238) | class BitmapConstructAgg(Expression, AggFunc):
class BitmapCount (line 242) | class BitmapCount(Expression, Func):
class BitmapOrAgg (line 246) | class BitmapOrAgg(Expression, AggFunc):
class Booland (line 250) | class Booland(Expression, Func):
class Boolnot (line 254) | class Boolnot(Expression, Func):
class Boolor (line 258) | class Boolor(Expression, Func):
class BoolxorAgg (line 262) | class BoolxorAgg(Expression, AggFunc):
class Getbit (line 266) | class Getbit(Expression, Func):
FILE: sqlglot/expressions/properties.py
class Property (line 12) | class Property(Expression):
class GrantPrivilege (line 16) | class GrantPrivilege(Expression):
class GrantPrincipal (line 20) | class GrantPrincipal(Expression):
class AllowedValuesProperty (line 24) | class AllowedValuesProperty(Expression):
class AlgorithmProperty (line 28) | class AlgorithmProperty(Property):
class ApiProperty (line 32) | class ApiProperty(Property):
class ApplicationProperty (line 36) | class ApplicationProperty(Property):
class AutoIncrementProperty (line 40) | class AutoIncrementProperty(Property):
class AutoRefreshProperty (line 44) | class AutoRefreshProperty(Property):
class BackupProperty (line 48) | class BackupProperty(Property):
class BuildProperty (line 52) | class BuildProperty(Property):
class BlockCompressionProperty (line 56) | class BlockCompressionProperty(Property):
class CatalogProperty (line 66) | class CatalogProperty(Property):
class CharacterSetProperty (line 70) | class CharacterSetProperty(Property):
class ChecksumProperty (line 74) | class ChecksumProperty(Property):
class CollateProperty (line 78) | class CollateProperty(Property):
class ComputeProperty (line 82) | class ComputeProperty(Property):
class CopyGrantsProperty (line 86) | class CopyGrantsProperty(Property):
class DataBlocksizeProperty (line 90) | class DataBlocksizeProperty(Property):
class DataDeletionProperty (line 100) | class DataDeletionProperty(Property):
class DatabaseProperty (line 104) | class DatabaseProperty(Property):
class DefinerProperty (line 108) | class DefinerProperty(Property):
class DistKeyProperty (line 112) | class DistKeyProperty(Property):
class DistributedByProperty (line 116) | class DistributedByProperty(Property):
class DistStyleProperty (line 120) | class DistStyleProperty(Property):
class DuplicateKeyProperty (line 124) | class DuplicateKeyProperty(Property):
class EngineProperty (line 128) | class EngineProperty(Property):
class HeapProperty (line 132) | class HeapProperty(Property):
class HybridProperty (line 136) | class HybridProperty(Property):
class HandlerProperty (line 140) | class HandlerProperty(Property):
class ParameterStyleProperty (line 144) | class ParameterStyleProperty(Property):
class ToTableProperty (line 148) | class ToTableProperty(Property):
class ExecuteAsProperty (line 152) | class ExecuteAsProperty(Property):
class ExternalProperty (line 156) | class ExternalProperty(Property):
class FallbackProperty (line 160) | class FallbackProperty(Property):
class FileFormatProperty (line 164) | class FileFormatProperty(Property):
class CredentialsProperty (line 168) | class CredentialsProperty(Property):
class FreespaceProperty (line 172) | class FreespaceProperty(Property):
class GlobalProperty (line 176) | class GlobalProperty(Property):
class IcebergProperty (line 180) | class IcebergProperty(Property):
class InheritsProperty (line 184) | class InheritsProperty(Property):
class InputModelProperty (line 188) | class InputModelProperty(Property):
class OutputModelProperty (line 192) | class OutputModelProperty(Property):
class IsolatedLoadingProperty (line 196) | class IsolatedLoadingProperty(Property):
class JournalProperty (line 200) | class JournalProperty(Property):
class LanguageProperty (line 210) | class LanguageProperty(Property):
class EnviromentProperty (line 214) | class EnviromentProperty(Property):
class ClusteredByProperty (line 218) | class ClusteredByProperty(Property):
class DictProperty (line 222) | class DictProperty(Property):
class DictSubProperty (line 226) | class DictSubProperty(Property):
class DictRange (line 230) | class DictRange(Property):
class DynamicProperty (line 234) | class DynamicProperty(Property):
class OnCluster (line 238) | class OnCluster(Property):
class EmptyProperty (line 242) | class EmptyProperty(Property):
class LikeProperty (line 246) | class LikeProperty(Property):
class LocationProperty (line 250) | class LocationProperty(Property):
class LockProperty (line 254) | class LockProperty(Property):
class LockingProperty (line 258) | class LockingProperty(Property):
class LogProperty (line 268) | class LogProperty(Property):
class MaskingProperty (line 272) | class MaskingProperty(Property):
class MaterializedProperty (line 276) | class MaterializedProperty(Property):
class MergeBlockRatioProperty (line 280) | class MergeBlockRatioProperty(Property):
class NetworkProperty (line 284) | class NetworkProperty(Property):
class NoPrimaryIndexProperty (line 288) | class NoPrimaryIndexProperty(Property):
class OnProperty (line 292) | class OnProperty(Property):
class OnCommitProperty (line 296) | class OnCommitProperty(Property):
class PartitionedByProperty (line 300) | class PartitionedByProperty(Property):
class PartitionedByBucket (line 304) | class PartitionedByBucket(Property):
class PartitionByTruncate (line 308) | class PartitionByTruncate(Property):
class PartitionByRangeProperty (line 312) | class PartitionByRangeProperty(Property):
class PartitionByRangePropertyDynamic (line 316) | class PartitionByRangePropertyDynamic(Expression):
class RollupProperty (line 320) | class RollupProperty(Property):
class RollupIndex (line 324) | class RollupIndex(Expression):
class RowAccessProperty (line 328) | class RowAccessProperty(Property):
class PartitionByListProperty (line 332) | class PartitionByListProperty(Property):
class PartitionList (line 336) | class PartitionList(Expression):
class RefreshTriggerProperty (line 340) | class RefreshTriggerProperty(Property):
class UniqueKeyProperty (line 350) | class UniqueKeyProperty(Property):
class PartitionBoundSpec (line 354) | class PartitionBoundSpec(Expression):
class PartitionedOfProperty (line 364) | class PartitionedOfProperty(Property):
class StreamingTableProperty (line 369) | class StreamingTableProperty(Property):
class RemoteWithConnectionModelProperty (line 373) | class RemoteWithConnectionModelProperty(Property):
class ReturnsProperty (line 377) | class ReturnsProperty(Property):
class StrictProperty (line 381) | class StrictProperty(Property):
class RowFormatProperty (line 385) | class RowFormatProperty(Property):
class RowFormatDelimitedProperty (line 389) | class RowFormatDelimitedProperty(Property):
class RowFormatSerdeProperty (line 402) | class RowFormatSerdeProperty(Property):
class QueryTransform (line 406) | class QueryTransform(Expression):
class SampleProperty (line 418) | class SampleProperty(Property):
class SchemaCommentProperty (line 422) | class SchemaCommentProperty(Property):
class SemanticView (line 426) | class SemanticView(Expression):
class SerdeProperties (line 436) | class SerdeProperties(Property):
class SetProperty (line 440) | class SetProperty(Property):
class SharingProperty (line 444) | class SharingProperty(Property):
class SetConfigProperty (line 448) | class SetConfigProperty(Property):
class SettingsProperty (line 452) | class SettingsProperty(Property):
class SortKeyProperty (line 456) | class SortKeyProperty(Property):
class SqlReadWriteProperty (line 460) | class SqlReadWriteProperty(Property):
class SqlSecurityProperty (line 464) | class SqlSecurityProperty(Property):
class StabilityProperty (line 468) | class StabilityProperty(Property):
class StorageHandlerProperty (line 472) | class StorageHandlerProperty(Property):
class TemporaryProperty (line 476) | class TemporaryProperty(Property):
class SecureProperty (line 480) | class SecureProperty(Property):
class SecurityIntegrationProperty (line 484) | class SecurityIntegrationProperty(Property):
class Tags (line 488) | class Tags(Property, ColumnConstraintKind):
class PropertiesLocation (line 492) | class PropertiesLocation(AutoName):
class TransformModelProperty (line 503) | class TransformModelProperty(Property):
class TransientProperty (line 507) | class TransientProperty(Property):
class UnloggedProperty (line 511) | class UnloggedProperty(Property):
class UsingTemplateProperty (line 515) | class UsingTemplateProperty(Property):
class ViewAttributeProperty (line 519) | class ViewAttributeProperty(Property):
class VolatileProperty (line 523) | class VolatileProperty(Property):
class WithDataProperty (line 527) | class WithDataProperty(Property):
class WithJournalTableProperty (line 531) | class WithJournalTableProperty(Property):
class WithSchemaBindingProperty (line 535) | class WithSchemaBindingProperty(Property):
class WithSystemVersioningProperty (line 539) | class WithSystemVersioningProperty(Property):
class WithProcedureOptions (line 549) | class WithProcedureOptions(Property):
class EncodeProperty (line 553) | class EncodeProperty(Property):
class IncludeProperty (line 557) | class IncludeProperty(Property):
class ForceProperty (line 561) | class ForceProperty(Property):
class Properties (line 565) | class Properties(Expression):
method from_dict (line 612) | def from_dict(cls, properties_dict: t.Dict) -> Properties:
FILE: sqlglot/expressions/query.py
function _apply_cte_builder (line 49) | def _apply_cte_builder(
class Selectable (line 79) | class Selectable(Expr):
method selects (line 81) | def selects(self) -> t.List[Expr]:
method named_selects (line 85) | def named_selects(self) -> t.List[str]:
function _named_selects (line 89) | def _named_selects(self: Expr) -> t.List[str]:
class DerivedTable (line 95) | class DerivedTable(Selectable):
method selects (line 97) | def selects(self) -> t.List[Expr]:
class UDTF (line 103) | class UDTF(DerivedTable):
method selects (line 105) | def selects(self) -> t.List[Expr]:
class Query (line 111) | class Query(Selectable):
method ctes (line 115) | def ctes(self) -> t.List[CTE]:
method select (line 119) | def select(
method subquery (line 129) | def subquery(self, alias: t.Optional[ExpOrStr] = None, copy: bool = Tr...
method limit (line 148) | def limit(
method offset (line 182) | def offset(
method order_by (line 216) | def order_by(
method where (line 256) | def where(
method with_ (line 295) | def with_(
method union (line 344) | def union(
method intersect (line 367) | def intersect(
method except_ (line 390) | def except_(
class QueryBand (line 414) | class QueryBand(Expression):
class RecursiveWithSearch (line 418) | class RecursiveWithSearch(Expression):
class With (line 422) | class With(Expression):
method recursive (line 426) | def recursive(self) -> bool:
class CTE (line 430) | class CTE(Expression, DerivedTable):
class ProjectionDef (line 440) | class ProjectionDef(Expression):
class TableAlias (line 444) | class TableAlias(Expression):
method columns (line 448) | def columns(self) -> t.List[t.Any]:
class BitString (line 452) | class BitString(Expression, Condition):
class HexString (line 456) | class HexString(Expression, Condition):
class ByteString (line 461) | class ByteString(Expression, Condition):
class RawString (line 466) | class RawString(Expression, Condition):
class UnicodeString (line 470) | class UnicodeString(Expression, Condition):
class ColumnPosition (line 474) | class ColumnPosition(Expression):
class ColumnDef (line 478) | class ColumnDef(Expression):
method constraints (line 490) | def constraints(self) -> t.List[ColumnConstraint]:
method kind (line 494) | def kind(self) -> t.Optional[DataType]:
class Changes (line 498) | class Changes(Expression):
class Connect (line 502) | class Connect(Expression):
class Prior (line 506) | class Prior(Expression):
class Into (line 510) | class Into(Expression):
class From (line 520) | class From(Expression):
method name (line 522) | def name(self) -> str:
method alias_or_name (line 526) | def alias_or_name(self) -> str:
class Having (line 530) | class Having(Expression):
class Index (line 534) | class Index(Expression):
class ConditionalInsert (line 545) | class ConditionalInsert(Expression):
class MultitableInserts (line 549) | class MultitableInserts(Expression):
class OnCondition (line 553) | class OnCondition(Expression):
class Introducer (line 557) | class Introducer(Expression):
class National (line 561) | class National(Expression):
class Partition (line 565) | class Partition(Expression):
class PartitionRange (line 569) | class PartitionRange(Expression):
class PartitionId (line 573) | class PartitionId(Expression):
class Fetch (line 577) | class Fetch(Expression):
class Grant (line 585) | class Grant(Expression):
class Revoke (line 595) | class Revoke(Expression):
class Group (line 599) | class Group(Expression):
class Cube (line 610) | class Cube(Expression):
class Rollup (line 614) | class Rollup(Expression):
class GroupingSets (line 618) | class GroupingSets(Expression):
class Lambda (line 622) | class Lambda(Expression):
class Limit (line 626) | class Limit(Expression):
class LimitOptions (line 636) | class LimitOptions(Expression):
class Join (line 644) | class Join(Expression):
method method (line 661) | def method(self) -> str:
method kind (line 665) | def kind(self) -> str:
method side (line 669) | def side(self) -> str:
method hint (line 673) | def hint(self) -> str:
method alias_or_name (line 677) | def alias_or_name(self) -> str:
method is_semi_or_anti_join (line 681) | def is_semi_or_anti_join(self) -> bool:
method on (line 684) | def on(
method using (line 728) | def using(
class Lateral (line 772) | class Lateral(Expression, UDTF):
class TableFromRows (line 783) | class TableFromRows(Expression, UDTF):
class MatchRecognizeMeasure (line 793) | class MatchRecognizeMeasure(Expression):
class MatchRecognize (line 800) | class MatchRecognize(Expression):
class Final (line 813) | class Final(Expression):
class Offset (line 817) | class Offset(Expression):
class Order (line 821) | class Order(Expression):
class WithFill (line 825) | class WithFill(Expression):
class SkipJSONColumn (line 834) | class SkipJSONColumn(Expression):
class Cluster (line 838) | class Cluster(Order):
class Distribute (line 842) | class Distribute(Order):
class Sort (line 846) | class Sort(Order):
class Qualify (line 850) | class Qualify(Expression):
class InputOutputFormat (line 854) | class InputOutputFormat(Expression):
class Return (line 858) | class Return(Expression):
class Tuple (line 862) | class Tuple(Expression):
method isin (line 865) | def isin(
class QueryOption (line 890) | class QueryOption(Expression):
class WithTableHint (line 894) | class WithTableHint(Expression):
class IndexTableHint (line 898) | class IndexTableHint(Expression):
class HistoricalData (line 902) | class HistoricalData(Expression):
class Put (line 906) | class Put(Expression):
class Get (line 910) | class Get(Expression):
class Table (line 914) | class Table(Expression, Selectable):
method name (line 939) | def name(self) -> str:
method db (line 945) | def db(self) -> str:
method catalog (line 949) | def catalog(self) -> str:
method selects (line 953) | def selects(self) -> t.List[Expr]:
method named_selects (line 957) | def named_selects(self) -> t.List[str]:
method parts (line 961) | def parts(self) -> t.List[Expr]:
method to_column (line 975) | def to_column(self, copy: bool = True) -> Expr:
class SetOperation (line 992) | class SetOperation(Expression, Query):
method select (line 1005) | def select(
method named_selects (line 1021) | def named_selects(self) -> t.List[str]:
method is_star (line 1028) | def is_star(self) -> bool:
method selects (line 1032) | def selects(self) -> t.List[Expr]:
method left (line 1039) | def left(self) -> Query:
method right (line 1043) | def right(self) -> Query:
method kind (line 1047) | def kind(self) -> str:
method side (line 1051) | def side(self) -> str:
class Union (line 1055) | class Union(SetOperation):
class Except (line 1059) | class Except(SetOperation):
class Intersect (line 1063) | class Intersect(SetOperation):
class Values (line 1067) | class Values(Expression, UDTF):
class Version (line 1077) | class Version(Expression):
class Schema (line 1091) | class Schema(Expression):
class Lock (line 1095) | class Lock(Expression):
class Select (line 1099) | class Select(Expression, Query):
method from_ (line 1113) | def from_(
method group_by (line 1145) | def group_by(
method sort_by (line 1189) | def sort_by(
method cluster_by (line 1229) | def cluster_by(
method select (line 1269) | def select(
method lateral (line 1288) | def lateral(
method join (line 1327) | def join(
method having (line 1426) | def having(
method window (line 1465) | def window(
method qualify (line 1484) | def qualify(
method distinct (line 1503) | def distinct(
method ctas (line 1526) | def ctas(
method lock (line 1570) | def lock(self, update: bool = True, copy: bool = True) -> Select:
method hint (line 1593) | def hint(self, *hints: ExpOrStr, dialect: DialectType = None, copy: bo...
method named_selects (line 1618) | def named_selects(self) -> t.List[str]:
method is_star (line 1629) | def is_star(self) -> bool:
method selects (line 1633) | def selects(self) -> t.List[Expr]:
class Subquery (line 1637) | class Subquery(Expression, DerivedTable, Query):
method unnest (line 1646) | def unnest(self) -> Expr:
method unwrap (line 1653) | def unwrap(self) -> Subquery:
method select (line 1659) | def select(
method is_wrapper (line 1674) | def is_wrapper(self) -> bool:
method is_star (line 1685) | def is_star(self) -> bool:
method output_name (line 1689) | def output_name(self) -> str:
class TableSample (line 1693) | class TableSample(Expression):
class Tag (line 1707) | class Tag(Expression):
class Pivot (line 1717) | class Pivot(Expression):
method unpivot (line 1734) | def unpivot(self) -> bool:
method fields (line 1738) | def fields(self) -> t.List[Expr]:
class UnpivotColumns (line 1742) | class UnpivotColumns(Expression):
class Window (line 1746) | class Window(Expression, Condition):
class WindowSpec (line 1758) | class WindowSpec(Expression):
class PreWhere (line 1769) | class PreWhere(Expression):
class Where (line 1773) | class Where(Expression):
class Analyze (line 1777) | class Analyze(Expression):
class AnalyzeStatistics (line 1789) | class AnalyzeStatistics(Expression):
class AnalyzeHistogram (line 1798) | class AnalyzeHistogram(Expression):
class AnalyzeSample (line 1807) | class AnalyzeSample(Expression):
class AnalyzeListChainedRows (line 1811) | class AnalyzeListChainedRows(Expression):
class AnalyzeDelete (line 1815) | class AnalyzeDelete(Expression):
class AnalyzeWith (line 1819) | class AnalyzeWith(Expression):
class AnalyzeValidate (line 1823) | class AnalyzeValidate(Expression):
class AnalyzeColumns (line 1831) | class AnalyzeColumns(Expression):
class UsingData (line 1835) | class UsingData(Expression):
class AddPartition (line 1839) | class AddPartition(Expression):
class AttachOption (line 1843) | class AttachOption(Expression):
class DropPartition (line 1847) | class DropPartition(Expression):
class ReplacePartition (line 1851) | class ReplacePartition(Expression):
class TranslateCharacters (line 1855) | class TranslateCharacters(Expression):
class OverflowTruncateBehavior (line 1859) | class OverflowTruncateBehavior(Expression):
class JSON (line 1863) | class JSON(Expression):
class JSONPath (line 1867) | class JSONPath(Expression):
method output_name (line 1871) | def output_name(self) -> str:
class JSONPathPart (line 1876) | class JSONPathPart(Expression):
class JSONPathFilter (line 1880) | class JSONPathFilter(JSONPathPart):
class JSONPathKey (line 1884) | class JSONPathKey(JSONPathPart):
class JSONPathRecursive (line 1888) | class JSONPathRecursive(JSONPathPart):
class JSONPathRoot (line 1892) | class JSONPathRoot(JSONPathPart):
class JSONPathScript (line 1896) | class JSONPathScript(JSONPathPart):
class JSONPathSlice (line 1900) | class JSONPathSlice(JSONPathPart):
class JSONPathSelector (line 1904) | class JSONPathSelector(JSONPathPart):
class JSONPathSubscript (line 1908) | class JSONPathSubscript(JSONPathPart):
class JSONPathUnion (line 1912) | class JSONPathUnion(JSONPathPart):
class JSONPathWildcard (line 1916) | class JSONPathWildcard(JSONPathPart):
class FormatJson (line 1920) | class FormatJson(Expression):
class JSONKeyValue (line 1924) | class JSONKeyValue(Expression):
class JSONColumnDef (line 1928) | class JSONColumnDef(Expression):
class JSONSchema (line 1938) | class JSONSchema(Expression):
class JSONValue (line 1942) | class JSONValue(Expression):
class JSONValueArray (line 1951) | class JSONValueArray(Expression, Func):
class OpenJSONColumnDef (line 1955) | class OpenJSONColumnDef(Expression):
class JSONExtractQuote (line 1959) | class JSONExtractQuote(Expression):
class ScopeResolution (line 1966) | class ScopeResolution(Expression):
class Stream (line 1970) | class Stream(Expression):
class ModelAttribute (line 1974) | class ModelAttribute(Expression):
class XMLNamespace (line 1978) | class XMLNamespace(Expression):
class XMLKeyValueOption (line 1982) | class XMLKeyValueOption(Expression):
class Semicolon (line 1986) | class Semicolon(Expression):
class TableColumn (line 1990) | class TableColumn(Expression):
class Variadic (line 1994) | class Variadic(Expression):
class StoredProcedure (line 1998) | class StoredProcedure(Expression):
class Block (line 2002) | class Block(Expression):
class IfBlock (line 2006) | class IfBlock(Expression):
class WhileBlock (line 2010) | class WhileBlock(Expression):
class EndStatement (line 2014) | class EndStatement(Expression):
function union (line 2021) | def union(
function intersect (line 2052) | def intersect(
function except_ (line 2083) | def except_(
FILE: sqlglot/expressions/string.py
class Ascii (line 11) | class Ascii(Expression, Func):
class BitLength (line 15) | class BitLength(Expression, Func):
class ByteLength (line 19) | class ByteLength(Expression, Func):
class Chr (line 23) | class Chr(Expression, Func):
class Concat (line 29) | class Concat(Expression, Func):
class ConcatWs (line 34) | class ConcatWs(Concat):
class Contains (line 38) | class Contains(Expression, Func):
class Elt (line 42) | class Elt(Expression, Func):
class EndsWith (line 47) | class EndsWith(Expression, Func):
class Format (line 52) | class Format(Expression, Func):
class Initcap (line 57) | class Initcap(Expression, Func):
class IsAscii (line 61) | class IsAscii(Expression, Func):
class Left (line 65) | class Left(Expression, Func):
class Length (line 69) | class Length(Expression, Func):
class Levenshtein (line 74) | class Levenshtein(Expression, Func):
class Lower (line 85) | class Lower(Expression, Func):
class MatchAgainst (line 89) | class MatchAgainst(Expression, Func):
class Normalize (line 93) | class Normalize(Expression, Func):
class NumberToStr (line 97) | class NumberToStr(Expression, Func):
class Overlay (line 101) | class Overlay(Expression, Func):
class Pad (line 105) | class Pad(Expression, Func):
class Repeat (line 109) | class Repeat(Expression, Func):
class Replace (line 113) | class Replace(Expression, Func):
class Reverse (line 117) | class Reverse(Expression, Func):
class Right (line 121) | class Right(Expression, Func):
class RtrimmedLength (line 125) | class RtrimmedLength(Expression, Func):
class Search (line 129) | class Search(Expression, Func):
class SearchIp (line 140) | class SearchIp(Expression, Func):
class Soundex (line 144) | class Soundex(Expression, Func):
class SoundexP123 (line 148) | class SoundexP123(Expression, Func):
class Space (line 152) | class Space(Expression, Func):
class Split (line 160) | class Split(Expression, Func):
class SplitPart (line 170) | class SplitPart(Expression, Func):
class Strtok (line 180) | class Strtok(Expression, Func):
class StartsWith (line 188) | class StartsWith(Expression, Func):
class StrPosition (line 193) | class StrPosition(Expression, Func):
class StrToMap (line 203) | class StrToMap(Expression, Func):
class String (line 212) | class String(Expression, Func):
class Stuff (line 216) | class Stuff(Expression, Func):
class Substring (line 221) | class Substring(Expression, Func):
class SubstringIndex (line 226) | class SubstringIndex(Expression, Func):
class Translate (line 237) | class Translate(Expression, Func):
class Trim (line 241) | class Trim(Expression, Func):
class Unicode (line 250) | class Unicode(Expression, Func):
class Upper (line 254) | class Upper(Expression, Func):
class Base64DecodeBinary (line 261) | class Base64DecodeBinary(Expression, Func):
class Base64DecodeString (line 265) | class Base64DecodeString(Expression, Func):
class Base64Encode (line 269) | class Base64Encode(Expression, Func):
class CodePointsToBytes (line 273) | class CodePointsToBytes(Expression, Func):
class CodePointsToString (line 277) | class CodePointsToString(Expression, Func):
class ConvertToCharset (line 281) | class ConvertToCharset(Expression, Func):
class Decode (line 285) | class Decode(Expression, Func):
class Encode (line 289) | class Encode(Expression, Func):
class FromBase (line 293) | class FromBase(Expression, Func):
class FromBase32 (line 297) | class FromBase32(Expression, Func):
class FromBase64 (line 301) | class FromBase64(Expression, Func):
class Hex (line 305) | class Hex(Expression, Func):
class HexDecodeString (line 309) | class HexDecodeString(Expression, Func):
class HexEncode (line 313) | class HexEncode(Expression, Func):
class LowerHex (line 317) | class LowerHex(Hex):
class SafeConvertBytesToString (line 321) | class SafeConvertBytesToString(Expression, Func):
class ToBase32 (line 325) | class ToBase32(Expression, Func):
class ToBase64 (line 329) | class ToBase64(Expression, Func):
class ToBinary (line 333) | class ToBinary(Expression, Func):
class ToChar (line 337) | class ToChar(Expression, Func):
class ToCodePoints (line 346) | class ToCodePoints(Expression, Func):
class ToDecfloat (line 350) | class ToDecfloat(Expression, Func):
class ToDouble (line 357) | class ToDouble(Expression, Func):
class ToFile (line 365) | class ToFile(Expression, Func):
class ToNumber (line 373) | class ToNumber(Expression, Func):
class TryBase64DecodeBinary (line 385) | class TryBase64DecodeBinary(Expression, Func):
class TryBase64DecodeString (line 389) | class TryBase64DecodeString(Expression, Func):
class TryHexDecodeBinary (line 393) | class TryHexDecodeBinary(Expression, Func):
class TryHexDecodeString (line 397) | class TryHexDecodeString(Expression, Func):
class TryToDecfloat (line 401) | class TryToDecfloat(Expression, Func):
class Unhex (line 408) | class Unhex(Expression, Func):
class RegexpCount (line 415) | class RegexpCount(Expression, Func):
class RegexpExtract (line 424) | class RegexpExtract(Expression, Func):
class RegexpExtractAll (line 436) | class RegexpExtractAll(Expression, Func):
class RegexpFullMatch (line 447) | class RegexpFullMatch(Expression, Binary, Func):
class RegexpILike (line 451) | class RegexpILike(Expression, Binary, Func):
class RegexpInstr (line 455) | class RegexpInstr(Expression, Func):
class RegexpReplace (line 467) | class RegexpReplace(Expression, Func):
class RegexpSplit (line 479) | class RegexpSplit(Expression, Func):
class Compress (line 486) | class Compress(Expression, Func):
class Decrypt (line 490) | class Decrypt(Expression, Func):
class DecryptRaw (line 500) | class DecryptRaw(Expression, Func):
class DecompressBinary (line 512) | class DecompressBinary(Expression, Func):
class DecompressString (line 516) | class DecompressString(Expression, Func):
class Encrypt (line 520) | class Encrypt(Expression, Func):
class EncryptRaw (line 524) | class EncryptRaw(Expression, Func):
class CityHash64 (line 528) | class CityHash64(Expression, Func):
class FarmFingerprint (line 533) | class FarmFingerprint(Expression, Func):
class MD5 (line 539) | class MD5(Expression, Func):
class MD5Digest (line 543) | class MD5Digest(Expression, Func):
class MD5NumberLower64 (line 549) | class MD5NumberLower64(Expression, Func):
class MD5NumberUpper64 (line 553) | class MD5NumberUpper64(Expression, Func):
class SHA (line 557) | class SHA(Expression, Func):
class SHA1Digest (line 561) | class SHA1Digest(Expression, Func):
class SHA2 (line 565) | class SHA2(Expression, Func):
class SHA2Digest (line 570) | class SHA2Digest(Expression, Func):
class StandardHash (line 574) | class StandardHash(Expression, Func):
class ParseBignumeric (line 581) | class ParseBignumeric(Expression, Func):
class ParseNumeric (line 585) | class ParseNumeric(Expression, Func):
class ParseUrl (line 589) | class ParseUrl(Expression, Func):
FILE: sqlglot/expressions/temporal.py
class CurrentDate (line 25) | class CurrentDate(Expression, Func):
class CurrentDatetime (line 29) | class CurrentDatetime(Expression, Func):
class CurrentTime (line 33) | class CurrentTime(Expression, Func):
class CurrentTimestamp (line 37) | class CurrentTimestamp(Expression, Func):
class CurrentTimestampLTZ (line 41) | class CurrentTimestampLTZ(Expression, Func):
class CurrentTimezone (line 45) | class CurrentTimezone(Expression, Func):
class Localtime (line 49) | class Localtime(Expression, Func):
class Localtimestamp (line 53) | class Localtimestamp(Expression, Func):
class Systimestamp (line 57) | class Systimestamp(Expression, Func):
class UtcDate (line 61) | class UtcDate(Expression, Func):
class UtcTime (line 65) | class UtcTime(Expression, Func):
class UtcTimestamp (line 69) | class UtcTimestamp(Expression, Func):
class AddMonths (line 76) | class AddMonths(Expression, Func):
class DateAdd (line 80) | class DateAdd(Expression, Func, IntervalOp):
class DateBin (line 84) | class DateBin(Expression, Func, IntervalOp):
class DateDiff (line 88) | class DateDiff(Expression, Func, TimeUnit):
class DateSub (line 100) | class DateSub(Expression, Func, IntervalOp):
class DatetimeAdd (line 104) | class DatetimeAdd(Expression, Func, IntervalOp):
class DatetimeDiff (line 108) | class DatetimeDiff(Expression, Func, TimeUnit):
class DatetimeSub (line 112) | class DatetimeSub(Expression, Func, IntervalOp):
class MonthsBetween (line 116) | class MonthsBetween(Expression, Func):
class TimeAdd (line 120) | class TimeAdd(Expression, Func, TimeUnit):
class TimeDiff (line 124) | class TimeDiff(Expression, Func, TimeUnit):
class TimeSub (line 128) | class TimeSub(Expression, Func, TimeUnit):
class TimestampAdd (line 132) | class TimestampAdd(Expression, Func, TimeUnit):
class TimestampDiff (line 136) | class TimestampDiff(Expression, Func, TimeUnit):
class TimestampSub (line 141) | class TimestampSub(Expression, Func, TimeUnit):
class TsOrDsAdd (line 145) | class TsOrDsAdd(Expression, Func, TimeUnit):
method return_type (line 150) | def return_type(self) -> DataType:
class TsOrDsDiff (line 154) | class TsOrDsDiff(Expression, Func, TimeUnit):
class DatetimeTrunc (line 161) | class DatetimeTrunc(Expression, Func, TimeUnit):
class DateTrunc (line 165) | class DateTrunc(Expression, Func):
method __init__ (line 168) | def __init__(self, **args):
method unit (line 186) | def unit(self) -> Expr:
class TimestampTrunc (line 190) | class TimestampTrunc(Expression, Func, TimeUnit):
class TimeSlice (line 194) | class TimeSlice(Expression, Func, TimeUnit):
class TimeTrunc (line 198) | class TimeTrunc(Expression, Func, TimeUnit):
class Day (line 205) | class Day(Expression, Func):
class DayOfMonth (line 209) | class DayOfMonth(Expression, Func):
class DayOfWeek (line 213) | class DayOfWeek(Expression, Func):
class DayOfWeekIso (line 217) | class DayOfWeekIso(Expression, Func):
class DayOfYear (line 221) | class DayOfYear(Expression, Func):
class Dayname (line 225) | class Dayname(Expression, Func):
class Extract (line 229) | class Extract(Expression, Func):
class GetExtract (line 233) | class GetExtract(Expression, Func):
class Hour (line 237) | class Hour(Expression, Func):
class Minute (line 241) | class Minute(Expression, Func):
class Month (line 245) | class Month(Expression, Func):
class Monthname (line 249) | class Monthname(Expression, Func):
class Quarter (line 253) | class Quarter(Expression, Func):
class Second (line 257) | class Second(Expression, Func):
class ToDays (line 261) | class ToDays(Expression, Func):
class Week (line 265) | class Week(Expression, Func):
class WeekOfYear (line 269) | class WeekOfYear(Expression, Func):
class Year (line 273) | class Year(Expression, Func):
class YearOfWeek (line 277) | class YearOfWeek(Expression, Func):
class YearOfWeekIso (line 281) | class YearOfWeekIso(Expression, Func):
class Date (line 288) | class Date(Expression, Func):
class DateFromParts (line 293) | class DateFromParts(Expression, Func):
class DateFromUnixDate (line 298) | class DateFromUnixDate(Expression, Func):
class Datetime (line 302) | class Datetime(Expression, Func):
class GapFill (line 306) | class GapFill(Expression, Func):
class GenerateDateArray (line 318) | class GenerateDateArray(Expression, Func):
class GenerateTimestampArray (line 322) | class GenerateTimestampArray(Expression, Func):
class JustifyDays (line 326) | class JustifyDays(Expression, Func):
class JustifyHours (line 330) | class JustifyHours(Expression, Func):
class JustifyInterval (line 334) | class JustifyInterval(Expression, Func):
class LastDay (line 338) | class LastDay(Expression, Func, TimeUnit):
class MakeInterval (line 343) | class MakeInterval(Expression, Func):
class NextDay (line 355) | class NextDay(Expression, Func):
class PreviousDay (line 359) | class PreviousDay(Expression, Func):
class Time (line 363) | class Time(Expression, Func):
class TimeFromParts (line 367) | class TimeFromParts(Expression, Func):
class Timestamp (line 380) | class Timestamp(Expression, Func):
class TimestampFromParts (line 384) | class TimestampFromParts(Expression, Func):
class TimestampLtzFromParts (line 395) | class TimestampLtzFromParts(Expression, Func):
class TimestampTzFromParts (line 400) | class TimestampTzFromParts(Expression, Func):
class ConvertTimezone (line 411) | class ConvertTimezone(Expression, Func):
class DateStrToDate (line 420) | class DateStrToDate(Expression, Func):
class DateToDateStr (line 424) | class DateToDateStr(Expression, Func):
class DateToDi (line 428) | class DateToDi(Expression, Func):
class DiToDate (line 432) | class DiToDate(Expression, Func):
class FromISO8601Timestamp (line 436) | class FromISO8601Timestamp(Expression, Func):
class ParseDatetime (line 440) | class ParseDatetime(Expression, Func):
class ParseTime (line 444) | class ParseTime(Expression, Func):
class StrToDate (line 448) | class StrToDate(Expression, Func):
class StrToTime (line 452) | class StrToTime(Expression, Func):
class StrToUnix (line 456) | class StrToUnix(Expression, Func):
class TimeStrToDate (line 460) | class TimeStrToDate(Expression, Func):
class TimeStrToTime (line 464) | class TimeStrToTime(Expression, Func):
class TimeStrToUnix (line 468) | class TimeStrToUnix(Expression, Func):
class TimeToStr (line 472) | class TimeToStr(Expression, Func):
class TimeToTimeStr (line 476) | class TimeToTimeStr(Expression, Func):
class TimeToUnix (line 480) | class TimeToUnix(Expression, Func):
class TsOrDiToDi (line 484) | class TsOrDiToDi(Expression, Func):
class TsOrDsToDate (line 488) | class TsOrDsToDate(Expression, Func):
class TsOrDsToDateStr (line 492) | class TsOrDsToDateStr(Expression, Func):
class TsOrDsToDatetime (line 496) | class TsOrDsToDatetime(Expression, Func):
class TsOrDsToTime (line 500) | class TsOrDsToTime(Expression, Func):
class TsOrDsToTimestamp (line 504) | class TsOrDsToTimestamp(Expression, Func):
class UnixDate (line 508) | class UnixDate(Expression, Func):
class UnixMicros (line 512) | class UnixMicros(Expression, Func):
class UnixMillis (line 516) | class UnixMillis(Expression, Func):
class UnixSeconds (line 520) | class UnixSeconds(Expression, Func):
class UnixToStr (line 524) | class UnixToStr(Expression, Func):
class UnixToTime (line 528) | class UnixToTime(Expression, Func):
class UnixToTimeStr (line 551) | class UnixToTimeStr(Expression, Func):
FILE: sqlglot/generator.py
function unsupported_args (line 30) | def unsupported_args(
class _Generator (line 64) | class _Generator(type):
method __new__ (line 65) | def __new__(cls, clsname, bases, attrs):
class Generator (line 75) | class Generator(metaclass=_Generator):
method __init__ (line 812) | def __init__(
method generate (line 865) | def generate(self, expression: exp.Expr, copy: bool = True) -> str:
method preprocess (line 899) | def preprocess(self, expression: exp.Expr) -> exp.Expr:
method _move_ctes_to_top_level (line 910) | def _move_ctes_to_top_level(self, expression: E) -> E:
method unsupported (line 921) | def unsupported(self, message: str) -> None:
method sep (line 926) | def sep(self, sep: str = " ") -> str:
method seg (line 929) | def seg(self, sql: str, sep: str = " ") -> str:
method sanitize_comment (line 932) | def sanitize_comment(self, comment: str) -> str:
method maybe_comment (line 943) | def maybe_comment(
method wrap (line 977) | def wrap(self, expression: exp.Expr | str) -> str:
method no_identify (line 989) | def no_identify(self, func: t.Callable[..., str], *args, **kwargs) -> ...
method normalize_func (line 996) | def normalize_func(self, name: str) -> str:
method indent (line 1003) | def indent(
method sql (line 1026) | def sql(
method uncache_sql (line 1062) | def uncache_sql(self, expression: exp.Uncache) -> str:
method cache_sql (line 1067) | def cache_sql(self, expression: exp.Cache) -> str:
method characterset_sql (line 1077) | def characterset_sql(self, expression: exp.CharacterSet) -> str:
method column_parts (line 1081) | def column_parts(self, expression: exp.Column) -> str:
method column_sql (line 1093) | def column_sql(self, expression: exp.Column) -> str:
method pseudocolumn_sql (line 1102) | def pseudocolumn_sql(self, expression: exp.Pseudocolumn) -> str:
method columnposition_sql (line 1105) | def columnposition_sql(self, expression: exp.ColumnPosition) -> str:
method columndef_sql (line 1111) | def columndef_sql(self, expression: exp.ColumnDef, sep: str = " ") -> ...
method columnconstraint_sql (line 1126) | def columnconstraint_sql(self, expression: exp.ColumnConstraint) -> str:
method computedcolumnconstraint_sql (line 1131) | def computedcolumnconstraint_sql(self, expression: exp.ComputedColumnC...
method autoincrementcolumnconstraint_sql (line 1142) | def autoincrementcolumnconstraint_sql(self, _: exp.AutoIncrementColumn...
method compresscolumnconstraint_sql (line 1145) | def compresscolumnconstraint_sql(self, expression: exp.CompressColumnC...
method generatedasidentitycolumnconstraint_sql (line 1153) | def generatedasidentitycolumnconstraint_sql(
method generatedasrowcolumnconstraint_sql (line 1186) | def generatedasrowcolumnconstraint_sql(
method periodforsystemtimeconstraint_sql (line 1193) | def periodforsystemtimeconstraint_sql(
method notnullcolumnconstraint_sql (line 1198) | def notnullcolumnconstraint_sql(self, expression: exp.NotNullColumnCon...
method primarykeycolumnconstraint_sql (line 1201) | def primarykeycolumnconstraint_sql(self, expression: exp.PrimaryKeyCol...
method uniquecolumnconstraint_sql (line 1209) | def uniquecolumnconstraint_sql(self, expression: exp.UniqueColumnConst...
method inoutcolumnconstraint_sql (line 1221) | def inoutcolumnconstraint_sql(self, expression: exp.InOutColumnConstra...
method createable_sql (line 1239) | def createable_sql(self, expression: exp.Create, locations: t.DefaultD...
method create_sql (line 1242) | def create_sql(self, expression: exp.Create) -> str:
method sequenceproperties_sql (line 1361) | def sequenceproperties_sql(self, expression: exp.SequenceProperties) -...
method triggerproperties_sql (line 1386) | def triggerproperties_sql(self, expression: exp.TriggerProperties) -> ...
method triggerreferencing_sql (line 1415) | def triggerreferencing_sql(self, expression: exp.TriggerReferencing) -...
method triggerevent_sql (line 1426) | def triggerevent_sql(self, expression: exp.TriggerEvent) -> str:
method clone_sql (line 1433) | def clone_sql(self, expression: exp.Clone) -> str:
method describe_sql (line 1439) | def describe_sql(self, expression: exp.Describe) -> str:
method heredoc_sql (line 1450) | def heredoc_sql(self, expression: exp.Heredoc) -> str:
method prepend_ctes (line 1454) | def prepend_ctes(self, expression: exp.Expr, sql: str) -> str:
method with_sql (line 1460) | def with_sql(self, expression: exp.With) -> str:
method cte_sql (line 1472) | def cte_sql(self, expression: exp.CTE) -> str:
method tablealias_sql (line 1490) | def tablealias_sql(self, expression: exp.TableAlias) -> str:
method bitstring_sql (line 1504) | def bitstring_sql(self, expression: exp.BitString) -> str:
method hexstring_sql (line 1510) | def hexstring_sql(
method bytestring_sql (line 1535) | def bytestring_sql(self, expression: exp.ByteString) -> str:
method unicodestring_sql (line 1561) | def unicodestring_sql(self, expression: exp.UnicodeString) -> str:
method rawstring_sql (line 1584) | def rawstring_sql(self, expression: exp.RawString) -> str:
method datatypeparam_sql (line 1592) | def datatypeparam_sql(self, expression: exp.DataTypeParam) -> str:
method datatype_sql (line 1598) | def datatype_sql(self, expression: exp.DataType) -> str:
method directory_sql (line 1649) | def directory_sql(self, expression: exp.Directory) -> str:
method delete_sql (line 1655) | def delete_sql(self, expression: exp.Delete) -> str:
method drop_sql (line 1674) | def drop_sql(self, expression: exp.Drop) -> str:
method set_operation (line 1692) | def set_operation(self, expression: exp.SetOperation) -> str:
method set_operations (line 1725) | def set_operations(self, expression: exp.SetOperation) -> str:
method fetch_sql (line 1762) | def fetch_sql(self, expression: exp.Fetch) -> str:
method limitoptions_sql (line 1771) | def limitoptions_sql(self, expression: exp.LimitOptions) -> str:
method filter_sql (line 1779) | def filter_sql(self, expression: exp.Filter) -> str:
method hint_sql (line 1791) | def hint_sql(self, expression: exp.Hint) -> str:
method indexparameters_sql (line 1798) | def indexparameters_sql(self, expression: exp.IndexParameters) -> str:
method index_sql (line 1818) | def index_sql(self, expression: exp.Index) -> str:
method identifier_sql (line 1832) | def identifier_sql(self, expression: exp.Identifier) -> str:
method hex_sql (line 1847) | def hex_sql(self, expression: exp.Hex) -> str:
method lowerhex_sql (line 1854) | def lowerhex_sql(self, expression: exp.LowerHex) -> str:
method inputoutputformat_sql (line 1860) | def inputoutputformat_sql(self, expression: exp.InputOutputFormat) -> ...
method national_sql (line 1867) | def national_sql(self, expression: exp.National, prefix: str = "N") ->...
method partition_sql (line 1871) | def partition_sql(self, expression: exp.Partition) -> str:
method properties_sql (line 1875) | def properties_sql(self, expression: exp.Properties) -> str:
method root_properties (line 1900) | def root_properties(self, properties: exp.Properties) -> str:
method properties (line 1905) | def properties(
method with_properties (line 1920) | def with_properties(self, properties: exp.Properties) -> str:
method locate_properties (line 1923) | def locate_properties(self, properties: exp.Properties) -> t.DefaultDict:
method property_name (line 1934) | def property_name(self, expression: exp.Property, string_key: bool = F...
method property_sql (line 1939) | def property_sql(self, expression: exp.Property) -> str:
method likeproperty_sql (line 1950) | def likeproperty_sql(self, expression: exp.LikeProperty) -> str:
method fallbackproperty_sql (line 1967) | def fallbackproperty_sql(self, expression: exp.FallbackProperty) -> str:
method journalproperty_sql (line 1972) | def journalproperty_sql(self, expression: exp.JournalProperty) -> str:
method freespaceproperty_sql (line 1981) | def freespaceproperty_sql(self, expression: exp.FreespaceProperty) -> ...
method checksumproperty_sql (line 1986) | def checksumproperty_sql(self, expression: exp.ChecksumProperty) -> str:
method mergeblockratioproperty_sql (line 1995) | def mergeblockratioproperty_sql(self, expression: exp.MergeBlockRatioP...
method datablocksizeproperty_sql (line 2004) | def datablocksizeproperty_sql(self, expression: exp.DataBlocksizePrope...
method blockcompressionproperty_sql (line 2020) | def blockcompressionproperty_sql(self, expression: exp.BlockCompressio...
method isolatedloadingproperty_sql (line 2039) | def isolatedloadingproperty_sql(self, expression: exp.IsolatedLoadingP...
method partitionboundspec_sql (line 2048) | def partitionboundspec_sql(self, expression: exp.PartitionBoundSpec) -...
method partitionedofproperty_sql (line 2060) | def partitionedofproperty_sql(self, expression: exp.PartitionedOfPrope...
method lockingproperty_sql (line 2071) | def lockingproperty_sql(self, expression: exp.LockingProperty) -> str:
method withdataproperty_sql (line 2080) | def withdataproperty_sql(self, expression: exp.WithDataProperty) -> str:
method withsystemversioningproperty_sql (line 2088) | def withsystemversioningproperty_sql(self, expression: exp.WithSystemV...
method insert_sql (line 2109) | def insert_sql(self, expression: exp.Insert) -> str:
method introducer_sql (line 2154) | def introducer_sql(self, expression: exp.Introducer) -> str:
method kill_sql (line 2157) | def kill_sql(self, expression: exp.Kill) -> str:
method pseudotype_sql (line 2164) | def pseudotype_sql(self, expression: exp.PseudoType) -> str:
method objectidentifier_sql (line 2167) | def objectidentifier_sql(self, expression: exp.ObjectIdentifier) -> str:
method onconflict_sql (line 2170) | def onconflict_sql(self, expression: exp.OnConflict) -> str:
method returning_sql (line 2193) | def returning_sql(self, expression: exp.Returning) -> str:
method rowformatdelimitedproperty_sql (line 2196) | def rowformatdelimitedproperty_sql(self, expression: exp.RowFormatDeli...
method withtablehint_sql (line 2211) | def withtablehint_sql(self, expression: exp.With
Condensed preview — 264 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,048K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 565,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Before you fil"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 595,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
},
{
"path": ".github/scripts/get_integration_test_params.py",
"chars": 5987,
"preview": "#!/usr/bin/env python3\n\"\"\"\nThis script is intended to be used as part of a GitHub Actions workflow in order to decide if"
},
{
"path": ".github/scripts/integration_tests_sync.sh",
"chars": 5582,
"preview": "#!/usr/bin/env bash\nset -euo pipefail\n\n# Unset git env vars that leak from parent hook context into submodule commands\nu"
},
{
"path": ".github/workflows/benchmark-sqlglot.yml",
"chars": 2440,
"preview": "name: Benchmark pull requests\n\non:\n pull_request:\n types: [opened]\n issue_comment:\n types: [created]\n\njobs:\n be"
},
{
"path": ".github/workflows/package-publish.yml",
"chars": 4219,
"preview": "name: Publish sqlglot to PyPI\n\non:\n push:\n tags:\n - \"v*\"\n\npermissions:\n contents: read\n\njobs:\n # Build mypyc "
},
{
"path": ".github/workflows/package-test.yml",
"chars": 816,
"preview": "name: Run tests and linter checks\n\non:\n push:\n branches: [ main ]\n pull_request:\n branches: [ main ]\n\njobs:\n ru"
},
{
"path": ".github/workflows/run-integration-tests.yml",
"chars": 5957,
"preview": "name: Run Integration Tests\n\non:\n pull_request:\n types: [opened, synchronize, reopened, edited]\n\njobs:\n should-run:"
},
{
"path": ".gitignore",
"chars": 1955,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".gitmodules",
"chars": 135,
"preview": "[submodule \"sqlglot-integration-tests\"]\n\tpath = sqlglot-integration-tests\n\turl = git@github.com:fivetran/sqlglot-integra"
},
{
"path": ".gitpod.yml",
"chars": 217,
"preview": "image: gitpod/workspace-python-3.11\ntasks:\n - name: sqlglot\n init: |\n python -m venv .venv\n source .venv/b"
},
{
"path": ".pre-commit-config.yaml",
"chars": 1778,
"preview": "repos:\n - repo: local\n hooks:\n - id: sync-integration-tests-commit\n name: sync-integration-tests-commit\n"
},
{
"path": "AGENTS.md",
"chars": 17747,
"preview": "# Contributing to [SQLGlot](https://github.com/tobymao/sqlglot/blob/main/README.md)\n## About SQLGlot\n\nSQLGlot is a no-de"
},
{
"path": "CHANGELOG.md",
"chars": 1792653,
"preview": "Changelog\n=========\n\n## [v30.0.3] - 2026-03-19\n### :zap: Performance Improvements\n- [`f87ebe0`](https://github.com/tobym"
},
{
"path": "CONTRIBUTING.md",
"chars": 3862,
"preview": "<!-- Important: If you are an agent, you must add your model [CLAUDE, CODEX, etc...] to the end of PR titles. -->\n\n# Co"
},
{
"path": "LICENSE",
"chars": 1065,
"preview": "MIT License\n\nCopyright (c) 2026 Toby Mao\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\no"
},
{
"path": "MANIFEST.in",
"chars": 70,
"preview": "prune docs/\nprune posts/\nprune benchmarks/\nprune .github/\nprune pdoc/\n"
},
{
"path": "Makefile",
"chars": 2380,
"preview": ".PHONY: install install-dev install-devc install-devc-release install-pre-commit bench bench-parse bench-optimize test t"
},
{
"path": "README.md",
"chars": 23074,
"preview": "\n\nSQLGlot is a no-dependency SQL parser, transpiler, optimizer, and engine. It can be used t"
},
{
"path": "benchmarks/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "benchmarks/compare.py",
"chars": 3330,
"preview": "#!/usr/bin/env python3\n\"\"\"Compare two benchmark JSON files and output a markdown table with diff indicators.\"\"\"\n\nimport "
},
{
"path": "benchmarks/optimize.py",
"chars": 1910,
"preview": "import sys\nimport os\nimport pyperf\n\n# Add the project root to the path so we can import from tests\nsys.path.insert(0, os"
},
{
"path": "benchmarks/parse.py",
"chars": 14187,
"preview": "import argparse\nimport inspect\nimport json\nimport os\nimport subprocess\nimport sys\nimport tempfile\nimport time\n\n\n# --- Qu"
},
{
"path": "pdoc/cli.py",
"chars": 1342,
"preview": "#!/usr/bin/env python3\n\nfrom importlib import import_module\nfrom pathlib import Path\nfrom unittest import mock\n\nfrom pdo"
},
{
"path": "pdoc/templates/module.html.jinja2",
"chars": 131,
"preview": "{% extends \"default/module.html.jinja2\" %}\n\n{% if module.docstring %}\n {% macro module_name() %}\n {% endmacro %}\n{"
},
{
"path": "posts/ast_primer.md",
"chars": 13569,
"preview": "# Primer on SQLGlot's Abstract Syntax Tree\n\nSQLGlot is a powerful tool for analyzing and transforming SQL, but the learn"
},
{
"path": "posts/onboarding.md",
"chars": 29642,
"preview": "# Table of Contents\n- [Table of Contents](#table-of-contents)\n - [Onboarding](#onboarding)\n - [Tokenizer](#tokenizer)\n"
},
{
"path": "posts/python_sql_engine.md",
"chars": 12086,
"preview": "# Writing a Python SQL engine from scratch\n[Toby Mao](https://www.linkedin.com/in/toby-mao/)\n\n## Introduction\n\nWhen I fi"
},
{
"path": "posts/sql_diff.md",
"chars": 26088,
"preview": "# Semantic Diff for SQL\n*by [Iaroslav Zeigerman](https://github.com/izeigerman)*\n\n## Motivation\n\nSoftware is constantly "
},
{
"path": "pyproject.toml",
"chars": 1305,
"preview": "[project]\nname = \"sqlglot\"\ndynamic = [\"version\", \"optional-dependencies\"]\ndescription = \"An easily customizable SQL pars"
},
{
"path": "setup.cfg",
"chars": 241,
"preview": "[mypy]\ndisallow_untyped_calls = False\nno_implicit_optional = True\n\n[mypy-sqlglot.*]\nignore_errors = False\n\n[mypy-sqlglot"
},
{
"path": "setup.py",
"chars": 808,
"preview": "from setuptools import setup\nfrom setuptools_scm import get_version\n\nversion = get_version(local_scheme=\"no-local-versio"
},
{
"path": "sqlglot/__init__.py",
"chars": 6036,
"preview": "# ruff: noqa: F401, E402\n\"\"\"\n.. include:: ../README.md\n\n----\n\"\"\"\n\nfrom __future__ import annotations\n\n# bootstrap mypyc "
},
{
"path": "sqlglot/__main__.py",
"chars": 2179,
"preview": "from __future__ import annotations\n\nimport argparse\nimport sys\nimport typing as t\n\nimport sqlglot\nfrom sqlglot.helper im"
},
{
"path": "sqlglot/_typing.py",
"chars": 252,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nif t.TYPE_CHECKING:\n import sqlglot\n\nB = t.TypeVar(\"B\", bound"
},
{
"path": "sqlglot/dialects/__init__.py",
"chars": 3733,
"preview": "# ruff: noqa: F401\n\"\"\"\n## Dialects\n\nWhile there is a SQL standard, most SQL engines support a variation of that standard"
},
{
"path": "sqlglot/dialects/athena.py",
"chars": 9554,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens\nfrom sqlglot.dialects"
},
{
"path": "sqlglot/dialects/bigquery.py",
"chars": 33475,
"preview": "from __future__ import annotations\n\nimport logging\nimport re\nimport typing as t\n\n\nfrom sqlglot.optimizer.annotate_types "
},
{
"path": "sqlglot/dialects/clickhouse.py",
"chars": 31982,
"preview": "from __future__ import annotations\n\nimport datetime\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens\nfrom "
},
{
"path": "sqlglot/dialects/databricks.py",
"chars": 4469,
"preview": "from __future__ import annotations\n\nfrom copy import deepcopy\nfrom collections import defaultdict\n\nfrom sqlglot import e"
},
{
"path": "sqlglot/dialects/dialect.py",
"chars": 91970,
"preview": "from __future__ import annotations\n\nimport importlib\nimport logging\nimport typing as t\nimport sys\nfrom collections.abc i"
},
{
"path": "sqlglot/dialects/doris.py",
"chars": 17089,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import (\n approx_count_dist"
},
{
"path": "sqlglot/dialects/dremio.py",
"chars": 4885,
"preview": "from __future__ import annotations\n\nimport typing as t\nfrom sqlglot import expressions as exp\nfrom sqlglot import genera"
},
{
"path": "sqlglot/dialects/drill.py",
"chars": 5414,
"preview": "from __future__ import annotations\n\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlglot.dialects.dialec"
},
{
"path": "sqlglot/dialects/druid.py",
"chars": 802,
"preview": "from sqlglot import exp, generator\nfrom sqlglot.dialects.dialect import rename_func, Dialect\nfrom sqlglot.parsers.druid "
},
{
"path": "sqlglot/dialects/duckdb.py",
"chars": 180077,
"preview": "from __future__ import annotations\n\nfrom decimal import Decimal\nfrom itertools import groupby\nimport re\nimport typing as"
},
{
"path": "sqlglot/dialects/dune.py",
"chars": 444,
"preview": "from __future__ import annotations\n\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.trino import Trino\nfrom sqlglot.parse"
},
{
"path": "sqlglot/dialects/exasol.py",
"chars": 32717,
"preview": "from __future__ import annotations\n\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlglot.errors import U"
},
{
"path": "sqlglot/dialects/fabric.py",
"chars": 8731,
"preview": "from __future__ import annotations\n\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import Normalizat"
},
{
"path": "sqlglot/dialects/hive.py",
"chars": 25712,
"preview": "from __future__ import annotations\n\nimport re\nimport typing as t\nfrom copy import deepcopy\nfrom functools import partial"
},
{
"path": "sqlglot/dialects/materialize.py",
"chars": 2288,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.helper import seq_get\nfrom sqlglot.dialects.pos"
},
{
"path": "sqlglot/dialects/mysql.py",
"chars": 32933,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlg"
},
{
"path": "sqlglot/dialects/oracle.py",
"chars": 9915,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlg"
},
{
"path": "sqlglot/dialects/postgres.py",
"chars": 27110,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlg"
},
{
"path": "sqlglot/dialects/presto.py",
"chars": 29198,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlg"
},
{
"path": "sqlglot/dialects/prql.py",
"chars": 701,
"preview": "from __future__ import annotations\n\nfrom sqlglot import tokens\nfrom sqlglot.dialects.dialect import Dialect\nfrom sqlglot"
},
{
"path": "sqlglot/dialects/redshift.py",
"chars": 13583,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.typing.redshift"
},
{
"path": "sqlglot/dialects/risingwave.py",
"chars": 1622,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.postgres import Postgres\nfrom sqlglot."
},
{
"path": "sqlglot/dialects/singlestore.py",
"chars": 50356,
"preview": "import re\n\nfrom sqlglot import TokenType\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect impor"
},
{
"path": "sqlglot/dialects/snowflake.py",
"chars": 55173,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, jsonpath, tokens, transforms"
},
{
"path": "sqlglot/dialects/solr.py",
"chars": 454,
"preview": "from sqlglot import tokens\nfrom sqlglot.dialects.dialect import Dialect, NormalizationStrategy\nfrom sqlglot.parsers.solr"
},
{
"path": "sqlglot/dialects/spark.py",
"chars": 8721,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import (\n "
},
{
"path": "sqlglot/dialects/spark2.py",
"chars": 10841,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialec"
},
{
"path": "sqlglot/dialects/sqlite.py",
"chars": 13486,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlg"
},
{
"path": "sqlglot/dialects/starrocks.py",
"chars": 11173,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialec"
},
{
"path": "sqlglot/dialects/tableau.py",
"chars": 1789,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlglot.dialects.dialect"
},
{
"path": "sqlglot/dialects/teradata.py",
"chars": 9805,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, generator, tokens, transforms\nfrom sqlg"
},
{
"path": "sqlglot/dialects/trino.py",
"chars": 2879,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, transforms\nfrom sqlglot.dialects.dialect import (\n merge"
},
{
"path": "sqlglot/dialects/tsql.py",
"chars": 32395,
"preview": "from __future__ import annotations\n\nimport typing as t\nfrom functools import reduce\n\nfrom sqlglot import exp, generator,"
},
{
"path": "sqlglot/diff.py",
"chars": 16774,
"preview": "\"\"\"\n.. include:: ../posts/sql_diff.md\n\n----\n\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\nfrom collections"
},
{
"path": "sqlglot/errors.py",
"chars": 4908,
"preview": "from __future__ import annotations\n\nimport typing as t\nfrom enum import auto\nfrom collections.abc import Sequence\nfrom s"
},
{
"path": "sqlglot/executor/__init__.py",
"chars": 2815,
"preview": "\"\"\"\n.. include:: ../../posts/python_sql_engine.md\n\n----\n\"\"\"\n\nfrom __future__ import annotations\n\nimport logging\nimport t"
},
{
"path": "sqlglot/executor/context.py",
"chars": 3386,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.executor.env import ENV\n\nif t.TYPE_CHECKING:\n fr"
},
{
"path": "sqlglot/executor/env.py",
"chars": 8220,
"preview": "import datetime\nimport inspect\nimport re\nimport statistics\nfrom functools import wraps\n\nfrom sqlglot import exp\nfrom sql"
},
{
"path": "sqlglot/executor/python.py",
"chars": 15589,
"preview": "import collections\nimport itertools\nimport math\n\nfrom sqlglot import exp, generator, planner, tokens\nfrom sqlglot.dialec"
},
{
"path": "sqlglot/executor/table.py",
"chars": 4535,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.dialects.dialect import DialectType\nfrom sqlglot.he"
},
{
"path": "sqlglot/expressions/__init__.py",
"chars": 2473,
"preview": "# ruff: noqa: F405\n\"\"\"\n## Exprs\n\nEvery AST node in SQLGlot is represented by a subclass of `Expr`.\n\nThis module contains"
},
{
"path": "sqlglot/expressions/aggregate.py",
"chars": 7099,
"preview": "\"\"\"sqlglot expressions - aggregate, window, and statistical functions.\"\"\"\n\nfrom __future__ import annotations\n\nfrom sqlg"
},
{
"path": "sqlglot/expressions/array.py",
"chars": 7759,
"preview": "\"\"\"sqlglot expressions - array, map, struct, and table-valued functions.\"\"\"\n\nfrom __future__ import annotations\n\nimport "
},
{
"path": "sqlglot/expressions/builders.py",
"chars": 34114,
"preview": "\"\"\"sqlglot expressions builders.\"\"\"\n\nfrom __future__ import annotations\n\nimport re\nimport typing as t\n\nfrom sqlglot._typ"
},
{
"path": "sqlglot/expressions/constraints.py",
"chars": 5423,
"preview": "\"\"\"sqlglot expressions constraints.\"\"\"\n\nfrom __future__ import annotations\n\nfrom sqlglot.expressions.core import Express"
},
{
"path": "sqlglot/expressions/core.py",
"chars": 85070,
"preview": "\"\"\"sqlglot expressions core - base classes, traits, operators, and helpers.\"\"\"\n\nfrom __future__ import annotations\n\nimpo"
},
{
"path": "sqlglot/expressions/datatypes.py",
"chars": 10263,
"preview": "\"\"\"sqlglot expressions datatypes.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\nfrom enum import auto\n\nfrom"
},
{
"path": "sqlglot/expressions/ddl.py",
"chars": 8930,
"preview": "\"\"\"sqlglot expressions DDL.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.helper import trait"
},
{
"path": "sqlglot/expressions/dml.py",
"chars": 15194,
"preview": "\"\"\"sqlglot expressions DML.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.helper import trait"
},
{
"path": "sqlglot/expressions/functions.py",
"chars": 9783,
"preview": "\"\"\"sqlglot expressions functions.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.expressions.c"
},
{
"path": "sqlglot/expressions/json.py",
"chars": 5544,
"preview": "\"\"\"sqlglot expressions - JSON functions.\"\"\"\n\nfrom __future__ import annotations\n\nfrom sqlglot.expressions.core import Ex"
},
{
"path": "sqlglot/expressions/math.py",
"chars": 4289,
"preview": "\"\"\"sqlglot expressions - math, trigonometry, and bitwise functions.\"\"\"\n\nfrom __future__ import annotations\n\nfrom sqlglot"
},
{
"path": "sqlglot/expressions/properties.py",
"chars": 13204,
"preview": "\"\"\"sqlglot expressions properties.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\nfrom enum import auto\n\nfro"
},
{
"path": "sqlglot/expressions/query.py",
"chars": 58065,
"preview": "\"\"\"sqlglot expressions query.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot._typing import E\n"
},
{
"path": "sqlglot/expressions/string.py",
"chars": 12224,
"preview": "\"\"\"sqlglot expressions - string, encoding, hashing, and regex functions.\"\"\"\n\nfrom __future__ import annotations\n\nfrom sq"
},
{
"path": "sqlglot/expressions/temporal.py",
"chars": 12265,
"preview": "\"\"\"sqlglot expressions - date, time, and timestamp functions.\"\"\"\n\nfrom __future__ import annotations\n\nimport typing as t"
},
{
"path": "sqlglot/generator.py",
"chars": 244853,
"preview": "from __future__ import annotations\n\nimport logging\nimport re\nimport typing as t\nfrom collections import defaultdict\nfrom"
},
{
"path": "sqlglot/helper.py",
"chars": 11981,
"preview": "from __future__ import annotations\n\nimport datetime\nimport inspect\nimport logging\nimport re\nimport sys\nimport typing as "
},
{
"path": "sqlglot/jsonpath.py",
"chars": 7942,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nimport sqlglot.expressions as exp\nfrom sqlglot.errors import Par"
},
{
"path": "sqlglot/lineage.py",
"chars": 17033,
"preview": "from __future__ import annotations\n\nimport json\nimport logging\nimport typing as t\nfrom dataclasses import dataclass, fie"
},
{
"path": "sqlglot/optimizer/__init__.py",
"chars": 343,
"preview": "# ruff: noqa: F401\n\nfrom sqlglot.optimizer.optimizer import RULES as RULES, optimize as optimize\nfrom sqlglot.optimizer."
},
{
"path": "sqlglot/optimizer/annotate_types.py",
"chars": 32470,
"preview": "from __future__ import annotations\n\nimport functools\nimport logging\nimport typing as t\n\nfrom sqlglot import exp\nfrom sql"
},
{
"path": "sqlglot/optimizer/canonicalize.py",
"chars": 8541,
"preview": "from __future__ import annotations\n\nimport itertools\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.d"
},
{
"path": "sqlglot/optimizer/eliminate_ctes.py",
"chars": 1626,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.optimizer.scope import Scope, build_scope\n\n\nif t.TY"
},
{
"path": "sqlglot/optimizer/eliminate_joins.py",
"chars": 6064,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sqlglot.optimizer.no"
},
{
"path": "sqlglot/optimizer/eliminate_subqueries.py",
"chars": 6598,
"preview": "from __future__ import annotations\n\nimport itertools\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sql"
},
{
"path": "sqlglot/optimizer/isolate_table_selects.py",
"chars": 1464,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import alias, exp\nfrom sqlglot.errors import Optimi"
},
{
"path": "sqlglot/optimizer/merge_subqueries.py",
"chars": 16780,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom collections import defaultdict\n\nfrom sqlglot import express"
},
{
"path": "sqlglot/optimizer/normalize.py",
"chars": 7005,
"preview": "from __future__ import annotations\n\nimport logging\n\nfrom sqlglot import exp\nfrom sqlglot.errors import OptimizeError\nfro"
},
{
"path": "sqlglot/optimizer/normalize_identifiers.py",
"chars": 2840,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import Dia"
},
{
"path": "sqlglot/optimizer/optimize_joins.py",
"chars": 4120,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import tsort\n\nJOIN_A"
},
{
"path": "sqlglot/optimizer/optimizer.py",
"chars": 3797,
"preview": "from __future__ import annotations\n\nimport inspect\nimport typing as t\nfrom collections.abc import Sequence\nfrom sqlglot "
},
{
"path": "sqlglot/optimizer/pushdown_predicates.py",
"chars": 8938,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.optimizer.normalize import "
},
{
"path": "sqlglot/optimizer/pushdown_projections.py",
"chars": 6703,
"preview": "from __future__ import annotations\n\nimport typing as t\nfrom collections import defaultdict\n\nfrom sqlglot import alias, e"
},
{
"path": "sqlglot/optimizer/qualify.py",
"chars": 4350,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import Dia"
},
{
"path": "sqlglot/optimizer/qualify_columns.py",
"chars": 39568,
"preview": "from __future__ import annotations\n\nimport itertools\nimport typing as t\n\nfrom sqlglot import alias, exp\nfrom sqlglot.dia"
},
{
"path": "sqlglot/optimizer/qualify_tables.py",
"chars": 8642,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import Dia"
},
{
"path": "sqlglot/optimizer/resolver.py",
"chars": 17117,
"preview": "from __future__ import annotations\n\nimport itertools\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.d"
},
{
"path": "sqlglot/optimizer/scope.py",
"chars": 34869,
"preview": "from __future__ import annotations\n\nimport itertools\nimport logging\nimport typing as t\nfrom collections import defaultdi"
},
{
"path": "sqlglot/optimizer/simplify.py",
"chars": 58933,
"preview": "from __future__ import annotations\n\nimport datetime\nimport logging\nimport functools\nimport itertools\nimport typing as t\n"
},
{
"path": "sqlglot/optimizer/unnest_subqueries.py",
"chars": 12012,
"preview": "from sqlglot import exp\nfrom sqlglot.helper import name_sequence\nfrom sqlglot.optimizer.scope import ScopeType, find_in_"
},
{
"path": "sqlglot/parser.py",
"chars": 375516,
"preview": "from __future__ import annotations\n\nimport itertools\nimport logging\nimport re\nimport typing as t\nfrom collections import"
},
{
"path": "sqlglot/parsers/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "sqlglot/parsers/athena.py",
"chars": 2178,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.errors import ErrorLevel\nfr"
},
{
"path": "sqlglot/parsers/base.py",
"chars": 582,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, parser\nfrom sqlglot.tokens import TokenType\n\n\nclass BasePar"
},
{
"path": "sqlglot/parsers/bigquery.py",
"chars": 26416,
"preview": "from __future__ import annotations\n\nimport re\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects."
},
{
"path": "sqlglot/parsers/clickhouse.py",
"chars": 32891,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom collections import deque\n\nfrom sqlglot import exp, parser\nf"
},
{
"path": "sqlglot/parsers/databricks.py",
"chars": 1782,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect import build_date_delt"
},
{
"path": "sqlglot/parsers/doris.py",
"chars": 4756,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import seq_get\nfrom "
},
{
"path": "sqlglot/parsers/dremio.py",
"chars": 3890,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sqlglot import parse"
},
{
"path": "sqlglot/parsers/drill.py",
"chars": 671,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect import build_formatted"
},
{
"path": "sqlglot/parsers/druid.py",
"chars": 108,
"preview": "from __future__ import annotations\n\nfrom sqlglot.parser import Parser\n\n\nclass DruidParser(Parser):\n pass\n"
},
{
"path": "sqlglot/parsers/duckdb.py",
"chars": 15083,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.trie import new_tri"
},
{
"path": "sqlglot/parsers/dune.py",
"chars": 124,
"preview": "from __future__ import annotations\n\nfrom sqlglot.parsers.trino import TrinoParser\n\n\nclass DuneParser(TrinoParser):\n p"
},
{
"path": "sqlglot/parsers/exasol.py",
"chars": 6373,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect im"
},
{
"path": "sqlglot/parsers/fabric.py",
"chars": 1348,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.parsers.tsql import TSQLParser\n\n\nclass FabricPa"
},
{
"path": "sqlglot/parsers/hive.py",
"chars": 10231,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect im"
},
{
"path": "sqlglot/parsers/materialize.py",
"chars": 1392,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import seq_get\nfrom "
},
{
"path": "sqlglot/parsers/mysql.py",
"chars": 22279,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.trie import new_tri"
},
{
"path": "sqlglot/parsers/oracle.py",
"chars": 8730,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect im"
},
{
"path": "sqlglot/parsers/postgres.py",
"chars": 13183,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect im"
},
{
"path": "sqlglot/parsers/presto.py",
"chars": 5336,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.dialects.dialect im"
},
{
"path": "sqlglot/parsers/prql.py",
"chars": 7092,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.helper import seq_g"
},
{
"path": "sqlglot/parsers/redshift.py",
"chars": 4575,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import seq_get\nfrom "
},
{
"path": "sqlglot/parsers/risingwave.py",
"chars": 2314,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.parsers.postgres import Pos"
},
{
"path": "sqlglot/parsers/singlestore.py",
"chars": 10779,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.trie import new_trie\nfrom s"
},
{
"path": "sqlglot/parsers/snowflake.py",
"chars": 51016,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.trie import new_tri"
},
{
"path": "sqlglot/parsers/solr.py",
"chars": 353,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, parser\nfrom sqlglot.tokens import TokenType\n\n\nclass SolrPar"
},
{
"path": "sqlglot/parsers/spark.py",
"chars": 5256,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.trie import new_trie\nfrom s"
},
{
"path": "sqlglot/parsers/spark2.py",
"chars": 4293,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import (\n "
},
{
"path": "sqlglot/parsers/sqlite.py",
"chars": 2373,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.parser import binar"
},
{
"path": "sqlglot/parsers/starrocks.py",
"chars": 5952,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.dialects.dialect import bui"
},
{
"path": "sqlglot/parsers/tableau.py",
"chars": 507,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp, parser\nfrom sqlglot.helper import seq_get\n\n\nclass TableauPa"
},
{
"path": "sqlglot/parsers/teradata.py",
"chars": 7613,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.helper import seq_g"
},
{
"path": "sqlglot/parsers/trino.py",
"chars": 2109,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom sqlglot.parsers.presto impo"
},
{
"path": "sqlglot/parsers/tsql.py",
"chars": 25081,
"preview": "from __future__ import annotations\n\nimport datetime\nimport re\nimport typing as t\n\nfrom sqlglot import exp, parser\nfrom s"
},
{
"path": "sqlglot/planner.py",
"chars": 14631,
"preview": "from __future__ import annotations\n\nimport math\nimport typing as t\n\nfrom sqlglot import alias, exp\nfrom sqlglot.helper i"
},
{
"path": "sqlglot/py.typed",
"chars": 0,
"preview": ""
},
{
"path": "sqlglot/schema.py",
"chars": 27676,
"preview": "from __future__ import annotations\n\nimport abc\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sqlglot.d"
},
{
"path": "sqlglot/serde.py",
"chars": 3124,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import expressions as exp\n\n\nINDEX = \"i\"\nARG_KEY = \""
},
{
"path": "sqlglot/time.py",
"chars": 18400,
"preview": "import typing as t\nimport datetime\n\n# The generic time format is based on python time.strftime.\n# https://docs.python.or"
},
{
"path": "sqlglot/tokenizer_core.py",
"chars": 35096,
"preview": "from __future__ import annotations\n\nimport typing as t\nfrom enum import IntEnum, auto\n\nfrom sqlglot.errors import TokenE"
},
{
"path": "sqlglot/tokens.py",
"chars": 22801,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot.trie import new_trie\n\n# Import Token and TokenType "
},
{
"path": "sqlglot/transforms.py",
"chars": 41981,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import expressions as exp\nfrom sqlglot.errors impor"
},
{
"path": "sqlglot/trie.py",
"chars": 2284,
"preview": "import typing as t\nfrom enum import Enum, auto\nfrom collections.abc import Sequence, Iterable\n\nkey = Sequence[t.Hashable"
},
{
"path": "sqlglot/typing/__init__.py",
"chars": 10471,
"preview": "import typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import subclasses\nfrom builtins import type as Type\n\nExp"
},
{
"path": "sqlglot/typing/bigquery.py",
"chars": 12157,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_ME"
},
{
"path": "sqlglot/typing/clickhouse.py",
"chars": 288,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglot/typing/duckdb.py",
"chars": 1402,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglot/typing/hive.py",
"chars": 1904,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglot/typing/mysql.py",
"chars": 739,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglot/typing/presto.py",
"chars": 1025,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglot/typing/redshift.py",
"chars": 362,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglot/typing/snowflake.py",
"chars": 17420,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import seq_get\nfrom "
},
{
"path": "sqlglot/typing/spark.py",
"chars": 1124,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing.spark2 import EXPRESSION_METADATA\n\n\nEXPR"
},
{
"path": "sqlglot/typing/spark2.py",
"chars": 2617,
"preview": "from __future__ import annotations\n\nimport typing as t\n\nfrom sqlglot import exp\nfrom sqlglot.helper import ensure_list\nf"
},
{
"path": "sqlglot/typing/tsql.py",
"chars": 887,
"preview": "from __future__ import annotations\n\nfrom sqlglot import exp\nfrom sqlglot.typing import EXPRESSION_METADATA\n\nEXPRESSION_M"
},
{
"path": "sqlglotc/MANIFEST.in",
"chars": 71,
"preview": "include pyproject.toml\ninclude setup.py\nrecursive-include sqlglot *.py\n"
},
{
"path": "sqlglotc/pyproject.toml",
"chars": 836,
"preview": "[project]\nname = \"sqlglotc\"\ndynamic = [\"version\"]\ndescription = \"mypyc-compiled extensions for sqlglot\"\nauthors = [{ nam"
},
{
"path": "sqlglotc/setup.py",
"chars": 4539,
"preview": "import os\nimport shutil\n\nfrom setuptools import setup\nfrom setuptools.command.build_ext import build_ext as _build_ext\nf"
},
{
"path": "tests/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "tests/dialects/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "tests/dialects/test_athena.py",
"chars": 15441,
"preview": "from sqlglot import exp\nfrom tests.dialects.test_dialect import Validator\n\n\nclass TestAthena(Validator):\n dialect = \""
},
{
"path": "tests/dialects/test_bigquery.py",
"chars": 181565,
"preview": "from unittest import mock\nimport datetime\nimport pytz\n\nfrom sqlglot import (\n ErrorLevel,\n ParseError,\n TokenEr"
},
{
"path": "tests/dialects/test_clickhouse.py",
"chars": 76126,
"preview": "from datetime import date, datetime, timezone\nfrom sqlglot import exp, parse_one\nfrom sqlglot.dialects import ClickHouse"
},
{
"path": "tests/dialects/test_databricks.py",
"chars": 23649,
"preview": "from sqlglot import exp, transpile, parse_one\nfrom sqlglot.errors import ParseError\nfrom tests.dialects.test_dialect imp"
},
{
"path": "tests/dialects/test_dialect.py",
"chars": 237814,
"preview": "import typing as t\nimport unittest\n\n\nfrom sqlglot import (\n Dialect,\n Dialects,\n ErrorLevel,\n ParseError,\n "
},
{
"path": "tests/dialects/test_doris.py",
"chars": 11810,
"preview": "from tests.dialects.test_dialect import Validator\n\n\nclass TestDoris(Validator):\n dialect = \"doris\"\n\n def test_dori"
},
{
"path": "tests/dialects/test_dremio.py",
"chars": 9445,
"preview": "from tests.dialects.test_dialect import Validator\nfrom sqlglot import parse_one, exp, UnsupportedError, ErrorLevel, tran"
},
{
"path": "tests/dialects/test_drill.py",
"chars": 857,
"preview": "from tests.dialects.test_dialect import Validator\n\n\nclass TestDrill(Validator):\n dialect = \"drill\"\n\n def test_dril"
},
{
"path": "tests/dialects/test_druid.py",
"chars": 982,
"preview": "from sqlglot.dialects.dialect import Dialects\nfrom tests.dialects.test_dialect import Validator\n\n\nclass TestDruid(Valida"
},
{
"path": "tests/dialects/test_duckdb.py",
"chars": 117913,
"preview": "from sqlglot import ParseError, UnsupportedError, exp, parse_one\nfrom sqlglot.generator import logger as generator_logge"
},
{
"path": "tests/dialects/test_dune.py",
"chars": 1258,
"preview": "from sqlglot import exp\nfrom tests.dialects.test_dialect import Validator\n\n\nclass TestDune(Validator):\n dialect = \"du"
},
{
"path": "tests/dialects/test_exasol.py",
"chars": 42854,
"preview": "from sqlglot import exp, transpile, UnsupportedError, ErrorLevel\nfrom tests.dialects.test_dialect import Validator\n\n\ncla"
},
{
"path": "tests/dialects/test_fabric.py",
"chars": 6263,
"preview": "from tests.dialects.test_dialect import Validator\n\n\nclass TestFabric(Validator):\n dialect = \"fabric\"\n maxDiff = No"
},
{
"path": "tests/dialects/test_hive.py",
"chars": 45692,
"preview": "from tests.dialects.test_dialect import Validator\nfrom sqlglot import exp\n\n\nclass TestHive(Validator):\n dialect = \"hi"
},
{
"path": "tests/dialects/test_materialize.py",
"chars": 3529,
"preview": "from tests.dialects.test_dialect import Validator\n\n\nclass TestMaterialize(Validator):\n dialect = \"materialize\"\n\n d"
},
{
"path": "tests/dialects/test_mysql.py",
"chars": 72465,
"preview": "import unittest\nimport sys\n\nfrom sqlglot import UnsupportedError, expressions as exp\nfrom sqlglot.dialects.mysql import "
},
{
"path": "tests/dialects/test_oracle.py",
"chars": 43420,
"preview": "from sqlglot import exp, UnsupportedError, ParseError, parse, parse_one\nfrom tests.dialects.test_dialect import Validato"
},
{
"path": "tests/dialects/test_pipe_syntax.py",
"chars": 18795,
"preview": "from tests.dialects.test_dialect import Validator\n\n\nclass TestPipeSyntax(Validator):\n def test_select(self):\n "
},
{
"path": "tests/dialects/test_postgres.py",
"chars": 89141,
"preview": "from sqlglot import ParseError, UnsupportedError, exp, transpile\nfrom sqlglot.helper import logger as helper_logger\nfrom"
},
{
"path": "tests/dialects/test_presto.py",
"chars": 56298,
"preview": "from sqlglot import UnsupportedError, exp, parse_one\nfrom sqlglot.helper import logger as helper_logger\nfrom tests.diale"
},
{
"path": "tests/dialects/test_prql.py",
"chars": 5149,
"preview": "from tests.dialects.test_dialect import Validator\n\n\nclass TestPRQL(Validator):\n dialect = \"prql\"\n\n def test_prql(s"
},
{
"path": "tests/dialects/test_redshift.py",
"chars": 38056,
"preview": "from sqlglot import exp, ParseError, parse_one, transpile\nfrom sqlglot.optimizer.annotate_types import annotate_types\nfr"
}
]
// ... and 64 more files (download for full content)
About this extraction
This page contains the full source code of the tobymao/sqlglot GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 264 files (7.3 MB), approximately 1.9M tokens, and a symbol index with 5289 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.