Skip to content

DynamoDB - unexpected values set in AttributeValue  #814

@gchudnov

Description

@gchudnov

Hi,

When making a batchGetItem reqest, a reponse received from the server is transformed to an unexpected BatchGetItemResponse.ReadOnly-response (with some redundant fields).

For example, for the following response from the server:

{
  "Responses": {
    "History": [
      {
        "key": {
          "S": "V9"
        },
        "version": {
          "N": "-1049669123"
        },
        "records": {
          "S": "123"
        },
        "value": {
          "S": "yqKwfeak1sVV"
        }
      }
    ]
  },
  "UnprocessedKeys": {}
}

the attribute:

        "key": {
          "S": "V9"
        },

is transformed to the following AttributeValuein zio-aws:

0 = {Tuple2@9813} (country,zio.aws.dynamodb.model.AttributeValue$Wrapper@33aef772)
 _2 = {AttributeValue$Wrapper@9821} zio.aws.dynamodb.model.AttributeValue$Wrapper@33aef772
  s = {Some@9824} Some(V9)
  n = {None$@9825} None
  b = {None$@9825} None
  ss = {Some@9826} Some(List())
  ns = {Some@9827} Some(List())
  bs = {Some@9828} Some(List())
  m = {Some@9829} Some(Map())
  l = {Some@9830} Some(List())
  nul = {None$@9825} None
  bool = {None$@9825} None

^
here we can see that all Iterables, like SS, NS, BS, M, etc. are set to Some(List()), Some(Map()).

the expected behavior is to set them to None, since they were absent in the response from the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions