Repository navigation
Query: shapes the service refuses that ExtendDB accepts or words differently (measured 2026-10-23) #489
Description
Summary
Query shapes the service refuses and ExtendDB accepts or words differently, measured on the service on 2026-10-23 and 2026-10-24 while working #435, #440 and #427 (each row repeated, identical answers). None is changed by #479, #481 or #483; they are collected here so each can be fixed on its own. Table pk S and sk S unless stated; ExtendDB answers are from main at 744ea29.
Key condition
| Request | Service | ExtendDB |
|---|---|---|
sk BETWEEN :l AND :u with :l above :u (also legacy KeyConditions BETWEEN) |
ValidationException: One or more parameter values were invalid: The BETWEEN condition was provided a range where the lower bound is greater than the upper bound |
200 with no items |
pk = :a AND pk = :b, pk > :x AND pk < :y, sk > :x AND sk < :y, pk = :p AND sk = :a AND sk = :b |
ValidationException: Invalid KeyConditionExpression: KeyConditionExpressions must only contain one condition per key |
200 with no items |
pk = :x AND z > :x (second clause on a non-key attribute) |
ValidationException: Query condition missed key schema element: sk |
200 with no items |
pk <> :x, pk <> :x AND sk = :y, NOT pk = :x, pk = :x OR sk = :y, pk IN (:x), contains(pk, :x) |
ValidationException: Invalid KeyConditionExpression: Invalid operator used in KeyConditionExpression |
Invalid KeyConditionExpression: Unsupported operator on KeyCondition: NE and other texts |
pk = :v with :v = {"N": "1"*39} on an N key (38 digits is accepted) |
ValidationException: Attempting to store more than 38 significant digits in a Number |
200; with 2049 digits the key size sentence after #481 |
pk = :v with :v = {"S": "a"} on an N key |
ValidationException: One or more parameter values were invalid: Condition parameter type does not match schema type |
InternalServerError (covered by #429) |
sk >= :v with :v = {"N": "1"} on an S sort key, with or without an ExclusiveStartKey |
the type sentence above | InternalServerError (#429 should cover the sort key bound too) |
begins_with(pk, :n) with :n = {"N": "1"} on an N key |
ValidationException: Invalid KeyConditionExpression: Incorrect operand type for operator or function; operator or function: begins_with, operand type: N |
Query key condition not supported after #479 (#429's domain) |
Other request members
| Request | Service | ExtendDB |
|---|---|---|
pk = :p with FilterExpression="pk = :p" (filter on a key attribute) |
ValidationException: Filter Expression can only contain non-primary key attributes: Primary key attribute: pk |
200 |
pk = :p with FilterExpression="z = :z" and :z not in ExpressionAttributeValues |
ValidationException: Invalid FilterExpression: An expression attribute value used in expression is not defined; attribute value: :z |
200 with no items (noticed only at evaluation) |
Select=ALL_PROJECTED_ATTRIBUTES without an IndexName |
ValidationException: 1 validation error detected: ALL_PROJECTED_ATTRIBUTES can be used only when Querying using an IndexName |
same sentence without the 1 validation error detected: prefix |
FilterExpression="nope(" |
ValidationException: Invalid FilterExpression: Syntax error; token: "<EOF>", near: "(" |
Invalid FilterExpression: followed by ExtendDB's own parser text |
ProjectionExpression="a,,b" |
ValidationException: Invalid ProjectionExpression: Syntax error; token: ",", near: ",,b" |
Invalid ProjectionExpression: followed by ExtendDB's own parser text |
Page end on a base table with a sort key condition
When the next row exists but fails the condition, the service returns no LastEvaluatedKey (10 of 10): sk < :v with :v = z over a, aa, ab, d1, d2, d3, m, z and Limit 7; forward begins_with(sk, :v) with :v = a over a, aa, ab and Limit 3. ExtendDB returns the key and the next request answers an empty page. #483 drops the key when the page ends at a bound by value; this case needs a look-ahead read of one more row. At the end of a partition with no sort key condition the service's trailing key is non-deterministic (#434) and nothing changes there.
Cassandra
| Request | Service, SQLite, PostgreSQL | Cassandra |
|---|---|---|
| Any Query on a GSI or LSI with two or more RANGE attributes, with or without a RANGE clause, any value size | the page or the measured refusal | InternalServerError; node log Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY, because the index data table's clustering key is sk_s, sk2_s, ..., base_pk and the Query emits ORDER BY sk_s, base_pk. The single sort key model also drives the pagination restrictions and the start key read, so this is not a one-line change. The #481 wire rows skip on this backend with the reason named. |
begins_with(sk, :p) where an item's sort key equals the prefix followed by U+10FFFF, or is longer with that character next |
the item is returned | the item is excluded: string_upper_bound appends U+10FFFF instead of incrementing the last character; the binary variant increments and is exact |
Activity
LeeroyHannigan commentedon Oct 25, 2026
Where each row stands against the open PRs, checked today:
Fixed by an open PR:
pk = :a AND pk = :band the other three two-condition shapes: Query accepts a KeyConditionExpression with two conditions on the partition key #430, fixed by fix(core): refuse a second condition on a key in KeyConditionExpression #484.Nkey condition value: fix(query): check Query values against the key schema and the number rules #544.pk = :vwith anSvalue on an N key, andsk >= :vwith anNvalue on an S sort key: the key schema type check in fix(query): check Query values against the key schema and the number rules #544.:zinFilterExpression: fix(expressions): validate in the service's order, with its messages #399, carried by fix(query): check legacy conditions against the key schema #507.ProjectionExpression="a,,b": fix(expression): operator cap, syntax error wording, PutItem map keys #558.Select=ALL_PROJECTED_ATTRIBUTESwithout anIndexName: fix(select): add the validation prefix to the ALL_PROJECTED_ATTRIBUTES refusal #583.Partly fixed:
KeyConditionsform, notKeyConditionExpression.No open PR yet:
pk = :x AND z > :xpk <> :x,NOT pk = :x,pk = :x OR sk = :y,pk IN (:x)andcontains(pk, :x)begins_with(pk, :n)with anNoperandFilterExpression="pk = :p", a filter on a key attributeFilterExpression="nope("LastEvaluatedKeyrowbegins_withbound at U+10FFFF