Skip to content

Commit

Permalink
fix jsonindex parse string to int
Browse files Browse the repository at this point in the history
Signed-off-by: Xianhui.Lin <[email protected]>

fix unitest

Signed-off-by: Xianhui.Lin <[email protected]>

improve

Signed-off-by: Xianhui.Lin <[email protected]>

fix

Signed-off-by: Xianhui.Lin <[email protected]>

fix

Signed-off-by: Xianhui.Lin <[email protected]>

fix go test error

Signed-off-by: Xianhui.Lin <[email protected]>
  • Loading branch information
JsDove committed Jan 9, 2025
1 parent 0a18c04 commit 1852709
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions internal/core/src/common/Json.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ class Json {
template <typename T>
value_result<T>
at(uint16_t offset, uint16_t length) const {
if constexpr (std::is_same_v<T, std::string_view> ||
std::is_same_v<T, std::string>) {
return value_result<T>(T(data_.data() + offset, length));
}
return doc(offset, length).get<T>();
}

Expand Down
1 change: 0 additions & 1 deletion internal/indexnode/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func generateTestSchema() *schemapb.CollectionSchema {
{FieldID: 106, Name: "varchar", DataType: schemapb.DataType_VarChar},
{FieldID: 107, Name: "string", DataType: schemapb.DataType_String},
{FieldID: 108, Name: "array", DataType: schemapb.DataType_Array},
{FieldID: 109, Name: "json", DataType: schemapb.DataType_JSON},
{FieldID: 110, Name: "int32", DataType: schemapb.DataType_Int32},
{FieldID: 111, Name: "floatVector", DataType: schemapb.DataType_FloatVector, TypeParams: []*commonpb.KeyValuePair{
{Key: common.DimKey, Value: "8"},
Expand Down
3 changes: 2 additions & 1 deletion internal/indexnode/task_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ func (st *statsTask) Execute(ctx context.Context) error {
log.Ctx(ctx).Warn("stats wrong, failed to create text index", zap.Error(err))
return err
}
} else if st.req.GetSubJobType() == indexpb.StatsSubJob_JsonKeyIndexJob {
}
if st.req.GetSubJobType() == indexpb.StatsSubJob_Sort || st.req.GetSubJobType() == indexpb.StatsSubJob_JsonKeyIndexJob {
err = st.createJSONKeyIndex(ctx,
st.req.GetStorageConfig(),
st.req.GetCollectionID(),
Expand Down

0 comments on commit 1852709

Please sign in to comment.