Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently we simply check if list expr can cast to value expr during planning inlist expression. It looks no correct. We should get the coerce data type from the value expr and list exprs and then try to cast all exprs to the coerced data type.
Otherwise we will hit some issues like #2787 shows.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.