v.19.8Improvements

Check That Underlying Tables Support Sampling for Storagemerge #5366 (ivan)

Check that underlying tables support sampling for StorageMerge #5366 (Ivan)
Added a check in StorageMerge to verify that all underlying tables support sampling before allowing sampling queries.

Why it matters

This feature addresses the problem where sampling queries on StorageMerge could fail or produce incorrect results if any of the merged tables do not support sampling. By ensuring all underlying tables support sampling, it improves query reliability and correctness for users utilizing the sampling feature.

How to use it

When running sampling queries on a StorageMerge table, the engine now automatically checks support for sampling on all underlying tables. No additional user configuration is required; simply use SAMPLE clauses as usual, and the validation will occur transparently.