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

Đang mở Phù hợp với người mới
#722 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 4 ngày

@LeeroyHannigan đang làm issue này rồi.

Từ ngày 2/11/2026.

  • #765 của @LeeroyHannigan — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
70/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust, sqlite
Lĩnh vực
database

Hướng nghiên cứu

Bắt đầu từ validate_expression_param_usage trong crates/core/src/expression/resolver.rs (khoảng dòng 223), hàm này tạo hậu tố từ danh sách các tham số có thể mang giá trị mà nó nhận được. Sau đó xem handle_scan trong crates/engine/src/scan.rs (dòng 109 đến 115), hàm này truyền [ExpressionKind::Filter]. Hoàn thành khi một Scan có ExpressionAttributeValues và không có FilterExpression trả về thông báo không có hậu tố : FilterExpression is null, còn hành vi của các nơi gọi khác không thay đổi. Hãy kiểm tra văn bản mong đợi trong các bài kiểm thử xác thực Scan hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Rust
Star
517
Fork
60
Merge trung bình
4 ngày 19 giờ
Pull request đã merge (30 ngày)
50

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ExtendDB/extenddb

Tất cả issue của ExtendDB/extenddb

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.