Scan: ExpressionAttributeValues without an expression answers with a ": FilterExpression is null" suffix the service does not send

未关闭 适合新手
#722 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 4 天内回复

@LeeroyHannigan 已经在做这个了。

开始于 2026年11月2日。

  • #765 来自 @LeeroyHannigan —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust, sqlite
领域
database

调研方向

从 crates/core/src/expression/resolver.rs 中的 validate_expression_param_usage(约第 223 行)开始,它根据接收到的可携带值的参数列表构建后缀。然后查看 crates/engine/src/scan.rs 中的 handle_scan(第 109 到 115 行),它传入了 [ExpressionKind::Filter]。完成的标准是:带有 ExpressionAttributeValues 且没有 FilterExpression 的 Scan 返回的消息中不再包含 : FilterExpression is null 后缀,同时其他调用方的行为保持不变。请查看现有 Scan 验证测试中的预期文本。

由索引模型根据 Issue 内容生成。

描述

A Scan that carries ExpressionAttributeValues and no FilterExpression answers ExpressionAttributeValues can only be specified when using expressions: FilterExpression is null. The service's message ends after expressions.

Measured against Amazon DynamoDB in us-east-1 on 31 October 2026, each request twice, both answers identical. Table pk S HASH, sk S RANGE with three items. Eight Scan requests, each with "ExpressionAttributeValues": {":d": v} and no FilterExpression:

v Other fields Service ExtendDB main f49c5f823 (SQLite, release build)
{"N": "1"} none ValidationException: ExpressionAttributeValues can only be specified when using expressions ValidationException: ExpressionAttributeValues can only be specified when using expressions: FilterExpression is null
{"N": "1"} inside 1, 2, 10, 30 and 31 nested L values (five requests) none the same the same
{"M": {"k": {"N": "1"}}} none the same the same
{"N": "1"} "ProjectionExpression": "a" the same the same

The service sends no suffix in any of the eight. A ninth request with 32 nested L values answers the nesting text on the service (#564), so the service checks nesting before it checks for values without an expression.

Where the suffix comes from

validate_expression_param_usage in crates/core/src/expression/resolver.rs (line 223) builds the message from the value_expr_params list its caller passes: no suffix for an empty list, : <param> is null for one entry, : <a> and <b> are null for more. Its doc comment states that the service lists the value-capable expression parameters of the API and that the empty list matches Query. handle_scan passes &[ExpressionKind::Filter] (crates/engine/src/scan.rs, line 109 to 115), so Scan gets the FilterExpression is null suffix. The other callers:

Caller List passed Suffix produced
Scan (scan.rs 109) [Filter] : FilterExpression is null
Query (query.rs 222) [] none
PutItem (put_item.rs 112) [Condition] : ConditionExpression is null
DeleteItem (delete_item.rs 71) [Condition] : ConditionExpression is null
UpdateItem (update_item.rs 126) [Update, Condition] : UpdateExpression and ConditionExpression are null
GetItem (get_item.rs 45), BatchGetItem (batch_get_item.rs 73) [] (names only) none

The 31 October measurement covers Scan only. Query's no-suffix answer on main (ExpressionAttributeValues can only be specified when using expressions, sent with KeyConditions and no expression) was not measured on the service on that date; the doc comment states it matches the service. The PutItem, DeleteItem and UpdateItem suffixes were not measured on 31 October, so this issue makes no claim about them. The suffix text was added in d4b60e0be (3 June 2026) with the Scan caller in 006cc6e13.

主要语言
Rust
星标
517
派生
60
平均合并
4 天 19 小时
30 天内合并 PR
50

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ExtendDB/extenddb 的其他 Issue

查看 ExtendDB/extenddb 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。