v.23.1Bug Fix

Fix type bug in Merge table and PREWHERE

Fix bug with wrong type in Merge table and PREWHERE, close #43324. #44716 (Vladimir C).