Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ValueBuffer#Copy method #111

Merged
merged 1 commit into from
Jul 9, 2020
Merged

Fix ValueBuffer#Copy method #111

merged 1 commit into from
Jul 9, 2020

Conversation

asdine
Copy link
Collaborator

@asdine asdine commented Jul 9, 2020

This PR fixes a bug that made the ValueBuffer#Copy method to append nested arrays and nested documents at the end of the array.

Before:

genji> create table foo (a.1 int primary key);
genji> insert into foo (a) VALUES ([1, 2, [3, 4]]);
genji> select * from foo;
{
  "a": [
    1,
    2,
    [
      3,
      4
    ],
    [
      3,
      4
    ]
  ]
}

After:

genji> create table foo (a.1 int primary key);
genji> insert into foo (a) VALUES ([1, 2, [3, 4]]);
genji> select * from foo;
{
  "a": [
    1,
    2,
    [
      3,
      4
    ]
  ]
}

Thank you @tzzed for spotting this bug!

@asdine asdine added this to the v0.7.0 milestone Jul 9, 2020
@asdine asdine merged commit bedff11 into master Jul 9, 2020
@asdine asdine deleted the fix/valuebuffer-copy branch July 9, 2020 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants