Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pkg/ottl]: Add Sort converter #34283

Merged
merged 27 commits into from
Sep 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
07215d1
Add OTTL sort converter
kaisecheng Jul 27, 2024
04366f5
support mixed of numeric types to sort as double
kaisecheng Jul 27, 2024
e2b90e1
change log
kaisecheng Jul 28, 2024
73ecb89
add support to array type
kaisecheng Jul 29, 2024
dab7c86
Update pkg/ottl/ottlfuncs/func_sort.go
kaisecheng Jul 29, 2024
2e36574
- add support to pcommon.Value
kaisecheng Jul 29, 2024
d43e95f
update doc
kaisecheng Jul 29, 2024
447df3e
lint
kaisecheng Jul 30, 2024
028744e
tidy
kaisecheng Jul 30, 2024
1eb08f3
- preserve the data types in the sort result
kaisecheng Jul 30, 2024
a0d9791
update doc
kaisecheng Jul 30, 2024
d676f1a
fix unit test
kaisecheng Jul 31, 2024
4568ca0
Merge branch 'main' into ottl_sort_func
kaisecheng Jul 31, 2024
d166048
preserve the data type for boolean array
kaisecheng Jul 31, 2024
524e546
rename
kaisecheng Jul 31, 2024
8f2acd1
Merge branch 'main' of github.com:open-telemetry/opentelemetry-collec…
kaisecheng Aug 1, 2024
a13bdbc
fix CI codegen
kaisecheng Aug 1, 2024
8c0e371
Merge branch 'main' into ottl_sort_func
kaisecheng Aug 2, 2024
1bb3d86
Update pkg/ottl/ottlfuncs/README.md
kaisecheng Aug 2, 2024
2894981
Update pkg/ottl/ottlfuncs/func_sort.go
kaisecheng Aug 2, 2024
9c22e38
Update pkg/ottl/ottlfuncs/README.md
kaisecheng Aug 2, 2024
660f4fc
Update pkg/ottl/ottlfuncs/func_sort.go
kaisecheng Aug 2, 2024
3325267
remove multierr dependency
kaisecheng Aug 2, 2024
0a9b019
Merge branch 'main' into ottl_sort_func
kaisecheng Aug 2, 2024
b2f8062
Merge branch 'main' into ottl_sort_func
kaisecheng Aug 8, 2024
6e0e66d
Merge branch 'main' into ottl_sort_func
kaisecheng Aug 8, 2024
f2145f3
add more e2e tests
kaisecheng Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update pkg/ottl/ottlfuncs/func_sort.go
Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
  • Loading branch information
kaisecheng and evan-bradley authored Jul 29, 2024
commit dab7c864250b7652f7cce8bae215aff71050def4
2 changes: 1 addition & 1 deletion pkg/ottl/ottlfuncs/func_sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func createSortFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ot
return Sort(args.Target, order)
}

func Sort[K any](target ottl.Getter[K], order string) (ottl.ExprFunc[K], error) {
func sort[K any](target ottl.Getter[K], order string) (ottl.ExprFunc[K], error) {
return func(ctx context.Context, tCtx K) (any, error) {
val, err := target.Get(ctx, tCtx)
if err != nil {
Expand Down