[StellaDB] Query optimizer now handles type mismatch