REPEAT (Lakehouse v1)
Returns a string consisting of the string str repeated count times. If count is less than 1, returns an empty string. Returns NULL if str or count are NULL.
Analyze Syntax
Section titled “Analyze Syntax”func.repeat(<str>, <count>)Analyze Examples
Section titled “Analyze Examples”func.repeat(<str>, <count>)┌─────────────────────────┐│ func.repeat('plaid', 3) │├─────────────────────────┤│ plaidplaidplaid │└─────────────────────────┘SQL Syntax
Section titled “SQL Syntax”REPEAT(<str>, <count>)Arguments
Section titled “Arguments”| Arguments | Description |
|---|---|
<str> | The string. |
<count> | The number. |
SQL Examples
Section titled “SQL Examples”SELECT REPEAT('databend', 3);┌──────────────────────────┐│ REPEAT('databend', 3) │├──────────────────────────┤│ databenddatabenddatabend │└──────────────────────────┘
SELECT REPEAT('databend', 0);┌───────────────────────┐│ REPEAT('databend', 0) │├───────────────────────┤│ │└───────────────────────┘
SELECT REPEAT('databend', NULL);┌──────────────────────────┐│ REPEAT('databend', NULL) │├──────────────────────────┤│ NULL │└──────────────────────────┘