You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INSERT INTO dst (id) SELECT <expr> FROM src silently writes NULL for the
expression column when the source is a kv-engine collection. The
copy_rows column-map drops expression projections for kv sources, so the
cell is never evaluated — no error, no value.
The same gap remains on the INSERT..SELECT source path for kv: an
accessor there (SELECT nextval('s') FROM kvsrc) inserts NULL silently
instead of raising 0A000 like document/columnar sources do. Pinned as a
known gap in the sequence_matrix wire suite (in-test note).
Expected
Expression cells over kv sources evaluate per row with the same semantics
as other engines (or fail loudly, never silently NULL).
CREATE COLLECTION kvsrc (id BIGINTPRIMARY KEY, v TEXT) WITH (engine ='kv');
INSERT INTO kvsrc (id, v) VALUES (1, 'hello');
CREATE COLLECTION dst (id BIGINTPRIMARY KEY, v TEXT) WITH (engine ='document_schemaless');
INSERT INTO dst (id) SELECTupper(v) FROM kvsrc;
SELECT*FROM dst; -- v is NULL instead of 'HELLO'-- accessor form: INSERT INTO dst (id) SELECT nextval('s') FROM kvsrc; -- NULL, no 0A000
Reproduced on main dd2ed01 and on the PR #307 branch (the gap is in the
copy_rows column-map for kv sources, independent of the kv scan fix).
Summary
INSERT INTO dst (id) SELECT <expr> FROM srcsilently writes NULL for theexpression column when the source is a kv-engine collection. The
copy_rows column-map drops expression projections for kv sources, so the
cell is never evaluated — no error, no value.
Evidence
SELECT 1 + 1 FROM kvreturned an empty column until kv scan projectionswere fixed in feat(sql): evaluate sequence accessors in constant contexts and kv projections #307 (KvOp::Scan now carries projection + computed columns).
accessor there (
SELECT nextval('s') FROM kvsrc) inserts NULL silentlyinstead of raising 0A000 like document/columnar sources do. Pinned as a
known gap in the sequence_matrix wire suite (in-test note).
Expected
Expression cells over kv sources evaluate per row with the same semantics
as other engines (or fail loudly, never silently NULL).
Related: #303, #307, #294
Reproduction
Reproduced on main dd2ed01 and on the PR #307 branch (the gap is in the
copy_rows column-map for kv sources, independent of the kv scan fix).