Repository navigation
fix(query): refuse a key condition with no HASH equality the way the service does - #479
LeeroyHannigan wants to merge 22 commits into
Conversation
f15581d to
9fc4ba3
Compare
…service does Closes #427. A Query whose KeyConditionExpression has no equality clause on the HASH attribute was refused with a parser sentence of ExtendDB's own. The service chooses the sentence from the key schema. Measured on 2026-10-23, every row repeated with identical answers: - Single HASH attribute, any clause names it (so the clause on it is a non-equality): "Query key condition not supported". Rows: pk > :x, pk BETWEEN :x AND :y, begins_with(pk, :x), pk > :x AND sk = :y, sk = :x AND pk > :y, zz = :x AND pk > :y, and the GSI forms. - Single HASH attribute, no clause names it: "Query condition missed key schema element: <HASH>". Rows: sk > :x, zz > :x, sk > :x AND zz > :y, zz = :x AND yy = :y, and the GSI forms naming the index HASH attribute. - Several key attributes (two HASH attributes, or one HASH with several RANGE attributes): "HASH key attributes h1, h2 must have equality conditions specified in the query", naming every HASH attribute, for every operator and for an N value on the HASH attribute. - Two conditions on one attribute: "Invalid KeyConditionExpression: KeyConditionExpressions must only contain one condition per key". - An undefined #name or :value in the key condition is refused first, with the "Invalid KeyConditionExpression: " prefix. The rows include pk = :x with no values. - Single HASH attribute, a value of the wrong type: pk > :n with an N value on an S key answers "One or more parameter values were invalid: Condition parameter type does not match schema type", and begins_with(pk, :n) on an N key answers "Invalid KeyConditionExpression: Incorrect operand type for operator or function; operator or function: begins_with, operand type: N". - Legacy KeyConditions is desugared with every reference defined and an equality clause, or refused there; no change. Measured on 2026-11-01, two samples each, on a single HASH attribute schema: two conditions on one attribute answer the one condition per key sentence whatever their value types (pk > :x AND pk < :n). A wrong-typed value is reported only in the clause on the HASH attribute: pk > :n AND sk > :y, sk = :x AND pk > :n and pk BETWEEN :n AND :m answer the type sentence, and pk > :x AND sk > :n answers "Query key condition not supported". With no clause on the HASH attribute no value is checked: sk > :n answers "Query condition missed key schema element: pk", and on an index with HASH gsi1_pk and RANGE SK, PK > :n (PK the table's HASH attribute) and SK > :n answer "Query condition missed key schema element: gsi1_pk". On a table with HASH pk (N) and RANGE sk (S), begins_with(pk, :n) AND sk > :x and sk > :x AND begins_with(pk, :n) answer the begins_with operand type sentence, as begins_with(pk, :n) alone does. Ordering, measured: unused values, filter syntax, projection syntax, the Select conflicts and undefined key references are reported before this refusal; an ExclusiveStartKey fault and an oversized key value after it. An unused value and an invalid FilterExpression are also reported before the type sentence for pk > :n (measured again on 2026-10-31). The refusal is in crates/core/src/expression/key_condition/no_hash_equality.rs, with KeyCondition::lacks_hash_equality, refuse_two_conditions_on_one_attribute, operands_naming and refuse_without_hash_equality, and KeyCondition::validate_references is in key_condition/references.rs. The parser now records one or two clauses with no equality instead of refusing them, so the engine can choose the sentence. When only the second of two such clauses is a begins_with, the parser keeps that clause whole as the sort key condition, which the begins_with check reads. handle_query skips the classification from #429 for a key condition with no equality clause, and on a single HASH attribute schema for an equality on another attribute paired with a non-equality on the HASH attribute (sk = :x AND pk > :y). Every other key condition goes through that classification as before. After validate_select_projection, handle_query calls the engine's refuse_without_hash_equality. It checks the references of every key condition and refuses the ones the classification skipped. It refuses two conditions on one attribute first. Then, on a single HASH attribute schema and only when a clause names the HASH attribute, it runs the type check and the begins_with check from #429 on that clause, against that attribute's definition. Then it refuses with the key schema's wording. On a multi-attribute key schema no value is checked, because the service answers h > :n with the HASH sentence. LeadingKeys keeps the binding from #511. query_kce_without_a_partition_key_equality_binds_only_a_partition_operand asserts the values it binds for the shapes the parser now records, and the_engine_still_refuses_every_shape_whose_operand_is_now_bound asserts that the core refusal answers "Query key condition not supported" for each shape it binds. Tests: unit tests in no_hash_equality/tests.rs, references.rs and crates/engine/src/query/no_hash_equality_tests.rs. The wire file tests/python/test_query_lone_non_equality.py has 83 rows. 67 of them passed against the service as a file; the other 16 repeat requests measured on 2026-10-23 (427-8c, row 6, and rows 5a and 5b with the N value) and on 2026-11-01 (the ten rows of TestValueTypes, two of them on the file's single-idx in place of the measured index, and the two begins_with rows on a table with HASH pk (N) and RANGE sk). All 83 pass on SQLite and PostgreSQL 16 builds of this commit, and a SQLite build of main at f49c5f8 fails 76 of them. Related behaviour, measured: "<>", NOT, OR, IN and contains in a key condition get "Invalid operator used in KeyConditionExpression" on the service; pk = :x AND z > :x gets "missed key schema element: sk" on the service and 200 here; the Select ALL_PROJECTED_ATTRIBUTES text lacks the "1 validation error detected: " prefix here. A key condition with an equality clause and a HASH attribute without one (sk = :x on a table, g1 = :x on an index with HASH g1, g2) is refused by the key schema checks handle_query runs before it parses the FilterExpression. The service reports an unused value or an invalid FilterExpression first (measured 2026-10-31).
9fc4ba3 to
af51f01
Compare
|
Either land this after 484 (and put this one on hold in the meantime), or combine this and 484 into a single PR. This review is AI generated. I reviewed this together with #484, since the two overlap. I tested main (cbc3680) merged with both PRs on PostgreSQL: the full pytest suite shows no regressions against main, and tests/python/test_query_lone_non_equality.py passes (83/83), as does test_fgac_leading_keys.py (31/31). The new wire files also pass against DynamoDB (30/30 and 83/83). Size. +1948/-39 is mostly tests. Net against the merge base: 282 lines of production code, 216 of comments, 1382 of tests (597 Python, 538 core, 215 engine, 32 server). The engine tests and the Python file each cover things the others can't: the engine tests cover the value-type and begins_with-on-N order, and the Python file covers the order against unused values, filter, projection, Select, ExclusiveStartKey and key size. The overlap is the wording rows (Query key condition not supported / missed key schema element / HASH key attributes ... must have equality conditions), which no_hash_equality/tests.rs asserts row by row and the Python file asserts against the service. Keeping one representative per sentence plus the lacks_hash_equality, operands_naming and two-condition cases in core would take that file from 463 to about 200 lines. The measured-wording table also appears three times (the no_hash_equality.rs module doc, the Python docstring and this PR's description); a pointer from the module doc to the Python file would save about 45 comment lines. Should-fix: name resolution is reimplemented twice. attr_of (crates/core/src/expression/key_condition/no_hash_equality.rs:316) and resolve_clause_attr (:330) both resolve a path's first element through names, one returning Option and one Result, and resolve_clause_attr and validate_references (references.rs:30-35) each hand-write the undefined-name sentence. resolver.rs already has resolve_name and resolve_name_ref (resolver.rs:54, :121) for this. Add a prefixing resolve_name_for next to resolve_value_for (resolver.rs:76), use it in references.rs and resolve_clause_attr, and build attr_of on the same helper. Nit-or-follow-up: attr_of clones the name, and its callers only compare it (.as_deref() == Some(..)). Returning Option<&str> avoids the clones. Nit-or-follow-up: hash_attrs.first().copied().unwrap_or_default() (no_hash_equality.rs:197) silently yields "" in a state lacks_hash_equality has already ruled out. An expect with the invariant would say so. Overlap with #484. This PR's refuse_two_conditions_on_one_attribute (no_hash_equality.rs:219) and its ONE_CONDITION_PER_KEY const (:60) refuse the message #484 refuses at parse time. #484's check covers every schema and operator and runs earlier, so it should own the refusal. If #484 merges first, drop refuse_two_conditions_on_one_attribute, its calls in the core and engine refuse_without_hash_equality, the const, and the tests that pin it (two_conditions_on_one_key_are_refused_as_such, two_conditions_on_one_attribute_are_refused_only_without_an_equality, the engine's two_conditions_on_one_attribute_are_refused_before_a_wrong_typed_value, and the one-per-key Python rows, which #484's file covers). If this merges first, #484 should remove them. Keep operands_naming; the HASH-clause type check uses it. I found no path that executes a key condition with no HASH equality now that the parser records those clauses: handle_query skips #429's classification exactly when lacks_hash_equality holds and always calls refuse_without_hash_equality before the read, legacy KeyConditions always carries an equality or is refused, and the LeadingKeys extraction reads no items. |
…lity The branch that refuses a second condition on one key attribute merges first, and this branch now builds on it. One file conflicted, crates/engine/src/query.rs: both sides add functions after refuse_begins_with_on_number, and the merge keeps both. crates/core/src/expression/key_condition.rs and crates/server/src/leading_keys/tests.rs merged without a conflict.
Main is 13 commits ahead of the branch after the previous merge, and this merge is clean. Three files changed on both sides, and none of them is a file this branch changes: crates/core/src/expression/resolver.rs, crates/engine/src/lib.rs and docs/manuals/07-upgrade-manual.md.
The branch merged before parses the key condition with the request's maps. That parse refuses an undefined #name or :value and a second condition on one key attribute before it classifies any clause. Legacy KeyConditions holds one condition per attribute name, and its desugar defines every value it names. So the copies of those checks here could not answer any request. This removes KeyCondition::validate_references and its file, refuse_two_conditions_on_one_attribute and its constant, and their calls in the core and engine refusals. It also removes the three unit tests that pinned them. The wire rows for two conditions on one attribute stay, because the other branch's wire file has no such row without an equality. The doc comments now say where the parse refuses these faults.
resolve_clause_attr read a clause's attribute like attr_of, and refused an undefined #name with its own copy of the service's sentence. The parse with the request's maps now refuses every undefined reference before it classifies any clause, so that refusal could not answer a request. resolve_clause_attr goes. attr_of returns the name borrowed from the path or the names map, and its callers compare it with == Some(..). refuse_without_hash_equality asks operands_naming whether a clause names the HASH attribute. operands_naming reads the same clauses through attr_of, so clause_attrs and clause_paths go too. clause_path goes because SortKeyCondition::path returns the same path. The unit test for the undefined #name refusal goes with that refusal. The wire file still sends those requests, and the parse answers them.
…l error refuse_without_hash_equality read the HASH attribute with hash_attrs.first().copied().unwrap_or_default(). On a key schema with no HASH attribute it answered a ValidationException with an empty attribute name. The message was Query condition missed key schema element: with nothing after it. It now reads the attribute with single_hash_attr and answers InternalServerError when the schema has none. A table or index created through the API always has a HASH attribute. So a request gets this answer only when the catalog holds a damaged key schema. A unit test sends such a schema and fails with the old line.
The refusal of a key condition with no HASH equality wrote its own copies of three sentences that main already writes in other places. The sentences are Query key condition not supported, Query condition missed key schema element, and HASH key attributes ... must have equality conditions specified in the query. The error module now holds one constant or function for each sentence, beside the other message templates. refuse_without_hash_equality uses all three, and handle_query uses the missed key schema element function in the check that this branch moved. The other copies on main keep their text.
no_hash_equality/tests.rs asserted the service's sentences row by row in 17 functions, and the wire file asserts the same rows against a server. The file now has one table for each sentence. Each table has one row for each path through the code. The rows cover a clause on the HASH attribute in either place, an equality on another attribute, a #name and each kind of key schema. Two more tables cover lacks_hash_equality and operands_naming, and the test for a key schema with no HASH attribute stays. The file goes from 407 to 202 lines. The module doc listed the sentences in a table that the wire file docstring repeats. It now points to tests/python/test_query_lone_non_equality.py.
…tributes Names::key_condition reads the attribute names of a Query's key condition for the dynamodb:Attributes condition key, through parse_key_condition. Main's parser refuses a key condition with no equality clause, so such a request added no name. This branch makes the parser accept it, so pk > :v started to add pk after the merge of main, and a server unit test failed. A key condition with no equality clause now adds no name, and the dynamodb:Attributes set for it is the one main gives. The engine refuses such a request once it knows the key schema. The doc comment says so, and the test gets a row with two clauses and no equality.
Some rows were measured on 2026-10-23 for shapes outside the first table. The wire file and one engine test comment labelled them with the issue number: 427-1 to 427-9 and 427-8c. The labels are now M1 to M9 and M8c. The rows and their answers do not change.
The wire file compared the end of this refusal only, because ExtendDB answered without the 1 validation error detected: prefix. Main now adds the prefix. The row compares the whole text with the service's answer, which the row records. _refused_suffix had no other caller and goes.
…is missing handle_query computes lacks_hash_equality before the Select index check. The call to the engine's refuse_without_hash_equality now runs only when that boolean is true, and the function no longer computes it again. Legacy KeyConditions never lacks the equality, so the call does not run for it. Before, the function returned Ok for it. The unit test a_key_condition_with_a_hash_equality_is_left_to_the_classification covered that check, and this commit removes it.
The doc comment of the engine's refuse_without_hash_equality had 33 lines of measured rows and dates. The core module doc and the wire file's docstrings give the same order. The comment now names the two steps in the service's order and points to tests/python/test_query_lone_non_equality.py, as the core module doc does.
…ct index check Row A3 sends sk > :a to the KEYS_ONLY index g-keys with Select ALL_ATTRIBUTES. On 25 November the service answered Query condition missed key schema element: g to both sends. The engine skips the Select index check for every key condition with no HASH equality. W5 covers only the Query key condition not supported message. On #484 merged with main, ExtendDB answers A3 with the Select index message.
…ty check The new test sends pk > :v and zz > :v to the vector index. The measured table has HASH pk, RANGE sk and a vector index. On 25 November the service answered Query operation not supported on this index type to each of two sends. This branch parses such a key condition and refuses it after the vector index check. On #484 merged with main, ExtendDB answers both with the parser's message: Invalid KeyConditionExpression: partition key condition must use equality (=).
The fixture's table is keyed on pk alone. The rows were first measured on a table keyed on pk and sk. On 25 Nov a table keyed on pk alone gave the same vector refusal for pk > :a and zz > :a, two sends each. The comment now says so.
|
Thanks for going through both. I kept them apart, and this one lands after #484. 125e1de merges #484's branch at 98d09b3 into this branch.
The description lists the other commits of this round. |
The branch of #484 merged main at 5252eda, which adds #544 (1ddc087). Its next commit, 468b256, refuses an invalid Select before the IAM decision. One file conflicted, crates/engine/src/query.rs, in three places. The key schema checks of handle_query: this branch runs them only when the key condition has an equality on the HASH attribute. #544 runs the classifier's type check only on a multi-attribute key schema or for legacy KeyConditions, and #484's branch calls refuse_begins_with_on_number for legacy KeyConditions only. The resolution keeps this branch's guard around their code, and this branch's missed_key_schema_element helper. refuse_without_hash_equality, beside the new doc of check_request_parameters: both stay. The engine refusal drops its call of refuse_begins_with_on_number. With #544 that function refuses a begins_with value that is not a string or a binary value. The parse refuses that value before the table lookup, and lacks_hash_equality holds only for a KeyConditionExpression, so the call could not fail. Rows 6 and the two begins_with rows of 1 November in test_query_lone_non_equality.py stay, and the parse answers them. The test modules: all three stay. The code that only that call needed goes too. KeyCondition::without_equality put a second clause that is a begins_with into sk_condition, where the engine refusal read it. It now keeps the first clause there. Two engine tests called the refusal with a begins_with on a number key: this merge deletes one, and the other keeps its row 6b.
…efusal refuse_without_hash_equality copied the HASH attribute's definition into a one-element Vec and passed it to check_key_value_type. That function finds the definition by the attribute name that the clause's path resolves to. operands_naming returns only the clauses whose path resolves to the HASH attribute, and its attr_of resolves a path as resolve_path_attr_name does. So a search of the whole list finds the same definition. The refusal now passes the whole list, and no answer changes.
The module docstring of test_query_lone_non_equality.py placed a begins_with on a number HASH attribute after an unused value and an invalid FilterExpression. No row sends that shape beside either fault, and #484's parse refuses that begins_with value ahead of the unused value check of handle_query. Its sentence that no other value is checked also left out the parse's begins_with refusal, which covers any attribute. The docstring now gives each order with the rows that measure it: - two conditions on one attribute ahead of a wrong-typed value - that value ahead of the key schema wording, and after an unused value and an invalid FilterExpression - the operand type message for a begins_with number on a number HASH attribute, in either clause
navareamol
left a comment
There was a problem hiding this comment.
The WebAssembly check is red at this head. The job reports mismatched types in crates/core/src/metrics/collector.rs, expected std::time::Instant and found web_time::Instant. This PR does not touch that file and main's later WebAssembly runs are green, so I think a merge with main fixes it. Could you merge main and show the check passing?
The description keeps the full history of earlier heads, and its test counts are tied to commits that are not the head. Could you rewrite the Testing done section for the current head so the counts match what the head runs?
This also stacks on #484, which is still open. I think the branch needs to be rebased after #484 lands so the diff shows only this change.
I will approve once main is merged and the WebAssembly check is green, and the Testing done section states the runs at the head.
…endDB#481) * fix(query): refuse key condition values over the key size limits Closes ExtendDB#435. The service refuses a Query whose key condition values exceed the key size limits before it reads anything; ExtendDB ran the Query. Measured on 2026-10-23, every row repeated with identical answers: - A HASH value over 2048 bytes: "One or more parameter values were invalid: Size of hashkey has exceeded the maximum size limit of2048 bytes" (no space after "of", as the service writes it). 2048 bytes is accepted. - HASH values that each fit but add up to more than 2048 bytes (an index with two HASH attributes): "One or more parameter values were invalid: Aggregated size of all hash keys has exceeded the size limit of 2048 bytes". A sum of exactly 2048 is accepted. A single oversized value gets the single sentence even when the sum is also over. - RANGE values adding up to more than 1024 bytes, one clause or several: "One or more parameter values were invalid: Aggregated size of all range keys has exceeded the size limit of 1024 bytes". 1024 is accepted. Every operator is sized (=, <, <=, >, >=, begins_with); BETWEEN contributes its larger bound, not the sum of both. - The HASH checks are reported before the RANGE check. - Strings are sized by UTF-8 bytes (683 U+20AC characters, 2049 bytes, refused; 682 plus "xx", 2048 bytes, accepted) and binary values by byte length. Base tables, LSIs, GSIs and legacy KeyConditions behave the same. - An undefined #name or :value in the key condition is reported before the size check. Ordering, measured with a 2049-byte value: filter syntax, unused names and values, index name, ConsistentRead on a GSI, missing table, Limit, projection syntax and overlap, the Select conflicts and the filter operand type are all reported first; the ExclusiveStartKey checks after. The check is crates/core/src/validation/key_size.rs, called from handle_query after the expression validations and before the start key checks. The limits come from the configuration and the sentences name them. Tests: unit tests in validation/key_size/tests.rs and the engine; tests/python/test_query_key_size.py, test_query_key_size_values.py and test_query_key_size_order.py (64 rows) pass against the service. On ExtendDB alone, five rows with two or more RANGE clauses on one index skip until the multi-attribute range change in ExtendDB#429 merges (the handler refuses the shape earlier today); they pass on the merged tree. The undefined-name row stays unit level because the undefined-name refusal for a sort key clause arrives with ExtendDB#479. Pre-existing, measured, not changed here: a BETWEEN with the lower bound above the upper bound is refused by the service with a bound-order sentence; two conditions on one key are refused with "KeyConditionExpressions must only contain one condition per key"; a Number with 39 or more digits is refused with "Attempting to store more than 38 significant digits in a Number"; a FilterExpression on a key attribute is refused with "Filter Expression can only contain non-primary key attributes". ExtendDB accepts all four. * fix(cassandra): pass the bare index name in IndexNotFound so the Query sentence matches the other backends * test(query): skip the idx accept rows on a backend that cannot read a multi-RANGE index The Cassandra backend answers InternalServerError to any Query on an index with several RANGE attributes: its ORDER BY lists sk_* then base_pk and skips the sk2_* to skN_* clustering columns, which Cassandra refuses with "Order by currently only supports the ordering of columns following their declared order in the PRIMARY KEY". require_multi_range now also skips on InternalServerError, so test_one_600_byte_range_value_is_accepted carries the probe like the other idx rows. * test(query): skip later-RANGE accept rows on first-RANGE-only backends Since ExtendDB#429, the MongoDB and Cassandra backends refuse a key condition on a later RANGE attribute of a multi-attribute index with a ValidationException. Two rows of TestGsiQueryKeySize expect such a Query to be served, and they failed on MongoDB. They now skip when a probe gets that refusal, as the multi-range tests on main do. The refusal rows still run on those backends, because the size check answers first. * fix(core): read the key byte size through the key_size module in restorable_item Main added validation/restorable_item.rs, which sizes a backup item's key with key_value_byte_size from the validation module. This branch moved that function into validation/key_size.rs. The call now names the new module, as check_key_size does. * fix(core): check the number rules before sizing a Query key value Query sized an N value in a key condition by its digit string, so an invalid number got the key size sentence. The service checks the number first. Measured 2026-11-20 in us-east-1 on a GSI with HASH n (N), each shape twice: - 2049 or 39 digits answer "Attempting to store more than 38 significant digits in a Number", in KeyConditionExpression and in KeyConditions. - 1 followed by 2100 zeros answers "Number overflow. Attempting to store a number with magnitude larger than supported range". - The service serves 2100 zeros followed by 1. validate_query_key_sizes now passes each N value it reads to validate_and_normalize_number and sizes the normalized digits. Query served a 39-digit value before and refuses it now, as the service does. The doc comment of validate_query_key_sizes no longer lists two shapes as not measured. The wire tests assert both, a HASH sum of exactly 2048 bytes and the aggregated hash sentence over an oversized RANGE value. Both pass against the service. The comment also names a request that ExtendDB serves and the service refuses. The request has an undefined #name in a second clause, on a key schema with one HASH attribute and at most one RANGE attribute. * fix(query): check Select against the GSI projection after the key size With no ExclusiveStartKey, Query checked Select=ALL_ATTRIBUTES against the index projection before the other request checks. The service makes that check after the key size check. With a start key, it also comes after the start key checks. Measured 2026-11-20 in us-east-1 on a KEYS_ONLY GSI with Select=ALL_ATTRIBUTES, each shape twice: - A 2049-byte key value answers the size sentence, with and without an ExclusiveStartKey. - A 1-byte value answers the Select sentence. - Without a start key, Limit 0 and a parameter mix each answer their own refusal ahead of the Select sentence. So do an empty or invalid KeyConditionExpression, a missed key schema element, a wrong-typed key value and a filter or projection fault. ProjectionExpression with ALL_ATTRIBUTES and an unused name or value also come first. ExtendDB answered the Select sentence for all of them. The check now runs once, after the size and start key checks. The comment above the size check no longer says that the type check is still to come. The type check runs above it, in resolve_key_schema_with. The engine test comments cite the measurement dates and region, not local files. * test(query): add the number and Select rows and keep refusal rows visible - test_query_key_size_values.py: rows on a GSI with HASH n (N) for 2049 digits, 39 digits, 1 followed by 2100 zeros and 2100 zeros followed by 1. Each row runs in KeyConditionExpression and in KeyConditions. - test_query_key_size_order.py: rows on a KEYS_ONLY GSI for Select=ALL_ATTRIBUTES with a 2049-byte and a 1-byte value, with and without an ExclusiveStartKey. The Limit 0 row uses the raw_client fixture from conftest.py in place of its own copy. - This commit removes require_multi_range. Neither of its skips fires on any backend at this head. On a refusal row, a 500 or a classifier change turned the row into a skip. - The BETWEEN row is two tests. The refusal half reports its result on MongoDB and Cassandra, where the accept half skips. - The docstrings cite the measurement dates and region, not local files. * docs(core): cite ExtendDB#1214 for the undefined name that Query serves The doc comment of validate_query_key_sizes names one request that ExtendDB serves and the service refuses: an undefined #name in a second key condition clause. ExtendDB#1214 tracks that request. * docs(query): split the long sentences in four new comments Four new comments now use shorter sentences. They are the number rules in sized_clause and its unit test, the undefined #name in validate_query_key_sizes and the Select check in handle_query. They state the same measurements. * fix(core): size a Query key number the validator does not read by its text 001fe29 sized each N value of a key condition after validate_and_normalize_number, so a number written in other Unicode decimal digits got a 400. DynamoDB reads U+FF11 and U+0967 U+0968 as digits. It serves `n = :v` and the KeyConditions form with those values (200, Count 0, measured 2026-11-20 in us-east-1, twice each), and so did the previous head. The size check now calls normalize_number and refuses only the digit count and magnitude faults. A value the validator does not read as a number is sized by its text again, as before 001fe29. The unit table and TestNumberKeyValues gain the two values, in both syntaxes. The Select test uses the shared refused helper. Its 1-byte row without a start key goes, because test_query_start_key_partition.py sends the same request. Two comments are shorter. * fix(core): do not size a Query key N value that is not a number 31159a2 sized an N value that normalize_number does not read as a number by its text. So 2049 `x` or 2049 U+FF11 in a key condition got the hash size sentence. DynamoDB refuses such a value with a number sentence before it looks up the table (measured 2026-11-24 in us-east-1, twice each). 2049 `x` gets `The parameter cannot be converted to a numeric value: ` and the value, in KeyConditionExpression and in KeyConditions. 39 U+FF11 get `Attempting to store more than 38 significant digits in a Number`. Such a value now adds nothing to the size, and ExtendDB serves the Query as main does. The number check of key condition values is ExtendDB#544's. The unit table gains a 2049 `x` row and a 2049 U+FF11 row. * test(query): fold the key size rows into two tables query_key_size_tests.rs had 19 tests that sent rows of the core tests through the expression parser. The wire files send the same rows end to end. The file keeps the two tests that add a path: the clause order in the expression, and the KeyConditions desugaring. The comments of two deleted index tests named a gate that b116a46 took out. In the core tests, one table holds the equality rows on the base table, on `idx` and on `two-hash`. A second table holds the six undefined-reference rows. Each row keeps its measurement comment. Two rows have measurements from 2026-11-20 on `two-hash`, and their comments no longer say "Not measured". They are a HASH sum of exactly 2048 bytes, and the aggregated hash sentence with a 1025-byte RANGE value. Two tests checked the end of a sentence that a table row asserts in full, and they are gone. * fix(core): count each key attribute once in the Query key size The size check added every clause into the HASH or RANGE total, including a second clause on one key attribute. `pk = :a AND pk = :b` with 1025 bytes in each value got the aggregated hash sentence. `pk = :p AND sk = :a AND sk = :b` with 600 bytes in each got the range sentence. Main serves both. DynamoDB refuses both with `Invalid KeyConditionExpression: KeyConditionExpressions must only contain one condition per key`. The `pk` shape is from a measurement on 2026-11-24 in us-east-1 (sent twice), and ExtendDB#489 records the `sk` shape. Each key attribute now contributes its largest value once, and the single hash check reads that value. The one-condition-per-key refusal is ExtendDB#484's. Two rows join the equality table. * style(core): clear the clippy warnings in the Query key size code The pedantic clippy run flagged `ExtendDB` without backticks in the doc comment of validate_query_key_sizes (doc_markdown). The two tables of 762d4a8 tripped type_complexity, a default lint that CI's `-D warnings` refuses. Each table now names its row type. After this commit, clippy with `-W clippy::pedantic` and `--all-targets` on extenddb-core and extenddb-engine reports no warning on a line this PR adds. * test(query): rename the isrefused tests and reuse assert_validation Nine test names in test_query_key_size.py read `isrefused`, and they now read `is_refused`. `refused` in query_key_size_support.py repeated the three asserts of helpers.assert_validation. It now calls that helper and takes its `code` argument. In test_query_key_size_order.py, `_first` and five tests made the same three asserts after `_error`, and they now call `refused`. `_error` stays for the two syntax error tests, which check the start of the message. * docs(query): count one sort key value per attribute in the limits table 482bf8a counts the largest value of each key attribute once. The sort key row of docs/dynamodb-limits.md said that the Query check adds up every sort key clause. It now says that the check adds up the sort key values of the key condition, one per attribute. * fix(core): refuse a Query key N value that is not a number a3f733d sized an N value that normalize_number does not read as a number as 0 bytes, so the Query went on to storage. On SQLite at 1e5f4bc, `abc`, 2049 `x`, `" 1"` and the empty value answered HTTP 200 with Count 0. That was the answer on a GSI keyed on an N attribute, in KeyConditions and on the base table's N partition key. On the base table's N sort key they answered InternalServerError, and the server log shows `invalid numeric sort key: invalid digit found in string`. DynamoDB refuses each of these values with `The parameter cannot be converted to a numeric value: ` followed by the value as sent. The empty value gets the colon too (measured 2026-11-24 in us-east-1, twice each, in KeyConditionExpression and in KeyConditions). sized_clause now refuses such a value with that text when the value holds ASCII characters only. NumberFault::Empty has no colon, so the refusal uses the text of NumberFault::Malformed. A value with a character outside ASCII still adds nothing to the size. The service reads Unicode decimal digits as digits, and the number rules do not (ExtendDB#565). A refusal here would refuse one U+FF11, which the service reads as the number 1. The unit table now expects the sentence for 2049 `x`. It gains rows for `abc`, `" 1"`, the empty value, and `1e-131` as a partition key value and as a sort key value. * test(query): pin the number sentences in each Query key position test_query_key_size_values.py gains a table for N values that the service refuses as numbers: `abc`, 2049 `x`, `" 1"`, the empty value and `1e-131`. Each row runs in four forms. Two are on a GSI keyed on an N attribute, in KeyConditionExpression and in KeyConditions. The other two use the N partition key and the N sort key of a new `number_table` fixture. Each row asserts status, code and message by equality. The service gives these answers before the table lookup (measured 2026-11-24 in us-east-1, twice each, on a table that does not exist). Two more rows, 39 and 683 U+FF11, assert the service's 38-digit sentence. They are expected failures on ExtendDB, because the number rules do not read U+FF11 as a digit (ExtendDB#565). The mark is not strict, so a check that reads these digits makes the rows of its form pass. The existing number test now builds its Query with the same helper. On a server built from 1e5f4bc, the 16 rows for `abc`, 2049 `x`, `" 1"` and the empty value fail. 12 of them get HTTP 200, and the 4 on the sort key get InternalServerError. The 4 underflow rows pass there too. With 1fe3f0c, the three wire files pass on SQLite: 99 passed and 8 expected failures. * test(query): leave the U+FF11 rows to ExtendDB#565 The files in tests/python hold no expected failures (tests/python/README.md, Design Principles). The rows for 39 and 683 U+FF11 assert the service's 38-digit sentence. ExtendDB gives that sentence only once its number rules read Unicode decimal digits, which is ExtendDB#565, so the rows and their mark go. The measurements of 2026-11-24 are on ExtendDB#565. * test(query): pin the Select order on a KEYS_ONLY GSI without a start key On a KEYS_ONLY GSI with Select ALL_ATTRIBUTES and no ExclusiveStartKey, DynamoDB answers each of these refusals before the Select sentence: - Limit 0 - a key condition on the base table's partition key - an N value on the S key - an unused expression value - an empty KeyConditionExpression - FilterExpression `#` A reviewer measured each shape twice on 2026-11-24. These shapes are now rows of test_select_all_attributes_on_a_keys_only_gsi_is_reported_after. Each row asserts status, code and message by equality, except the `#` row. ExtendDB words that syntax error in its own way (ExtendDB#1419), so the row checks the `Invalid FilterExpression: ` label. The table now sends its requests through raw_client, because the SDK refuses Limit 0. FILTER_LABEL, LIMIT_MESSAGE and MISSED_G_MESSAGE hold the three texts that a new row shares with an existing test. With the Select check moved above the Limit check, the six new rows fail. The two 2049-byte rows of the table and two start key rows in test_query_start_key_partition.py fail too. On SQLite, the three wire files and test_query_start_key_partition.py give 136 passed.
Changes since the last review
The last review was of af51f01. This branch now contains #484's branch (
fix/key-condition-one-per-key), and #484 merges first.crates/engine/src/query.rshad a conflict: both branches add functions afterrefuse_begins_with_on_number, and the merge keeps both. 0c4ddaf merges main at a417b2f with no conflict. 21a392d merges 8b43195, the commit that merges main at a417b2f into fix(core): refuse a second condition on a key in KeyConditionExpression #484's branch. The tree does not change.the_shape_is_refused_after_the_checks. They asserted the parser errors forpk > :aandpk > :a AND sk > :b, which this branch parses. Two comments that named a missing equality as a fault of the shape now say that the engine refuses it.Selectindex check. Row W5 tests it.KeyCondition::validate_referenceswithreferences.rs, andrefuse_two_conditions_on_one_attributewith its constantONE_CONDITION_PER_KEY. Three unit tests of those checks go too, and so do the four tests inreferences.rs.resolve_clause_attr, whose error arm could not fire with fix(core): refuse a second condition on a key in KeyConditionExpression #484's parse.attr_ofreturnsOption<&str>. The refusal asksoperands_namingwhether a clause names the HASH attribute, soclause_attrs,clause_pathsandclause_pathgo.InternalServerErrorfor a key schema with no HASH attribute. Before, the answer named an empty attribute.crates/core/src/error/messages.rs, one constant or function each.no_hash_equality/tests.rsone table per sentence, 202 lines instead of 463. The module doc points to the wire file instead of a copy of its table.dynamodb:Attributes, as on main.ALL_PROJECTED_ATTRIBUTESrow by equality, because main now adds the1 validation error detected:prefix.refuse_without_hash_equalityonly whenhandle_queryfound no HASH equality, and the function no longer checks that again. The unit test of that check goes.Selectindex check.pkalone, the fixture's key schema.Selectbefore the IAM decision.crates/engine/src/query.rsconflicted in three places. The merge keeps this branch's guard around the key schema checks, and all three test modules. Inside the guard are fix(query): check Query values against the key schema and the number rules #544's type check rules and fix(core): refuse a second condition on a key in KeyConditionExpression #484'sbegins_withcall.refuse_begins_with_on_numberrefuses abegins_withvalue that is not a string or a binary value. fix(core): refuse a second condition on a key in KeyConditionExpression #484's parse refuses that value before the table lookup, and a key condition with no HASH equality is always aKeyConditionExpression. So the engine'srefuse_without_hash_equalitydrops itsbegins_withcheck, which could not fail.KeyCondition::without_equalityno longer moves a second clause that is abegins_withintosk_condition, which only that check read.begins_withrows of 1 November, and fix(core): refuse a second condition on a key in KeyConditionExpression #484's parse answers them.refuse_without_hash_equality, which copied the HASH attribute's definition into aVecbefore. No answer changes:check_key_value_typefinds the same definition by the name that the clause's path resolves to.tests/python/test_query_lone_non_equality.py. It gives each order of the value checks with the rows that measure it. It no longer says that abegins_withon a number HASH attribute comes after an unused value and an invalidFilterExpression, an order that no row measures.What
A Query whose
KeyConditionExpressionhas no equality clause on the HASH attribute now gets the service's message. The key schema of the table or index queried selects the message:pk > :x,pk BETWEEN :x AND :y,begins_with(pk, :x),pk > :x AND sk = :y,sk = :x AND pk > :y,zz = :x AND pk > :y, the GSI forms)Query key condition not supportedsk > :x,zz > :x,sk > :x AND zz > :y, the GSI forms)Query condition missed key schema element: <HASH>HASH key attributes h1, h2 must have equality conditions specified in the queryThe changes:
crates/core/src/expression/key_condition.rs: the parser records one or two clauses with no equality instead of refusing them, so the engine can choose the message.crates/core/src/expression/key_condition/no_hash_equality.rs:KeyCondition::lacks_hash_equality,refuse_without_hash_equality, which chooses the message by the key schema, andoperands_naming, which the engine's type check reads. Itsattr_ofkeeps its own#namelookup:resolve_nameis anExpressionMapsmethod, theKeyConditionmethods get only the names map, andresolve_path_attrclones the name.crates/core/src/error/messages.rs:QUERY_KEY_CONDITION_NOT_SUPPORTED,missed_key_schema_elementandhash_attributes_without_equality.crates/engine/src/query.rs:handle_queryfinds a key condition with no HASH equality before theSelectindex check. Such a key condition skips that check and the classification of fix(query): classify and order key conditions on a multi-attribute GSI the way the service does #429. Aftervalidate_select_projection,handle_querypasses it to the engine'srefuse_without_hash_equality. On a schema with one HASH attribute, that function first runs the type check on the clause that names the HASH attribute. Abegins_withvalue that is not a string or a binary value never reaches it. fix(core): refuse a second condition on a key in KeyConditionExpression #484's parse refuses that value with the service's operand type message. The parse and fix(query): check Query values against the key schema and the number rules #544'srefuse_begins_with_on_numbercall the same helper. Every other key condition goes through the classification as on main.crates/server/src/request_attributes.rs: a key condition with no equality adds no name todynamodb:Attributes. Main's parser refused such a key condition, so main added no name either.Ahead of the key schema's message, the service reports:
#nameor:valuebegins_withvalue that is not a string or a binary value, such asbegins_with(pk, :n)on a number HASH attribute (row 6)FilterExpressionorProjectionExpression, and theSelectconflictsAfter the key schema's message, the service reports an
ExclusiveStartKeyfault and an oversized key value. The key schema's message also comes ahead of theSelectindex check:Query key condition not supported(W5),Query condition missed key schema element: g(A3) andHASH key attributes h1, h2 must have equality conditions specified in the query(D1, D3). The engine skips that check for every key condition with no HASH equality.Why
Closes #427.
ExtendDB refused these key conditions with parser messages of its own:
Invalid KeyConditionExpression: partition key condition must use equality (=)for one clause, andInvalid KeyConditionExpression: one condition must be an equality on the partition keyfor two. An equality on another attribute with a non-equality on the HASH attribute (sk = :x AND pk > :y) gotQuery condition missed key schema element: pk. The service chooses the message from the key schema, as the table in What shows.The service gave the rows of the wire file on 2026-10-21, 2026-10-23 and 2026-11-01, two samples each with the same answer. The table below gives the order on a schema with one HASH attribute, measured on 1 November. One table had HASH
pkand RANGEsk(strings). The other had HASHpk(N) and RANGEsk(S). The index had HASHgsi1_pkand RANGESK:pk > :x AND pk < :n,pk > :n AND pk < :mInvalid KeyConditionExpression: KeyConditionExpressions must only contain one condition per keypk > :n AND sk > :y,sk = :x AND pk > :n,pk BETWEEN :n AND :mOne or more parameter values were invalid: Condition parameter type does not match schema typepk > :x AND sk > :nQuery key condition not supportedsk > :n,zz > :nQuery condition missed key schema element: pkPK > :nandSK > :nQuery condition missed key schema element: gsi1_pkpk(N),begins_with(pk, :n) AND sk > :xandsk > :x AND begins_with(pk, :n)Invalid KeyConditionExpression: Incorrect operand type for operator or function; operator or function: begins_with, operand type: N:xand:yare strings,:nand:mnumbers. With an unused:y,pk > :nanswered the unused value message, and withFilterExpressionnope(it answered the filter syntax error (rows 5a and 5b, 23 and 31 October).On 24 November, two sends each, on a table with HASH
pk, RANGEskand the KEYS_ONLY indexg-keysong:g > :aong-keyswithSelectALL_ATTRIBUTESansweredQuery key condition not supported(row W5). #1208 records more rows of that day, each with an equality in the key condition. On the service, these faults also answer ahead of theSelectindex check:ProjectionExpressionconflictExtendDB answers them after it, on main, on #484 and on this branch.
On 25 November, two sends each, every answer HTTP 400
ValidationException.bk10-484-1is the table above.bk10-507-snhas the KEYS_ONLY indexmkidxwith HASHh1andh2and RANGEr1.bk10-507r-vechas HASHpk, RANGEskand the vector indexvidx.:aand:bare strings:bk10-484-1sk > :aong-keys,SelectALL_ATTRIBUTESQuery condition missed key schema element: gbk10-484-1zz > :aong-keys,SelectALL_ATTRIBUTESQuery condition missed key schema element: gbk10-507-snh1 = :a AND h2 = :bonmkidx,SelectALL_ATTRIBUTESOne or more parameter values were invalid: Select type ALL_ATTRIBUTES is not supported for global secondary index mkidx because its projection type is not ALLbk10-507-snh1 > :aonmkidx,SelectALL_ATTRIBUTESHASH key attributes h1, h2 must have equality conditions specified in the querybk10-507-snr1 > :aonmkidx,SelectALL_ATTRIBUTESHASH key attributes h1, h2 must have equality conditions specified in the querybk10-507r-vecpk = :aonvidxQuery operation not supported on this index type.bk10-507r-vecpk > :aonvidxQuery operation not supported on this index type.bk10-507r-veczz > :aonvidxQuery operation not supported on this index type.VecProbePR_1786053330pk > :aonvidxQuery operation not supported on this index type.VecProbePR_1786053330zz > :aonvidxQuery operation not supported on this index type.A3 and D1 without
Selectgave the same answers.VecProbePR_1786053330has HASHpkalone and the vector indexvidx, the key schema of the vector test fixture. The wire files test A3, V1 and V2. No wire fixture has a KEYS_ONLY index with two HASH attributes, so D1 and D3 have no test.Stack on #484
#484 refuses a second condition on one key attribute and an undefined reference when it parses the key condition, for every key schema. This branch had its own copies of both checks. With #484 merged in, the copies could not answer a request, so aeec7b0 removes them. The wire rows for two conditions on one attribute stay, because #484's wire file has no such row without an equality.
#484 merges first. Its branch and this one conflict in
crates/engine/src/query.rs, and the merge commits 125e1de and b60edf4 resolve that conflict. b60edf4 merges 468b256, the head of #484's branch, so this branch has one merge base with #484's branch.Against #484's branch at 468b256, this branch changes 13 files. It adds 407 production lines, 159 of them comments, and removes 40. It adds 1054 test lines and removes 38. At a13cc4b, against 8b43195, the counts were 421 (162 comments) and 36, and 1080 and 38.
At fbce34a this branch merges with main at 5252eda without a conflict, and so does #484's branch at 468b256. At 16:40 UTC on 25 Nov, 105 other open PRs changed a file of this PR or of #484. 42 of them conflict with main themselves and were not checked. The other 63 give the same result with this branch as with #484's branch. 48 merge without a conflict, and 15 conflict in files that #484 changes:
crates/engine/src/query.rs: fix(engine): send the ConditionalOperator enum text alone on Query and Scan #1100, fix(core): refuse a name that starts with an underscore in an expression #1131, fix(engine): answer a missing TableName, Key or Item as DynamoDB does #1262, fix(expressions): validate in the service's order, with its messages #399, fix(query): refuse key condition values over the key size limits #481 and fix(query): check legacy conditions against the key schema #507crates/engine/src/expression_helpers.rs: fix(core): refuse the list indexes DynamoDB refuses in expression paths #1095, fix(expressions): validate in the service's order, with its messages #399 and fix(query): check legacy conditions against the key schema #507crates/engine/src/query_key_values.rs: fix(query): check the numbers of KeyConditions and QueryFilter values #1364docs/manuals/07-upgrade-manual.md: fix(deps): move to sqlx 0.9.1 for the SQLite fix of RUSTSEC-2026-0459 #1166, fix(storage-mongodb): refuse the request when a stored IAM document cannot be read #1314, fix(server): count a request refused in the authorization step in UserErrors and RequestCount #1427, fix(storage): store U+0000 in strings on PostgreSQL and MongoDB #368, fix(storage-postgres): serve each table in turn in the GSI queue workers #542, fix(config): environment overrides for every backend key; Cassandra refuses unknown keys #546 and fix(server): default dynamodb:Select, ReturnValues and ReturnConsumedCapacity condition keys #738What stays different from DynamoDB
<>,NOT,OR,INandcontainsin a key condition: the service answersInvalid KeyConditionExpression: Invalid operator used in KeyConditionExpression, and ExtendDB's text differs (Query: shapes the service refuses that ExtendDB accepts or words differently (measured 2026-10-23) #489).pk = :x AND z > :x, with the second clause on an attribute outside the key: the service answersQuery condition missed key schema element: sk, and ExtendDB answers 200 (Query: shapes the service refuses that ExtendDB accepts or words differently (measured 2026-10-23) #489).sk = :xon the table): the service reports an unused value first. ExtendDB reports the key schema message first, from the checks thathandle_queryruns before the unused value check (Query: the missing key refusal comes before the filter syntax and unused value checks when the key condition has an equality #712).sk = :a AND g > :bong-keys(row A6, 25 November, with and withoutSelect): the service answersThe number of query conditions (2) exceeds the number of key attributes defined in the schema (1). ExtendDB answersQuery key condition not supported, because it has that count rule only on a key schema with several HASH or several RANGE attributes (Query on a single-attribute key schema applies a condition on a non-key attribute to the sort key #674).Testing done
At fbce34a, which contains #484's branch at 468b256: the merge of main at 5252eda (bf57850) and the
Selectchange on top of it.cargo +1.97.0 fmt --all -- --check: pass.cargo +1.97.0 clippy --locked -p extenddb-core -p extenddb-engine --all-targets -- -D warnings, and the same forextenddb-enginewith--features extenddb-engine/backup-test-hooks: pass.cargo +1.91.1 check --locked -p extenddb-core -p extenddb-engine --all-targets: pass.cargo +1.97.0 test --locked --no-fail-fast -p extenddb-core -p extenddb-engine --lib: core 1189 passed and 1 ignored, engine 942 passed.cargo +1.97.0 test --locked -p extenddb-wasm-adapter --test parity:every_case_gives_its_expected_answerpassed.tests/python/test_query_lone_non_equality.py: 83 passed.tests/test_query_key_condition_one_per_key.py,tests/test_vector_index_query_scan.pyandtests/test_fgac_leading_keys.py: 146 passed, W5, A3, V1 and V2 included.tests/test_query_key_value_types.py,tests/test_query_leading_keys_values.pyandtests/test_query_value_shapes.py: 329 passed.python3 -m pytest --collect-only -qoftests/and oftests/python: 7257 and 755 tests, no error.cargo +1.97.0 clippy --locked -p extenddb-core -p extenddb-engine -p extenddb-server --all-targets -- -W clippy::pedantic: no warning on the 836 lines that this PR adds against 468b256, in 10 Rust files.At ee8a156, which contains #484's branch at 8b43195 (98d09b3 with main at a417b2f merged in). The head, a13cc4b, changes only a test comment after it.
cargo +1.97.0 fmt --all -- --check: pass.cargo +1.97.0 clippy -p extenddb-core -p extenddb-engine -p extenddb-server --all-targets -- -D warnings, and the same forextenddb-enginewith--features extenddb-engine/backup-test-hooks: pass. With-W clippy::pedantic, clippy gives no warning on a line that this PR adds.cargo +1.91.1 check -p extenddb-core -p extenddb-engine -p extenddb-server --all-targets: pass.cargo +1.97.0 test --locked -p extenddb-core --lib: 1178 passed, 1 ignored.cargo +1.97.0 test --locked -p extenddb-engine --lib: 899 passed.cargo +1.97.0 test --locked -p extenddb-server --lib: 515 passed. Fivebackup_storetests failed because/tmp, the parent of their temporary directories, belongs to another user on the test host, as their message says. This PR does not changebackup_store.rs.tests/python/test_query_lone_non_equality.py: 83 passed.tests/test_query_key_condition_one_per_key.py: 100 passed, W5 and A3 included.tests/test_vector_index_query_scan.py: 14 passed, V1 and V2 included.tests/test_gsi_multi_range_query.py,tests/test_fgac_leading_keys.py,tests/test_query_scan.py,tests/test_multipart_gsi.py,tests/test_read_paging.py,tests/test_fgac_attributes.pyand the threetests/test_dynamodb_attributes_*.pyfiles: 338 passed, 1 skipped.tests/python/test_query_scan.py: 27 passed.tests/test_conditional_operator.pyandtests/test_select_all_projected_attributes.py, which also send legacyKeyConditions: 46 passed.tests/python/test_query_start_key_range.py: 103 passed.test_query_lone_non_equality.pyfails 61 of its 83 rows. Of the 22 rows that pass, fix(core): refuse a second condition on a key in KeyConditionExpression #484's checks answer 15:begins_withrows on a number keyKeyConditionsrows and 5 rows with an equality clause.test_query_key_condition_one_per_key.pyfails W5 and A3 only, with theSelectindex message.test_vector_index_query_scan.pyfails V1 and V2 only, with the parser's message.Selectindex check run for every key condition again, W5 and A3 fail with theSelectindex message.unwrap_or_default()line. Thedynamodb:Attributestest fails with main's line inNames::key_condition. A mutant that drops the operands of the second clause fails two of the new tables.python3 -m pytest --collect-only -qoftests/and oftests/python: 6846 and 755 tests, no error.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy -- -W clippy::pedantic)Storagetrait, auth model, on-diskformat, or public CLI surface, an RFC has been accepted or is linked
below. Otherwise, an ADR captures the decision (link below).
ADR / RFC: n/a
Breaking changes
ExtendDB refuses each of these requests before and after this change, with HTTP 400 and
ValidationException. Only the message changes:pk > :xorsk > :x:Invalid KeyConditionExpression: partition key condition must use equality (=)becomes the key schema's message from the table in What.pk > :x AND sk > :y:Invalid KeyConditionExpression: one condition must be an equality on the partition keybecomes the key schema's message.sk = :x AND pk > :y:Query condition missed key schema element: pkbecomesQuery key condition not supported. Ong-keys,sk = :a AND g > :bwithoutSelectchanges fromQuery condition missed key schema element: gtoQuery key condition not supported(A6).pk > :non a string key: the parser's message becomesOne or more parameter values were invalid: Condition parameter type does not match schema type.SelectALL_ATTRIBUTESon a global secondary index whose projection is notALL: theSelectindex message becomes the key schema's message.Selectindex message.ProjectionExpressionorSelectconflictpk > :xorzz > :x: the parser's message,Invalid KeyConditionExpression: partition key condition must use equality (=)for one clause, becomesQuery operation not supported on this index type.By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache License 2.0 and I agree to the Developer Certificate of
Origin (DCO). See CONTRIBUTING.md for details.