v.22.1Bug Fix

Fix Ambiguous Query Formatting Issue in Distributed Queries

Fix issue with ambiguous query formatting in distributed queries that led to errors when some table columns were named ALL or DISTINCT. This closes #32391. #32490 (alexey-milovidov).