From 8866ab9fbbb08449274eb77571570e85fe609cb0 Mon Sep 17 00:00:00 2001 From: Guodong Jin Date: Thu, 28 Mar 2024 15:47:32 +0800 Subject: [PATCH 1/2] disable null for internal id columns --- CMakeLists.txt | 2 +- src/storage/store/column.cpp | 2 +- src/storage/store/rel_table_data.cpp | 6 +++--- test/test_files/tinysnb/call/call.test | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 81a7440e8cd..b2a137ecf1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -project(Kuzu VERSION 0.3.2.4 LANGUAGES CXX C) +project(Kuzu VERSION 0.3.2.5 LANGUAGES CXX C) find_package(Threads REQUIRED) diff --git a/src/storage/store/column.cpp b/src/storage/store/column.cpp index ff954fdc97e..2fe76401ba5 100644 --- a/src/storage/store/column.cpp +++ b/src/storage/store/column.cpp @@ -208,7 +208,7 @@ InternalIDColumn::InternalIDColumn(std::string name, const MetadataDAHInfo& meta BMFileHandle* dataFH, BMFileHandle* metadataFH, BufferManager* bufferManager, WAL* wal, transaction::Transaction* transaction, RWPropertyStats stats, bool enableCompression) : Column{name, *LogicalType::INTERNAL_ID(), metaDAHeaderInfo, dataFH, metadataFH, bufferManager, - wal, transaction, stats, enableCompression}, + wal, transaction, stats, enableCompression, false /*requireNullColumn*/}, commonTableID{INVALID_TABLE_ID} {} void InternalIDColumn::populateCommonTableID(ValueVector* resultVector) const { diff --git a/src/storage/store/rel_table_data.cpp b/src/storage/store/rel_table_data.cpp index ed2d11cf7e0..a43c7506fe0 100644 --- a/src/storage/store/rel_table_data.cpp +++ b/src/storage/store/rel_table_data.cpp @@ -146,9 +146,9 @@ RelTableData::RelTableData(BMFileHandle* dataFH, BMFileHandle* metadataFH, &DUMMY_WRITE_TRANSACTION, tableID, NBR_ID_COLUMN_ID, direction); auto nbrIDColName = StorageUtils::getColumnName("NBR_ID", StorageUtils::ColumnType::DEFAULT, RelDataDirectionUtils::relDirectionToString(direction)); - auto nbrIDColumn = ColumnFactory::createColumn(nbrIDColName, *LogicalType::INTERNAL_ID(), - *nbrIDMetadataDAHInfo, dataFH, metadataFH, bufferManager, wal, &DUMMY_WRITE_TRANSACTION, - RWPropertyStats::empty(), enableCompression); + auto nbrIDColumn = std::make_unique(nbrIDColName, *nbrIDMetadataDAHInfo, + dataFH, metadataFH, bufferManager, wal, &DUMMY_WRITE_TRANSACTION, RWPropertyStats::empty(), + enableCompression); columns.push_back(std::move(nbrIDColumn)); // Property columns. for (auto i = 0u; i < properties.size(); i++) { diff --git a/test/test_files/tinysnb/call/call.test b/test/test_files/tinysnb/call/call.test index c316cc12974..cb3221225e7 100644 --- a/test/test_files/tinysnb/call/call.test +++ b/test/test_files/tinysnb/call/call.test @@ -222,7 +222,7 @@ Binder exception: Cannot evaluate a.fName as a literal. 38 -STATEMENT CALL storage_info('knows') RETURN COUNT(*) ---- 1 -84 +82 -STATEMENT CALL storage_info('workAt') RETURN COUNT(*) ---- 1 -26 +24 From 05288a33f4546c0bd807d16d0ee6efbb85effae9 Mon Sep 17 00:00:00 2001 From: Guodong Jin Date: Sun, 31 Mar 2024 14:41:31 +0800 Subject: [PATCH 2/2] fix test --- test/test_files/tinysnb/call/call.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_files/tinysnb/call/call.test b/test/test_files/tinysnb/call/call.test index cb3221225e7..a57978c3d25 100644 --- a/test/test_files/tinysnb/call/call.test +++ b/test/test_files/tinysnb/call/call.test @@ -222,7 +222,7 @@ Binder exception: Cannot evaluate a.fName as a literal. 38 -STATEMENT CALL storage_info('knows') RETURN COUNT(*) ---- 1 -82 +80 -STATEMENT CALL storage_info('workAt') RETURN COUNT(*) ---- 1 -24 +22