Skip to content

Commit

Permalink
Merge pull request #1936 from kuzudb/union-fix
Browse files Browse the repository at this point in the history
Fix union tag bug
  • Loading branch information
acquamarin committed Aug 16, 2023
2 parents c90fb84 + c31422c commit d71c54f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/vector/value_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ValueVector::ValueVector(LogicalType dataType, storage::MemoryManager* memoryMan

void ValueVector::setState(std::shared_ptr<DataChunkState> state) {
this->state = state;
if (dataType.getLogicalTypeID() == LogicalTypeID::STRUCT) {
if (dataType.getPhysicalType() == PhysicalTypeID::STRUCT) {
auto childrenVectors = StructVector::getFieldVectors(this);
for (auto& childVector : childrenVectors) {
childVector->setState(state);
Expand Down
7 changes: 7 additions & 0 deletions test/test_files/tinysnb/projection/single_label.test
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,13 @@ NO hex code
---- 1
hEl '"\

-LOG ReturnUnionTag
-STATEMENT MATCH (m:movies) RETURN union_tag(m.grade)
---- 3
credit
grade1
grade1

-CASE LargeListOfStruct
-DEFINE STRUCT_VAL REPEAT 2400 "{a: ${count}},"
-STATEMENT RETURN list_append([${STRUCT_VAL}{a: 99}], {a: 200})
Expand Down

0 comments on commit d71c54f

Please sign in to comment.