Add support for JOIN and UNION queries over sampled tables