DRILL-1125: Apply casts to handle different input types in the join condition