fix: panic when create index on all none data (#37046)

#37045

Signed-off-by: lixinguo <xinguo.li@zilliz.com>
Co-authored-by: lixinguo <xinguo.li@zilliz.com>
pull/37122/head
smellthemoon 2024-10-24 17:09:28 +08:00 committed by GitHub
parent 53836f320a
commit 2b3f5bec07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -97,7 +97,7 @@ ScalarIndexSort<T>::BuildWithFieldData(
total_num_rows_ += data->get_num_rows();
length += data->get_num_rows() - data->get_null_count();
}
if (length == 0) {
if (total_num_rows_ == 0) {
PanicInfo(DataIsEmpty, "ScalarIndexSort cannot build null values!");
}

View File

@ -12786,7 +12786,6 @@ class TestCollectionSearchNoneAndDefaultData(TestcaseBase):
default_float_field_name]})
@pytest.mark.tags(CaseLabel.L2)
@pytest.mark.skip(reason="issue #36184")
def test_search_after_none_data_all_field_datatype(self, varchar_scalar_index, numeric_scalar_index,
null_data_percent, _async):
"""