Skip to content

Commit

Permalink
Fix the performance degradation issue of valid_json function (#125)
Browse files Browse the repository at this point in the history
* Fix the performance degradation issue of `valid_json` function

* Fix parse_int function signature error in documentation
  • Loading branch information
vircoys authored Dec 5, 2024
1 parent 5f7f54f commit 2793865
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pipeline/ptinput/funcs/fn_valid_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
package funcs

import (
"encoding/json"
"fmt"

"github.com/goccy/go-json"

"github.com/GuanceCloud/platypus/pkg/ast"
"github.com/GuanceCloud/platypus/pkg/engine/runtime"
"github.com/GuanceCloud/platypus/pkg/errchain"
Expand Down
2 changes: 1 addition & 1 deletion pipeline/ptinput/funcs/md/parse_int.en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `parse_int()` {#fn-parse-int}

Function prototype: `fn parse_int(val: int, base: int) str`
Function prototype: `fn parse_int(val: int, base: int) int`

Function description: Converts the string representation of a numeric value to a numeric value.

Expand Down
2 changes: 1 addition & 1 deletion pipeline/ptinput/funcs/md/parse_int.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `parse_int()` {#fn-parse-int}

函数原型:`fn parse_int(val: int, base: int) str`
函数原型:`fn parse_int(val: int, base: int) int`

函数说明:将数值的字符串表示转换为数值。

Expand Down

0 comments on commit 2793865

Please sign in to comment.