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

Fix issue 1100 #1155

Merged
merged 1 commit into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/include/storage/store/rels_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ class RelsStore {
RelsStore(const Catalog& catalog, BufferManager& bufferManager, MemoryManager& memoryManager,
bool isInMemoryMode, WAL* wal);

// TODO(Ziyi): other getters requires (direction, nodeID, relID) but this one is requiring
// (direction, relID, nodeID).
inline Column* getRelPropertyColumn(RelDirection relDirection, table_id_t relTableID,
table_id_t boundNodeTableID, uint64_t propertyIdx) const {
inline Column* getRelPropertyColumn(RelDirection relDirection, table_id_t boundNodeTableID,
anuchak marked this conversation as resolved.
Show resolved Hide resolved
table_id_t relTableID, uint64_t propertyIdx) const {
return relTables.at(relTableID)
->getPropertyColumn(relDirection, boundNodeTableID, propertyIdx);
}
Expand Down
4 changes: 2 additions & 2 deletions src/storage/wal_replayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void WALReplayer::replayWALRecord(WALRecord& walRecord) {
storageStructureID.columnFileID.relPropertyColumnID.relNodeTableAndDir;
Column* column =
storageManager->getRelsStore().getRelPropertyColumn(relNodeTableAndDir.dir,
relNodeTableAndDir.relTableID, relNodeTableAndDir.srcNodeTableID,
relNodeTableAndDir.srcNodeTableID, relNodeTableAndDir.relTableID,
storageStructureID.columnFileID.relPropertyColumnID.propertyID);
diskOverflowFile =
reinterpret_cast<PropertyColumnWithOverflow*>(column)->getDiskOverflowFile();
Expand Down Expand Up @@ -368,7 +368,7 @@ VersionedFileHandle* WALReplayer::getVersionedFileHandleIfWALVersionAndBMShouldB
storageStructureID.columnFileID.relPropertyColumnID.relNodeTableAndDir;
Column* column =
storageManager->getRelsStore().getRelPropertyColumn(relNodeTableAndDir.dir,
relNodeTableAndDir.relTableID, relNodeTableAndDir.srcNodeTableID,
relNodeTableAndDir.srcNodeTableID, relNodeTableAndDir.relTableID,
storageStructureID.columnFileID.relPropertyColumnID.propertyID);
return storageStructureID.isOverflow ?
reinterpret_cast<PropertyColumnWithOverflow*>(column)
Expand Down
2 changes: 1 addition & 1 deletion test/copy_csv/copy_csv_lists_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ TEST_F(TinySnbListTest, RelPropertyColumnWithList) {
catalog->getReadOnlyVersion()->getNodeTableIDFromName("person");
auto& property = catalog->getReadOnlyVersion()->getRelProperty(tableID, "places");
auto col = graph->getRelsStore().getRelPropertyColumn(
RelDirection::FWD, tableID, nodeTablesForAdjColumnAndProperties, property.propertyID);
RelDirection::FWD, nodeTablesForAdjColumnAndProperties, tableID, property.propertyID);
ASSERT_TRUE(CheckEquals({"wwAewsdndweusd", "wek"}, col->readValue(0)));
ASSERT_TRUE(CheckEquals({"anew", "jsdnwusklklklwewsd"}, col->readValue(1)));
ASSERT_TRUE(CheckEquals({"awndsnjwejwen", "isuhuwennjnuhuhuwewe"}, col->readValue(5)));
Expand Down