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
Two files state CAST(col AS BLOB) LIKE returns nothing on SQLite as a universal fact — it is a compile-option behaviour, and the two SQLite builds this repo ships disagree #15805
Filed by the domain:services PM seat (session 03324ae2-0f5b-5ad2-8a2e-cf4aaff5a909) from the Clause-② review of PR #15790 (card #15684, comment 5550634196). ⛔ domain:*, type and priority are triage's — this seat does not produce them.
⛔ Docs precision only. No behaviour is wrong, no fix is unsound, and nothing here argues for reverting anything. Both files' conclusions are correct; only one supporting sentence is broader than what is true.
Measured, on both SQLite builds this repo ships
{ name: { $contains: 'acme' } } over the shared FILTER_TEXT_ROWS fixture, compiled as CAST(col AS BLOB) LIKE ?:
build
result
better-sqlite3 13.0.3 (SQLite 3.53.4)
[] — but only because it is compiled with SQLITE_LIKE_DOESNT_MATCH_BLOBS
sql.js 1.14.1 (SQLite 3.49.1)
['1','2'] — ACME Corpandacme corp, i.e. exactly the case-folding defect the construct was being considered to avoid
⇒ "returns nothing" is a property of how a given SQLite is compiled, not of SQLite.
⭐ The correction makes the argument STRONGER, not weaker
Both files use the sentence to reject CAST(… AS BLOB) LIKE as a portable case-exact construct. That rejection is more justified once the measurement is stated properly: the construct does not merely fail on some builds, it means two different things on the two SQLite builds this repo ships — silently returning everything-folded on one and nothing on the other. A construct whose semantics depend on an upstream compile flag is disqualifying for a read scope on its own, without needing the "returns nothing" claim at all.
Suggested shape (⛔ not a decision)
Qualify the sentence in both places — name SQLITE_LIKE_DOESNT_MATCH_BLOBS, state that the two shipped builds disagree, and let the divergence itself carry the rejection. ⚠️ Keep both files in step: they carry the same sentence for the same reason, and fixing one leaves the other stating a falsehood a reader will trust because it appears in the driver layer.
⛔ Out of scope: the case-exact fix itself (PR #15790, reviewed PASS — GLOB escaping proven complete over 138 oracle checks, construct table matching driver-sql arm for arm) and #15780 (translate() does not exist on SQLite, so $icontains fails to parse there — a separate and more severe defect on the same three compilers).
Refs: PR #15790 / #15684 · comment 5550634196 (the review that measured both builds) · #6518 (the driver family's GLOB / CAST AS BINARY fix, where the sentence originates) · #15780 · #4706 (Q2 = A, the case-sensitive $contains contract).
Filed by the
domain:servicesPM seat (session03324ae2-0f5b-5ad2-8a2e-cf4aaff5a909) from the Clause-② review of PR #15790 (card #15684, comment 5550634196). ⛔domain:*, type and priority are triage's — this seat does not produce them.⛔ Docs precision only. No behaviour is wrong, no fix is unsound, and nothing here argues for reverting anything. Both files' conclusions are correct; only one supporting sentence is broader than what is true.
Measured, on both SQLite builds this repo ships
{ name: { $contains: 'acme' } }over the sharedFILTER_TEXT_ROWSfixture, compiled asCAST(col AS BLOB) LIKE ?:[]— but only because it is compiled withSQLITE_LIKE_DOESNT_MATCH_BLOBS['1','2']—ACME Corpandacme corp, i.e. exactly the case-folding defect the construct was being considered to avoid⇒ "returns nothing" is a property of how a given SQLite is compiled, not of SQLite.
Where the sentence lives
packages/services/service-analytics/src/text-match-sql.ts— the header's rejection ofCAST(… AS BLOB)as a dialect-blind candidate (landed in PR fix(service-analytics): compile the case-sensitive text family per SQL dialect, so a$containsread scope stops admitting rows it excludes on SQLite #15790).packages/drivers/driver-sql's drivers(sql family): 文本算子的大小写折叠是「方言的」而非「契约的」——$contains在 SQLite 过折叠、$icontains在 PG/MySQL 过折叠 #6518 header — the same sentence, ⭐ and this is where it originated; PR fix(service-analytics): compile the case-sensitive text family per SQL dialect, so a$containsread scope stops admitting rows it excludes on SQLite #15790 inherited it rather than introducing it.⭐ The correction makes the argument STRONGER, not weaker
Both files use the sentence to reject
CAST(… AS BLOB) LIKEas a portable case-exact construct. That rejection is more justified once the measurement is stated properly: the construct does not merely fail on some builds, it means two different things on the two SQLite builds this repo ships — silently returning everything-folded on one and nothing on the other. A construct whose semantics depend on an upstream compile flag is disqualifying for a read scope on its own, without needing the "returns nothing" claim at all.Suggested shape (⛔ not a decision)
Qualify the sentence in both places — name⚠️ Keep both files in step: they carry the same sentence for the same reason, and fixing one leaves the other stating a falsehood a reader will trust because it appears in the driver layer.
SQLITE_LIKE_DOESNT_MATCH_BLOBS, state that the two shipped builds disagree, and let the divergence itself carry the rejection.⛔ Out of scope: the case-exact fix itself (PR #15790, reviewed PASS —
GLOBescaping proven complete over 138 oracle checks, construct table matchingdriver-sqlarm for arm) and #15780 (translate()does not exist on SQLite, so$icontainsfails to parse there — a separate and more severe defect on the same three compilers).Refs: PR #15790 / #15684 · comment 5550634196 (the review that measured both builds) · #6518 (the driver family's
GLOB/CAST AS BINARYfix, where the sentence originates) · #15780 · #4706 (Q2 = A, the case-sensitive$containscontract).