From 2b0e096e77ca763a0d3e69bb92d7642666d1bfa4 Mon Sep 17 00:00:00 2001 From: Richard Tia Date: Thu, 21 Jul 2022 12:19:12 -0700 Subject: [PATCH] refactor: remove promotions and function definitions for fixedchar --- extensions/functions_string.yaml | 91 ++++++-------------------------- 1 file changed, 16 insertions(+), 75 deletions(-) diff --git a/extensions/functions_string.yaml b/extensions/functions_string.yaml index f16a84c3c..dab8cb296 100644 --- a/extensions/functions_string.yaml +++ b/extensions/functions_string.yaml @@ -175,7 +175,7 @@ scalar_functions: - value: "varchar" name: "input" description: "The string to remove characters from." - - value: "varchar" + - value: "varchar" name: "characters" description: "The set of characters to remove." return: "varchar" @@ -187,14 +187,6 @@ scalar_functions: name: "characters" description: "The set of characters to remove." return: "string" - - args: - - value: "fixedchar" - name: "input" - description: "The string to remove characters from." - - value: "fixedchar" - name: "characters" - description: "The set of characters to remove." - return: "string" - name: rtrim description: >- @@ -205,7 +197,7 @@ scalar_functions: - value: "varchar" name: "input" description: "The string to remove characters from." - - value: "varchar" + - value: "varchar" name: "characters" description: "The set of characters to remove." return: "varchar" @@ -217,14 +209,6 @@ scalar_functions: name: "characters" description: "The set of characters to remove." return: "string" - - args: - - value: "fixedchar" - name: "input" - description: "The string to remove characters from." - - value: "fixedchar" - name: "characters" - description: "The set of characters to remove." - return: "string" - name: trim description: >- @@ -235,7 +219,7 @@ scalar_functions: - value: "varchar" name: "input" description: "The string to remove characters from." - - value: "varchar" + - value: "varchar" name: "characters" description: "The set of characters to remove." return: "varchar" @@ -247,14 +231,6 @@ scalar_functions: name: "characters" description: "The set of characters to remove." return: "string" - - args: - - value: "fixedchar" - name: "input" - description: "The string to remove characters from." - - value: "fixedchar" - name: "characters" - description: "The set of characters to remove." - return: "string" - name: lpad description: Left-pad the string with the characters until the specified length of the string has been reached. @@ -266,10 +242,10 @@ scalar_functions: - value: i32 name: "length" description: "The length of the output string." - - value: "varchar" + - value: "varchar" name: "characters" description: "The set of characters to use for padding." - return: "string" + return: "varchar" - args: - value: "string" name: "input" @@ -281,17 +257,6 @@ scalar_functions: name: "characters" description: "The set of characters to use for padding." return: "string" - - args: - - value: "fixedchar" - name: "input" - description: "The string to pad." - - value: i32 - name: "length" - description: "The length of the output string." - - value: "fixedchar" - name: "characters" - description: "The set of characters to use for padding." - return: "string" - name: rpad description: Right-pad the string with the characters until the specified length of the string has been reached. @@ -303,10 +268,10 @@ scalar_functions: - value: i32 name: "length" description: "The length of the output string." - - value: "varchar" + - value: "varchar" name: "characters" description: "The set of characters to use for padding." - return: "string" + return: "varchar" - args: - value: "string" name: "input" @@ -318,33 +283,28 @@ scalar_functions: name: "characters" description: "The set of characters to use for padding." return: "string" - - args: - - value: "fixedchar" - name: "input" - description: "The string to pad." - - value: i32 - name: "length" - description: "The length of the output string." - - value: "fixedchar" - name: "characters" - description: "The set of characters to use for padding." - return: "string" - name: center - description: Pad the string with characters from each side until the specified length of the string has been reached. + description: >- + Pad the string with characters from each side until the specified length of the string has + been reached. If padding is uneven, the default option is to have extra padding on the right. impls: - args: + - options: [ RIGHT, LEFT ] + required: false - value: "varchar" name: "input" description: "The string to pad." - value: i32 name: "length" description: "The length of the output string." - - value: "varchar" + - value: "varchar" name: "characters" description: "The set of characters to use for padding." - return: "string" + return: "varchar" - args: + - options: [ RIGHT, LEFT ] + required: false - value: "string" name: "input" description: "The string to pad." @@ -355,17 +315,6 @@ scalar_functions: name: "characters" description: "The set of characters to use for padding." return: "string" - - args: - - value: "fixedchar" - name: "input" - description: "The string to pad." - - value: i32 - name: "length" - description: "The length of the output string." - - value: "fixedchar" - name: "characters" - description: "The set of characters to use for padding." - return: "string" - name: left description: Extract count characters starting from the left of the string. @@ -378,10 +327,6 @@ scalar_functions: - value: "string" - value: i32 return: "string" - - args: - - value: "fixedchar" - - value: i32 - return: "string" - name: right description: Extract count characters starting from the right of the string. @@ -394,7 +339,3 @@ scalar_functions: - value: "string" - value: i32 return: "string" - - args: - - value: "fixedchar" - - value: i32 - return: "string"