Skip to content

Commit

Permalink
[1100] Inconsistent parameter order in RelsStore
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchak committed Jan 7, 2023
1 parent 08bcc40 commit 403642b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
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,
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

0 comments on commit 403642b

Please sign in to comment.