v.20.4Bug Fix

Fix type conversion issues in View definitions to match SELECT queries

Convert types if the table definition of a View does not correspond to the SELECT query. This fixes #10180 and #10022 #10217 (alexey-milovidov)