v.21.8Improvement
Use Map Data Type for System Logs Tables in ClickHouse
UseMapdata type for system logs tables (system.query_log,system.query_thread_log,system.processes,system.opentelemetry_span_log). These tables will be auto-created with new data types. Virtual columns are created to support old queries. Closes #18698. #23934, #25773 (hexiaoting, sundy-li, Maksim Kita).
Why it matters
This feature updates system log tables to utilize theMap data type, which offers better flexibility and efficiency for storing complex key-value data. It maintains backward compatibility by creating virtual columns that support existing queries, solving the challenge of evolving internal data formats without breaking user workflows.How to use it
These system log tables are auto-created with the newMap data types after updating ClickHouse. Users do not need to manually enable this change; existing queries continue to work seamlessly via virtual columns that map old data types to the new structure.