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

why use table.ceilingEntry(internalKey)? #141

Open
XbuLee opened this issue Mar 8, 2023 · 0 comments
Open

why use table.ceilingEntry(internalKey)? #141

XbuLee opened this issue Mar 8, 2023 · 0 comments

Comments

@XbuLee
Copy link

XbuLee commented Mar 8, 2023

in this method ,why use method table.ceilingEntry() instead of method table.get() ?
in my opintion ,skipListMap can not set null value, if the return value is null, then it means that the map does not have this value.

    Slice slice = table.get(internalKey);
    if(slice==null){
      return null;
    }
    if(internalKey.getValueType() == ValueType.DELETION){
      return LookupResult.deleted(key);
    }else {
      return LookupResult.ok(key, slice);
    }
  }
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

No branches or pull requests

1 participant