Conversation
The data-group replay gate aborted after a hardcoded 60s. A restart whose last log entry is an election no-op can sit one index short of commit_index for that whole budget, then fail startup. - add [server] data_group_recovery_timeout_ms, default 60000 - pass it through await_cluster_ready into await_data_group_recovery
Each value tuple became its own PointInsert task. One statement emitted INSERT 0 1 per row, and drivers read rowcount 1. - accumulate plain rows in insert/convert.rs and emit one BatchInsert - keep per-row tasks for ON CONFLICT DO NOTHING and CRDT rows
kv writes reported no affected count, so pgwire emitted a bare OK. - report affected = 1 in execute_kv_insert and execute_kv_put - map KvOp::Insert, KvOp::Put, KvOp::BatchPut to the INSERT tag
ARRAY[0.1, 0.2, 0.3] folds its literals to Decimal. extract_vector_floats kept Float and Integer, dropped the rest, and reported "got 0 elements" as XX000. - accept Float, Integer, Decimal, and numeric String elements - reject a non-numeric element by index and type - refuse non-finite values
The binary_tuple wrap sites turned every non-UnknownStrictField error into a Serialization error. A BadRequest surfaced as XX000 with no SQLSTATE. - preserve BadRequest at the four wrap sites
The document materializer scanned every source. A kv source read an empty document store, so INSERT ... SELECT copied no rows and reported INSERT 0 0. - route on the catalog engine in clone_materializer/auto_source.rs - kv normalizes the materialize-scan page to the copy entry shape - refuse columnar, timeseries, spatial, array by name
Derived-relation inference listed declared columns only. The response layer appends a synthetic distance cell, so s.distance failed 42703 on a closed schema. - append distance when ORDER BY carries vector_distance(...)
KvOp::Scan carried no projection list and no computed columns. Every expression projection over a kv source shaped to NULL. - add projection and computed_columns to KvOp::Scan - evaluate both in the kv scan handler; keep plain projections full-row - update all KvOp::Scan constructors - add the kv_select_expressions wire case
SELECT x/0 FROM (SELECT 1 AS x) s answered one NULL row. The same expression over a collection raised 22012. - evaluate computed columns per row on the materialized-row scan - lower aggregates over a non-Scan body to a ProviderScan sub-plan - carry window specs through the post-processor - add the derived_expression_errors wire case
The projection list named an unaliased expression by its lowercased SQL text; the window spec used the verbatim text. The alias match never fired and the projection shaped to NULL. - add unaliased_projection_alias and use it at every naming site
Partitions were consumed in arrival order. row_number numbered by arrival and the rank family compared wrong neighbours whenever the window ORDER BY differed from the query's. - sort each partition by the spec's order keys - evaluate keys on singleton partitions so ordering errors still fail
CREATE TYPEGUARD answered 42P01 on an existing collection. The handlers read DatabaseId::DEFAULT while collections live under the session database. - thread database_id through the seven handlers and validate_typeguard
CONVERT rebuilt the strict schema from the column list and dropped the source key. Every later insert failed "no resolved primary key". - mark the source key column in the converted schema - refuse a column list that omits it with 42601
A guard DEFAULT or VALUE naming another column became a strict column DEFAULT. That DEFAULT evaluates with no row in scope, so every insert raised UnevaluableDefault. - add default_expr_references_columns in nodedb-sql - refuse the guard at CONVERT, naming field and clause
Contributor
Author
|
Superseded: settling locally before opening for review. |
Contributor
Author
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.
Summary
Fixes nine open issues (#295, #296, #297, #305, #306, #311, #314, #317,
#318) across SQL planning and execution, the kv engine, the graph DSL,
sequences, and the timeseries read path. 26 commits over
124cc53a6;verified at
fdba3e378. A full local CI-parity run over this exact tree isgreen (see Validation).
SELECT x/0 FROM (SELECT 1 AS x) sraises22012). Supersedes the closed PR fix(sql): raise expression errors over constant derived tables #321.INSERT 0 nper multi-row INSERT: plain document rows batch into oneBatchInsertpage; kv insert and put report an affected count and answerINSERT 0 ninstead of a bareOK.s.distanceover a SEARCH derived table on a closed schema: derived-relation inference declares the syntheticdistancecolumn when the query orders byvector_distance(...).ARRAY[0.1, 0.2, 0.3]into a strictVECTOR(3): element coercion accepts Float/Integer/Decimal/numeric String and rejects a non-numeric element by index and type; thebinary_tuplewrappers preserveBadRequest, so a client value error is never XX000.INSERT ... SELECTfrom a kv source copied 0 rows: the source scan routes on the collection's own engine (document and kv; other engines are refused by name).nextval(...)projections returned NULL: the value is stamped on the control plane at the response boundary, once per output row, across pgwire, native, and NDJSON responses. A from-lessnextvalprojection evaluates; the stamp path records the session'scurrval; a missing sequence raises42704(the shaper keeps its own sqlstate instead of falling to XX000).CONVERTcarries the source primary key, and a guardDEFAULTorVALUEthat references another column is refused at declaration.Also fixes two silent engine defects on the same paths:
SELECT upper(v) FROM kvanswered NULL:KvOp::Scancarries the projection list and computed columns and evaluates them per row.PointInsertshape (which settles correctly); purely co-resident pages keep their single page.Behaviour changes
SELECT,RETURNING, native stream, NDJSON body withnextval(...)INSERTwith more than one rowINSERT 0 ncurrval(...)after a stampednextval(...)not yet definedCONVERTwithout the source key column42601Compatibility
Pre-1.0, no migration:
CONVERTthat omits the source primary key fails instead of minting identities.Validation
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features --profile ci -- -D warningsscripts/ci/*)cargo deny checkrustlsto 0.23.45 for RUSTSEC-2026-0285)cargo nextest run --workspace --all-features(fast suite)cargo nextest run -p nodedb-cluster-tests --all-featurescargo check --target wasm32-unknown-unknowntrioscripts/ci/*)Local parity reaches everything except CodeQL, release packaging, and secret
scanning, which need GitHub-hosted runners; those report as not run until the
PR CI does them.
Note on the test environment
nextestneedsRUST_MIN_STACK=33554432, the value.github/workflows/test.ymlsets. On the 2 MiB default, two kv surrogatetests (
kv_incr_on_fresh_key_persists_a_real_surrogate,kv_transfer_persists_two_distinct_surrogates) abort with atokio-rt-workerstack overflow — on cleanmainas well, so that gappredates this branch. Four cluster tests excluded by
.config/nextest.tomlfrom the CI profile (CI-only Calvin-completion hangs) remain excluded here.
Closes #295, closes #296, closes #297, closes #305, closes #306, closes #311, closes #314, closes #317, closes #318