v.23.1Improvement

Improve automatic structure usage in table functions with virtual columns to fix block structure mismatch errors

Improve automatic usage of structure from insertion table in table functions file/hdfs/s3 when virtual columns are present in a select query, it fixes the possible error Block structure mismatch or number of columns mismatch. #43695 (Kruglov Pavel).
Improves automatic detection and usage of the table structure from insertion tables in table functions like file, hdfs, and s3 when virtual columns are included in the SELECT query.

Why it matters

This feature addresses and fixes errors such as Block structure mismatch or number of columns mismatch that occurred when virtual columns were present in queries using table functions. It ensures more reliable and error-free data insertion by correctly handling virtual columns during automatic structure determination.

How to use it

Users do not need to make manual changes to enable this feature. The improved automatic structure handling works transparently when using the table functions file, hdfs, or s3 with INSERT statements or SELECT queries involving virtual columns.