mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
fix: fix like failed and add max columns limit (#44233)
#44137 Signed-off-by: luzhang <luzhang@zilliz.com> Co-authored-by: luzhang <luzhang@zilliz.com>
This commit is contained in:
parent
cc7a6d3ec6
commit
2f8620fa79
@ -64,8 +64,10 @@ constexpr const char* JSON_KEY_STATS_SHARED_FIELD_NAME = "__shared";
|
|||||||
inline constexpr const char* JSON_STATS_META_KEY_LAYOUT_TYPE_MAP =
|
inline constexpr const char* JSON_STATS_META_KEY_LAYOUT_TYPE_MAP =
|
||||||
"key_layout_type_map";
|
"key_layout_type_map";
|
||||||
// start json stats field id for mock column
|
// start json stats field id for mock column
|
||||||
const int64_t START_JSON_STATS_FIELD_ID = 1000;
|
// max user field id is 1024, so start json stats field id from 2000
|
||||||
const int64_t END_JSON_STATS_FIELD_ID = 10000;
|
// new field numbers will not exceed 10000 fields
|
||||||
|
const int64_t START_JSON_STATS_FIELD_ID = 2000;
|
||||||
|
const int64_t END_JSON_STATS_FIELD_ID = 12000;
|
||||||
|
|
||||||
const char DEFAULT_PLANNODE_ID[] = "0";
|
const char DEFAULT_PLANNODE_ID[] = "0";
|
||||||
const char DEAFULT_QUERY_ID[] = "0";
|
const char DEAFULT_QUERY_ID[] = "0";
|
||||||
|
|||||||
@ -1012,10 +1012,12 @@ PhyUnaryRangeFilterExpr::ExecRangeVisitorImplJsonByStats() {
|
|||||||
index->ExecutorForShreddingData<ColType>(
|
index->ExecutorForShreddingData<ColType>(
|
||||||
target_field, executor, nullptr, res_view, valid_res_view);
|
target_field, executor, nullptr, res_view, valid_res_view);
|
||||||
LOG_DEBUG(
|
LOG_DEBUG(
|
||||||
"using shredding data's field: {} with value {}, count {}",
|
"using shredding data's field: {} with value {}, count {} "
|
||||||
|
"for segment {}",
|
||||||
target_field,
|
target_field,
|
||||||
val,
|
val,
|
||||||
res_view.count());
|
res_view.count(),
|
||||||
|
segment_->get_segment_id());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -628,7 +628,7 @@ BatchUnaryCompare(const T* src,
|
|||||||
|
|
||||||
template <typename GetType, typename ValType>
|
template <typename GetType, typename ValType>
|
||||||
class ShreddingExecutor {
|
class ShreddingExecutor {
|
||||||
using IndexInnerType =
|
using InnerType =
|
||||||
std::conditional_t<std::is_same_v<GetType, std::string_view>,
|
std::conditional_t<std::is_same_v<GetType, std::string_view>,
|
||||||
std::string,
|
std::string,
|
||||||
GetType>;
|
GetType>;
|
||||||
@ -659,7 +659,7 @@ class ShreddingExecutor {
|
|||||||
private:
|
private:
|
||||||
void
|
void
|
||||||
ExecuteOperation(const GetType* src, size_t size, TargetBitmapView res) {
|
ExecuteOperation(const GetType* src, size_t size, TargetBitmapView res) {
|
||||||
BatchUnaryCompare<GetType, ValType>(src, size, val_, op_type_, res);
|
BatchUnaryCompare<GetType, InnerType>(src, size, val_, op_type_, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -677,7 +677,7 @@ class ShreddingExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proto::plan::OpType op_type_;
|
proto::plan::OpType op_type_;
|
||||||
ValType val_;
|
InnerType val_;
|
||||||
std::string pointer_;
|
std::string pointer_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -5424,6 +5424,13 @@ if param targetVecIndexVersion is not set, the default value is -1, which means
|
|||||||
DefaultValue: "1024",
|
DefaultValue: "1024",
|
||||||
Doc: "the max number of columns to shred",
|
Doc: "the max number of columns to shred",
|
||||||
Export: true,
|
Export: true,
|
||||||
|
Formatter: func(value string) string {
|
||||||
|
v := getAsInt(value)
|
||||||
|
if v > 10000 {
|
||||||
|
return "10000"
|
||||||
|
}
|
||||||
|
return strconv.Itoa(v)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
p.JSONStatsMaxShreddingColumns.Init(base.mgr)
|
p.JSONStatsMaxShreddingColumns.Init(base.mgr)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user