-
enhance: [2.6] Cherry pick nil type row based feature & bump version (#48464)
发布于
2026-03-24 06:19:30 +00:00 Cherry-pick from master
pr: #47712
Related to #47711Enable Go pointer struct fields (*string, *int32, etc.) to represent
nullable columns in the row-based data processing path. A nil pointer
maps to a NULL value in Milvus; a non-nil pointer dereferences to the
actual value.Changes:
- ParseSchema: pointer fields auto-infer Nullable=true (PK excluded)
- AnyToColumns: use reflect.Value.IsNil() to call AppendNull for nil
pointers, Elem().Interface() for non-nil — bypasses Go's typed-nil
problem where (*T)(nil) as interface{} is != nil - SetField: wrap/unwrap pointer values during field assignment
- fillData/fillPKEntry: check IsNull() on columns and set nil pointers
for null values, wrap non-null values in reflect.New pointers - Dynamic field path: same nil/deref logic for pointer fields going into
the JSON dynamic column
Signed-off-by: Congqi Xia congqi.xia@zilliz.com
下载附件