edgar2020 commented on code in PR #16862: URL: https://github.com/apache/druid/pull/16862#discussion_r1711764709
########## docs/querying/sql-functions.md: ########## @@ -1414,11 +1562,32 @@ Returns the number of the row within the window starting from 1. ## RPAD -`RPAD(<CHARACTER>, <INTEGER>, [<CHARACTER>])` +Returns a string of size `length` from `expr`, right-padded with `chars`. The default value for `chars` is a space character. Truncates `expr` to `length` if `length` is shorter than the length of `expr`. -**Function type:** [Scalar, string](sql-scalar.md#string-functions) +* **Syntax:** `RPAD(expr, length[, chars])` +* **Function type:** Scalar, string + +<details><summary>Example</summary> + +The following example inserts `+` characters as padding to the right of the `OriginState` column from the `flight-carriers` datasource, making the return expression a length of `5` characters. Review Comment: I included it because the definition includes: "Returns a string of size `length`", so I though it important to point it out in the definition. I do not think it is absolutely necessary, but I still think its useful to distinguish that its different than just insert x characters to the front/back of the string -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
