-
Notifications
You must be signed in to change notification settings - Fork 299
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
Partial order by support #179
Conversation
d4f31f6
to
e7b164a
Compare
Only ascending sort is supported right now; we might need to write our own transient index to support ASC / DESC sort mix |
fn rowid(&self) -> Result<Ref<Option<u64>>> { | ||
Ok(self.rowid.borrow()) | ||
fn rowid(&self) -> Result<Option<u64>> { | ||
Ok(*self.rowid.borrow()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for dropping Ref here? Wont it cause additional memory copies in the fast-path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more of a hack because I can't figure out how to return a ref for PseudoCursor 😅. Any pointers would be helpful
fn rowid(&self) -> Result<Ref<Option<u64>>> {
let x = self
.current
.borrow()
.as_ref()
.map(|record| match record.values[0] {
OwnedValue::Integer(rowid) => rowid as u64,
_ => panic!("Expected integer value"),
});
Ok(x)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benclmnt I am not sure I understand what the problem is. A PseudoCursor
should be in ProgramState::cursors
like BTree cursors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On discord, we discussed about it more. I've since changed the implementation of Sorter::record
to follow the same function sig.
- Only SELECT * is supported - Only ASC is supported
Nice work, @benclmnt! 👏👏👏 |
No description provided.