fix: not use json_shredding for json path is null (#45310)

#45284

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
This commit is contained in:
zhagnlu 2025-11-06 11:43:33 +08:00 committed by GitHub
parent 9032bb7668
commit 59c64bee07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1449,8 +1449,10 @@ class SegmentExpr : public Expr {
return false;
};
// if path is empty, json stats can not know key name,
// so we can't use json shredding data
return PlanUseJsonStats(context) && HasJsonStats(field_id) &&
!path_contains_integer(nested_path);
!nested_path.empty() && !path_contains_integer(nested_path);
}
virtual bool