feat: SQL translator with ClickHouse dialect#1
Merged
Merged
Conversation
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against 4b87f0d |
Adds the repo plumbing the rest of the branch builds on:
- pyproject (uv build backend, mypy strict, 100% branch coverage gate,
clickhouse-connect dev dep)
- Makefile (install / lint / typecheck / test)
- pre-commit (ruff, uv-lock, flagsmith-lint-tests, local mypy)
- GitHub Actions CI: lint → typecheck → ClickHouse docker-compose →
test → cobertura coverage gate
- engine-test-data submodule pinned at v3.7.0
- docker-compose for the ClickHouse parity harness
- CODEOWNERS, renovate, .python-version, gitignore additions
- py.typed marker and empty package skeleton
beep boop
beep boop
This was referenced May 15, 2026
emyller
approved these changes
May 18, 2026
emyller
left a comment
There was a problem hiding this comment.
I've read the docs, and glanced through tests, and all the code. Honestly trusting engine test and coverage results more than my thoroughness in reviewing this, but also honestly this looks good to experiment with.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to Flagsmith/flagsmith#5663.
Scaffold, translator,
Dialectprotocol, and the first dialect (ClickHouse) forflagsmith-sql-flag-engine— sibling toflagsmith-flag-engine(Python) andflagsmith-rust-flag-engine(Rust). TranslatesSegmentContextpredicate trees into SQLWHEREexpressions.Public API
EnvironmentContext.keylands directly as theenvironment_idliteral in emitted SQL — no separate integer PK.What's included
src/layout,py.typedDialectprotocol withClickHouseDialect(nativeJSONcolumn, typed subcolumns)v3.7.0SnowflakeDialectfollows in #9.Operator coverage
EQUAL,NOT_EQUAL,INIS_SET,IS_NOT_SETIS NOT NULL/IS NULLCONTAINS,NOT_CONTAINSGREATER_THAN,LESS_THANplus_INCLUSIVEMODULOPERCENTAGE_SPLITREGEX:semver-marked comparators