-
Notifications
You must be signed in to change notification settings - Fork 86
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 create with serial #1812
Fix create with serial #1812
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,6 +86,9 @@ | |
|
||
void Column::setNull(common::offset_t nodeOffset) { | ||
nullColumn->setValue(nodeOffset); | ||
auto walPageInfo = createWALVersionOfPageIfNecessaryForElement(nodeOffset, numElementsPerPage); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm I think we only need these newly added lines when we are adding a new node, right? Can we change Let's discuss this a bit more when you are online. |
||
bufferManager->unpin(*wal->fileHandle, walPageInfo.pageIdxInWAL); | ||
fileHandle->releaseWALPageIdxLock(walPageInfo.originalPageIdx); | ||
} | ||
|
||
Value Column::readValueForTestingOnly(offset_t offset) { | ||
|
@@ -325,6 +328,23 @@ | |
} | ||
} | ||
|
||
void StructPropertyColumn::setNull(common::offset_t nodeOffset) { | ||
nullColumn->setValue(nodeOffset); | ||
// TODO(Ziyi): we currently only support create a node/rel with null struct property because | ||
// we don't have a mechanism to log the sub columns of a struct column. | ||
} | ||
|
||
void StructPropertyColumn::write(common::offset_t nodeOffset, | ||
common::ValueVector* vectorToWriteFrom, uint32_t posInVectorToWriteFrom) { | ||
bool isNull = vectorToWriteFrom->isNull(posInVectorToWriteFrom); | ||
if (nullColumn) { | ||
nullColumn->write(nodeOffset, vectorToWriteFrom, posInVectorToWriteFrom); | ||
} | ||
if (!isNull) { | ||
throw common::RuntimeException{"Can only update a null value to struct column."}; | ||
} | ||
} | ||
|
||
void InternalIDColumn::readInternalIDsFromPage(transaction::Transaction* transaction, | ||
uint8_t* frame, PageElementCursor& pageCursor, common::ValueVector* resultVector, | ||
uint32_t posInVector, uint32_t numValuesToRead, DiskOverflowFile* diskOverflowFile) { | ||
|
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.
I'm thinking if we should enforce a naming style for returning reference of a value, like
getNodePropertiesRef
, etc. What do you think?