Add LPAD / RPAD string functions #160
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
SELECT LPAD(col, n, 'x'), RPAD(col, n, 'x') — pad a string column to length n with a fill character (defaulting to space if the third arg is omitted, matching most SQL dialects). Not currently supported.
Closest existing pattern: SUBSTR(col, start, len) in src/scalar.zig for a multi-arg string function with a numeric arg. Two new functions but they share almost all their logic (just pad-left vs pad-right), so one PR covering both is reasonable.
Add to the SQL Reference table in README.md and unit tests for both, including the omitted-third-arg default.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Activity
fix: LPAD/RPAD truncate long values and leave NULL alone (#160) (#179)