v.19.13New Feature
Allow to Specify a List of Columns with Columns('regexp') Expression That Works Like a More Sophisticated Variant of * Asterisk
Allow to specify a list of columns withCOLUMNS('regexp')expression that works like a more sophisticated variant of*asterisk. #5951 (mfridental), (alexey-milovidov)
Why it matters
This feature allows users to select multiple columns based on pattern matching using regular expressions, simplifying queries where columns follow naming conventions and avoiding the need to explicitly list each column. It enhances query expressiveness and maintainability.How to use it
Use theCOLUMNS('regexp') function in your SELECT statements where you want to match columns by a regular expression pattern. For example:SELECT COLUMNS('^prefix_') FROM table_nameThis will select all columns starting with the prefix "prefix_".