Repository navigation
docs(specs): NULL semantics of restriction and its complement; current system requirements - #307
Open
dimitri-yatsenko wants to merge 3 commits into
Open
dimitri-yatsenko wants to merge 3 commits into
dimitri-yatsenko wants to merge 3 commits into
Conversation
Specify restriction by a query expression for v2.3.7: - query-algebra: matching is on all shared attributes, not only the primary key; new section 2.10 NULL Semantics (NULL never matches, A & B and A - B partition A, consistent with join; string and dict conditions keep SQL three-valued logic); a Partition row in the algebraic properties; new section 13.4.1 with the compiled SQL (IN for A & B, correlated NOT EXISTS for A - B, negation pushed through lists, wrapping of aggregation, union and Top operands); Union SQL in 7.5 and 13.7; subquery tables in 11 and 13.9. Sections 2.10 and 2.11 are renumbered to 2.11 and 2.12. - MySQL minimum 8.0.18 in installation, database-backends (with the reason, and the warning on connect below it), migrate-to-v20 and README. - Short notes in operators, explanation/query-algebra, how-to/query-data and the semantic-matching spec.
Python 3.10 - 3.15 (requires-python >=3.10,<3.16), MySQL 8.0.18+ or PostgreSQL 15+, the database drivers, and Graphviz as an optional system package for diagrams. Platform support lists the Python versions CI runs (3.10, 3.14, 3.15) and the database versions it tests against.
- 13.4.1: B's own SQL lists columns without a space after the comma, the shared attributes follow B's heading order, and the operand wrapper uses a lowercase "as", as the code emits them. - 2.10: under the old NOT IN, a row of A with NULL in a shared attribute could be in neither result, not always; state when. - 13.4.1: state exactly when NOT IN is NULL rather than true. - 13.4.1: note that a negated multi-attribute dict was wrong before 2.3.7, and that an operand with no shared attributes is evaluated by a separate query. The wrapping of a dj.Top-limited operand (sections 11, 13.4.1, 13.9) depends on datajoint-python#1657; without it, A & B with a limited B fails on MySQL with error 1235.
dimitri-yatsenko
requested review from
MilagrosMarin,
lum-agilyti and
ttngu207
November 10, 2026 19:32
This branch has not been deployed
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.
Specifies the behavior that datajoint/datajoint-python#1663 ships in 2.3.7, and updates the system requirements.
Spec (
reference/specs/query-algebra.md)A & Band its complementA - Bpartition A. String and dict conditions follow SQL's three-valued logic and carry no such guarantee. A "Changed in 2.3.7" note describes the oldNOT INbehavior.A - Bthe complement ofA & B.A & B(IN) andA - B(correlatedNOT EXISTS), checked against the code on MySQL and PostgreSQL.reference/operators.md,explanation/query-algebra.md,how-to/query-data.mdandreference/specs/semantic-matching.md. The last is a one-line change that stays clear of docs(semantic-matching): unrelated namesakes, not missing lineage #305's edits.System requirements
how-to/installation.md:requires-python >=3.10,<3.16.datajoint[postgres]for PostgreSQL.reference/specs/database-backends.md: the MySQL minimum rises from 8.0.13 to 8.0.18. It explains why: on 8.0.17,DELETE,HAVINGandORwith theNOT EXISTSform took more than 60 s, against 0.1 to 0.7 s on 8.0.18. Below 8.0.18 the client warns on connect and keeps working.README.mdandhow-to/migrate-to-v20.md: the same requirements.Notes
A & (B & dj.Top(...))fails on MySQL with error 1235.about/whats-new-*.mdis untouched because docs(whats-new): changes in 2.3.5 #304 edits it.mkdocs build --strictran clean before the final spec fix-up commit, which changes only text insidequery-algebra.md.