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
Prev Previous commit
Next Next commit
return TypeCheckSuccess
  • Loading branch information
Ngone51 committed Nov 12, 2019
commit 95caf40b494091ccab88e2d1b6a1cd7103361998
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case class PostgreCastToBoolean(child: Expression, timeZoneId: Option[String])
copy(timeZoneId = Option(timeZoneId))

override def checkInputDataTypes(): TypeCheckResult = child.dataType match {
case StringType | IntegerType => super.checkInputDataTypes()
case StringType | IntegerType => TypeCheckResult.TypeCheckSuccess
case dt => throw new UnsupportedOperationException(s"cannot cast type $dt to boolean")
Copy link
Contributor

Choose a reason for hiding this comment

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

We should follow other expressions and return TypeCheckResult.TypeCheckFailure here.

}

Expand Down