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

Bugfix 1507+1509: dynamic schema different index append fixes #1529

Conversation

alexowens90
Copy link
Collaborator

Closes #1507
Closes #1509

While fixing, noticed that the added test test_append_range_index_from_zero would also not have passed, so fixed this too.

}
auto stop = old_index->start() + old_length * old_index->step();
normalization::check<ErrorCode::E_INCOMPATIBLE_INDEX>(
new_start == stop || (new_start == 0 && new_index->step() == 1),
Copy link
Collaborator

@vasil-pashov vasil-pashov Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this going to allow something like this to happen

    a
0   0
1   1
2   2

Append index (0, 1, 2)

    a
0   0
1   1
2   2
0   3
1   4
2   5

Or is there some other check preventing it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to allow appending index [0, 1, 2 to index [0, 1, 2], otherwise our default behaviour when you don't provide an index won't work. We only store the start and step though, so it will come out as:

0 0
1 1
2 2
3 3
4 4
5 5

@alexowens90 alexowens90 merged commit f3e5b86 into master Apr 26, 2024
114 checks passed
@alexowens90 alexowens90 deleted the bugfix/1507+1509/dynamic-schema-different-index-append-fixes branch April 26, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants