diff --git a/src/common/vector/value_vector.cpp b/src/common/vector/value_vector.cpp index 788d565e4f..29fa13d58a 100644 --- a/src/common/vector/value_vector.cpp +++ b/src/common/vector/value_vector.cpp @@ -17,7 +17,7 @@ ValueVector::ValueVector(LogicalType dataType, storage::MemoryManager* memoryMan void ValueVector::setState(std::shared_ptr 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); diff --git a/test/test_files/tinysnb/projection/single_label.test b/test/test_files/tinysnb/projection/single_label.test index 22948b24b7..d6038a5a94 100644 --- a/test/test_files/tinysnb/projection/single_label.test +++ b/test/test_files/tinysnb/projection/single_label.test @@ -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})