yoshidan / google-cloud-rust

Google Cloud Client Libraries for Rust.
MIT License
235 stars 84 forks source link

spanner: avoid emulator OutOfRange #73

Closed yoshidan closed 1 year ago

yoshidan commented 1 year ago

Reduce test data for avoiding OutOfRange

query error Status { code: OutOfRange, message: "Cannot construct array Value larger than 1048576 bytes", details: b"\x08\x0b\x126Cannot construct array Value larger than 1048576 bytes", metadata: MetadataMap { headers: {"content-type": "application/grpc"} }, source: None }

Here is the emulator cli. It looks emulator's size limit.

spanner> SELECT *,
      ->         ARRAY(SELECT AS STRUCT * FROM UserItem WHERE UserId = p.UserId) as UserItem,
      ->         ARRAY(SELECT AS STRUCT * FROM UserCharacter WHERE UserId = p.UserId) as UserCharacter
      ->         FROM User p WHERE UserId = "user_x_6";
ERROR: spanner: code = "OutOfRange", desc = "Cannot construct array Value larger than 1048576 bytes"