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

Example implementation of enumerate #1386

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Example implementation of enumerate #1386

wants to merge 3 commits into from

Conversation

willdealtry
Copy link
Collaborator

Example of internal implementation of enumerate

@willdealtry willdealtry marked this pull request as ready for review March 11, 2024 15:09

class Proxy {
public:
using difference_type = ssize_t;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is difference_type supposed to represent? Is it difference between Enumerator::idx_? If so it seems a bit dangerous as idx_ is of unsigned type.

#include <arcticdb/log/log.hpp>

TEST(Enumerate, Vector) {
std::vector<int> vec = {1, 2, 3, 4};
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: static constexpr std::array = {1,2,3,4}

@@ -0,0 +1,119 @@
#pragma once
Copy link
Collaborator

Choose a reason for hiding this comment

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

BSL heading

IvoDD added a commit that referenced this pull request Mar 22, 2024
Introduces a new type LoadStrategy which has the load_type, the
include_deleted boolean and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version
IvoDD added a commit that referenced this pull request Mar 26, 2024
Introduces a new type LoadStrategy which has the load_type, the
include_deleted boolean and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain cpp test
IvoDD added a commit that referenced this pull request Mar 26, 2024
Introduces a new type LoadStrategy which has the load_type, the
include_deleted boolean and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain cpp test
IvoDD added a commit that referenced this pull request Mar 26, 2024
Introduces a new type LoadStrategy which has the load_type, the
include_deleted boolean and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain cpp test
IvoDD added a commit that referenced this pull request Mar 27, 2024
Introduces a new type LoadStrategy which has the load_type, the
include_deleted boolean and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain cpp test
IvoDD added a commit that referenced this pull request Apr 16, 2024
Introduces a new type LoadStrategy which has the load_type, the
include_deleted boolean and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain cpp test
IvoDD added a commit that referenced this pull request Apr 17, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain cpp test
IvoDD added a commit that referenced this pull request Apr 18, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
IvoDD added a commit that referenced this pull request Apr 18, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
IvoDD added a commit that referenced this pull request Apr 18, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
IvoDD added a commit that referenced this pull request Apr 24, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
IvoDD added a commit that referenced this pull request May 21, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
IvoDD added a commit that referenced this pull request May 21, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
IvoDD added a commit that referenced this pull request May 23, 2024
Introduces a new type LoadStrategy which has the load_type, the
to_load enum, which indicates whether to load ANY or only UNDELETED
versions and the version/time we need to search for.

With this commit we mostly preserve existing behavior with a few
exceptions:
- The newly introduced deleted/undeleted variants of LOAD_DOWNTO and LOAD_FROM_TIME are introduced and are handled appropriately and their behavior is documented in LoadStrategy.
- Abstract away the batch version map merging of LoadStrategies and fix
  a small bug there.
- Fixes #1386 by passing include_deleted=false when looking for as_of
  time or version

Also adds an elaborate FollowingVersionChain and
FollowingVersionChainWithCaching cpp tests
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.

None yet

2 participants