v.23.11New Feature

Add _size virtual column for file size in bytes to storage engines

Add _size virtual column with file size in bytes to s3/file/hdfs/url/azureBlobStorage engines. #57126 (Kruglov Pavel).
Added a _size virtual column that provides the file size in bytes for tables using s3, file, hdfs, url, and azureBlobStorage table engines.

Why it matters

This feature allows users to easily retrieve the size of the underlying files directly from the table metadata without needing to query external storage or maintain separate tracking, improving convenience and transparency when working with external or file-based data sources.

How to use it

When querying tables created with the s3, file, hdfs, url, or azureBlobStorage engines, simply include the _size column in your SELECT statement to get the size of each file in bytes, for example:

SELECT _size, * FROM table_name