Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ case class ArrayContains(left: Expression, right: Expression)
(left.dataType, right.dataType) match {
case (_, NullType) => Seq.empty
case (ArrayType(e1, hasNull), e2) =>
TypeCoercion.findTightestCommonType(e1, e2) match {
TypeCoercion.findWiderTypeForTwo(e1, e2) match {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of things need a justification and migration guide update with tests. Which JIRA caused this issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #22408 which is to prevent implicit downcasting of right expression.
It doesn't handle the case of decimal type upcasting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update migration guide.

case Some(dt) => Seq(ArrayType(dt, hasNull), dt)
case _ => Seq.empty
}
Expand Down