Skip to content

Commit

Permalink
feat: add a two-arg variant of substring (#513)
Browse files Browse the repository at this point in the history
Co-authored-by: Gil Forsyth <gforsyth@users.noreply.github.com>
  • Loading branch information
westonpace and gforsyth committed Jun 29, 2023
1 parent 6943400 commit a6ead70
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion extensions/functions_string.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ scalar_functions:
name: substring
description: >-
Extract a substring of a specified `length` starting from position `start`.
A `start` value of 1 refers to the first characters of the string.
A `start` value of 1 refers to the first characters of the string. When
`length` is not specified the function will extract a substring starting
from position `start` and ending at the end of the string.
impls:
- args:
- value: "varchar<L1>"
Expand All @@ -76,6 +78,24 @@ scalar_functions:
- value: i32
name: "length"
return: "string"
- args:
- value: "varchar<L1>"
name: "input"
- value: i32
name: "start"
return: "varchar<L1>"
- args:
- value: "string"
name: "input"
- value: i32
name: "start"
return: "string"
- args:
- value: "fixedchar<l1>"
name: "input"
- value: i32
name: "start"
return: "string"
-
name: regexp_match_substring
description: >-
Expand Down

0 comments on commit a6ead70

Please sign in to comment.