Skip to content

Commit

Permalink
fix codereview
Browse files Browse the repository at this point in the history
Signed-off-by: Xianhui.Lin <[email protected]>
  • Loading branch information
JsDove committed Jan 9, 2025
1 parent 2a9aba2 commit 0a18c04
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
5 changes: 0 additions & 5 deletions internal/core/src/exec/expression/TermExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ PhyTermFilterExpr::Eval(EvalCtx& context, VectorPtr& result) {
default:
PanicInfo(DataTypeInvalid, "unknown data type: {}", type);
}
std::cout << "optimize cost:"
<< std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::steady_clock::now() - start)
.count()
<< std::endl;
break;
}
case DataType::ARRAY: {
Expand Down
8 changes: 2 additions & 6 deletions internal/core/src/index/JsonKeyInvertedIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ JsonKeyInvertedIndex::AddJson(const char* json, int64_t offset) {
jsmn_parser parser;
jsmntok_t* tokens = (jsmntok_t*)malloc(16 * sizeof(jsmntok_t));
if (!tokens) {
fprintf(stderr, "Memory allocation failed\n");
PanicInfo(ErrorCode::UnexpectedError, "alloc jsmn token failed");
return;
}
int num_tokens = 0;
Expand Down Expand Up @@ -213,18 +213,14 @@ JsonKeyInvertedIndex::BuildWithFieldData(
for (const auto& data : field_datas) {
total += data->get_null_count();
}
null_offset.reserve(total);
}
int64_t offset = 0;
if (schema_.nullable()) {
for (const auto& data : field_datas) {
auto n = data->get_num_rows();
for (int i = 0; i < n; i++) {
if (!data->is_valid(i)) {
null_offset.push_back(i);
std::string empty = "";
wrapper_->add_multi_data(&empty, 0, offset++);
return;
continue;
}
AddJson(static_cast<const milvus::Json*>(data->RawValue(i))
->data()
Expand Down
1 change: 0 additions & 1 deletion internal/indexnode/task_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ func (st *statsTask) createJSONKeyIndex(ctx context.Context,
continue
}
log.Info("field enable json key index, ready to create json key index", zap.Int64("field id", field.GetFieldID()))
// create text index and upload the text index files.
files, err := getInsertFiles(field.GetFieldID())
if err != nil {
return err
Expand Down

0 comments on commit 0a18c04

Please sign in to comment.