Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 1e335d7

Browse files
authored
Update Kuzu from branch master (#121)
Co-authored-by: mewim <14037726+mewim@users.noreply.github.com>
1 parent af31b91 commit 1e335d7

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

Sources/cxx-kuzu/kuzu/src/common/arrow/arrow_converter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,11 @@ void ArrowConverter::setArrowFormat(ArrowSchemaHolder& rootHolder, ArrowSchema&
261261
rootHolder.nestedChildrenPtr.back().push_back(&rootHolder.nestedChildren.back()[0]);
262262
initializeChild(rootHolder.nestedChildren.back()[0]);
263263
child.children = &rootHolder.nestedChildrenPtr.back()[0];
264-
child.children[0]->name = "l";
264+
child.children[0]->name = "entries";
265265
setArrowFormat(rootHolder, **child.children, ListType::getChildType(dataType),
266266
fallbackExtensionTypes);
267+
child.children[0]->children[0]->flags &=
268+
~ARROW_FLAG_NULLABLE; // Map's keys must be non-nullable
267269
} break;
268270
case LogicalTypeID::STRUCT:
269271
case LogicalTypeID::NODE:

Sources/cxx-kuzu/kuzu/src/common/arrow/arrow_row_batch.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ void ArrowRowBatch::templateCopyNonNullValue<LogicalTypeID::ARRAY>(ArrowVector*
379379
template<>
380380
void ArrowRowBatch::templateCopyNonNullValue<LogicalTypeID::MAP>(ArrowVector* vector,
381381
const LogicalType& type, const Value& value, std::int64_t pos, bool fallbackExtensionTypes) {
382+
// Verify all keys are not null
383+
for (auto i = 0u; i < value.childrenSize; ++i) {
384+
if (value.children[i]->children[0]->isNull()) {
385+
throw RuntimeException{
386+
stringFormat("Cannot convert map with null key to Arrow: {}", value.toString())};
387+
}
388+
}
382389
return templateCopyNonNullValue<LogicalTypeID::LIST>(vector, type, value, pos,
383390
fallbackExtensionTypes);
384391
}
@@ -712,7 +719,9 @@ void ArrowRowBatch::copyNullValue(ArrowVector* vector, const Value& value, std::
712719
case LogicalTypeID::INTERVAL: {
713720
templateCopyNullValue<LogicalTypeID::INTERVAL>(vector, pos);
714721
} break;
715-
case LogicalTypeID::UUID:
722+
case LogicalTypeID::UUID: {
723+
templateCopyNullValue<LogicalTypeID::UUID>(vector, pos);
724+
} break;
716725
case LogicalTypeID::BLOB:
717726
case LogicalTypeID::STRING: {
718727
templateCopyNullValue<LogicalTypeID::STRING>(vector, pos);

Sources/cxx-kuzu/kuzu/src/main/query_result.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ void QueryResult::setQuerySummary(std::unique_ptr<QuerySummary> summary) {
9999
void QueryResult::setDBLifeCycleManager(
100100
std::shared_ptr<DatabaseLifeCycleManager> dbLifeCycleManager) {
101101
this->dbLifeCycleManager = dbLifeCycleManager;
102+
if (nextQueryResult) {
103+
nextQueryResult->setDBLifeCycleManager(dbLifeCycleManager);
104+
}
102105
}
103106

104107
std::unique_ptr<QueryResult> QueryResult::getQueryResultWithError(const std::string& errorMessage) {

0 commit comments

Comments
 (0)