starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

Support INITCAP string function

Open murphyatwork opened this issue 4 months ago • 3 comments

Description Currently, StarRocks supports basic string case conversion functions like LOWER() and UPPER(), but it does not support INITCAP(). INITCAP is commonly available in Oracle, PostgreSQL, and Snowflake, and is useful for text formatting tasks, especially in reporting and data cleaning scenarios.

Proposal Add support for INITCAP(string) which capitalizes the first letter of each word and converts the rest to lowercase. • Words are delimited by whitespace or punctuation. • Behavior should be consistent with PostgreSQL’s INITCAP.

Example

SELECT INITCAP('hello world, STARROCKS database');
-- Expected: 'Hello World, Starrocks Database'

Use Cases • Standardizing names (e.g., john DOE → John Doe) • Formatting addresses, titles, or labels in BI queries • Simplifying ETL pipelines that require consistent casing

murphyatwork avatar Sep 02 '25 05:09 murphyatwork

I would like to work on this, can you assign me? @murphyatwork

liyanwei89 avatar Sep 04 '25 06:09 liyanwei89

I would like to work on this, can you assign me? @murphyatwork

great, thanks for contribution

murphyatwork avatar Sep 23 '25 02:09 murphyatwork

Hi @murphyatwork, If the currently assigned contributor is no longer working on this issue, could you please reassign it to me? I would like to work on it and try implementing INITCAP().

Thanks!

arvindKandpal-ksolves avatar Dec 12 '25 04:12 arvindKandpal-ksolves