Skip to content

Commit bad3f61

Browse files
committed
modify
Signed-off-by: jinjiabao.jjb <[email protected]>
1 parent 6c1b979 commit bad3f61

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/impl/reorder/pqr_reorder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ PqrReorder::InsertVector(const void* vector, vsag::InnerIdType id) {
8080

8181
void
8282
PqrReorder::Train(const void* vector, uint64_t count) {
83-
int64_t train_size = count > TRAIN_MAX_SIZE ? TRAIN_MAX_SIZE : count;
83+
int64_t train_size = count > TRAIN_MAX_SIZE ? TRAIN_MAX_SIZE : static_cast<int64_t>(count);
8484
const auto* float_vector = reinterpret_cast<const float*>(vector);
8585
Vector<float> train_vectors(train_size * dim_, allocator_);
8686
Vector<float> residual_vectors(train_size * dim_, allocator_);

src/impl/reorder/reorder_parameter.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ namespace vsag {
2424

2525
ReorderParameterPtr
2626
CreateReorderParam(const JsonType& json) {
27-
CHECK_ARGUMENT(json.Contains(REORDER_TYPE),
28-
fmt::format("reorder missing '{}' field", REORDER_TYPE));
29-
std::string reorder_type = json[REORDER_TYPE].GetString();
27+
std::string reorder_type = FLATTEN_REORDER;
28+
if (json.Contains(REORDER_TYPE)) {
29+
reorder_type = json[REORDER_TYPE].GetString();
30+
}
3031
ReorderParameterPtr param = nullptr;
3132
if (reorder_type == PQR_REORDER) {
3233
param = std::make_shared<PqrReorderParameter>();

0 commit comments

Comments
 (0)