message: Adding verify code for lists
diff: @@ -866,36 +866,45 @@ void Vector::Verify(const SelectionVector &sel, idx_t count) {
  }
  }
  -// if (GetType().InternalType() == PhysicalType::LIST) {
  -// D_ASSERT(GetType().child_types().size() == 1);
  -// if (GetVectorType() == VectorType::CONSTANT_VECTOR) {
  -// if (!ConstantVector::IsNull(*this)) {
  -// ListVector::GetEntry(*this).Verify(ListVector::GetListSize(*this));
  -// auto le = ConstantVector::GetData<list_entry_t>(*this);
  -// D_ASSERT(le->offset + le->length <= ListVector::GetListSize(*this));
  -// }
  -// } else if (GetVectorType() == VectorType::FLAT_VECTOR) {
  -// if (ListVector::HasEntry(*this)) {
  -// ListVector::GetEntry(*this).Verify(ListVector::GetListSize(*this));
  -// }
  -// auto list_data = FlatVector::GetData<list_entry_t>(*this);
  -// for (idx_t i = 0; i < count; i++) {
  -// auto idx = sel.get_index(i);
  -// auto &le = list_data[idx];
  -// if (validity.RowIsValid(idx)) {
  -// D_ASSERT(le.offset + le.length <= ListVector::GetListSize(*this));
  -// }
  -// }
  -// }
  -// }
  -// TODO verify list and struct
  + if (GetType().InternalType() == PhysicalType::LIST) {
  + D_ASSERT(GetType().child_types().size() == 1);
  + if (GetVectorType() == VectorType::CONSTANT_VECTOR) {
  + if (!ConstantVector::IsNull(*this)) {
  + ListVector::GetEntry(*this).Verify(ListVector::GetListSize(*this));
  + auto le = ConstantVector::GetData<list_entry_t>(*this);
  + D_ASSERT(le->offset + le->length <= ListVector::GetListSize(*this));
  + }
  + } else if (GetVectorType() == VectorType::FLAT_VECTOR) {
  + if (ListVector::HasEntry(*this)) {
  + ListVector::GetEntry(*this).Verify(ListVector::GetListSize(*this));
  + }
  + auto list_data = FlatVector::GetData<list_entry_t>(*this);
  + for (idx_t i = 0; i < count; i++) {
  + auto idx = sel.get_index(i);
  + auto &le = list_data[idx];
  + if (validity.RowIsValid(idx)) {
  + D_ASSERT(le.offset + le.length <= ListVector::GetListSize(*this));
  + }
  + }
  + }
  + }
  #endif
  }
  void Vector::Verify(idx_t count) {
  + if (count > STANDARD_VECTOR_SIZE){
  + SelectionVector selection_vector(count);
  + for (size_t i = 0; i < count; i++) {
  + selection_vector.set_index(i, i);
  + }
  + Verify(selection_vector, count);
  + }
  + else{
  Verify(FlatVector::INCREMENTAL_SELECTION_VECTOR, count);
  }
  +}
  +
  string_t StringVector::AddString(Vector &vector, const char *data, idx_t len) {
  return StringVector::AddString(vector, string_t(data, len));
  }
  