v.23.7New Feature
Added firstLine function for extracting first line from multi-line string
Added firstLine function to extract the first line from the multi-line string. This closes #51172. #52209 (Mikhail Koviazin).Why it matters
ThefirstLine function addresses the need to quickly and efficiently retrieve the first line from text data containing multiple lines. This simplifies text processing tasks where only the initial line of a string is relevant, improving query expressiveness and reducing the need for complex string manipulations.How to use it
Use thefirstLine function in your queries by passing a multi-line string column or expression as an argument. It returns the substring up to the first newline character. For example:SELECT firstLine(multi_line_column) FROM table_name;