cloud-fan commented on a change in pull request #26463: [SPARK-29837][SQL] 
PostgreSQL dialect: cast to boolean
URL: https://github.com/apache/spark/pull/26463#discussion_r345039472
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
 ##########
 @@ -273,7 +273,7 @@ abstract class CastBase extends UnaryExpression with 
TimeZoneAwareExpression wit
   private[this] def needsTimeZone: Boolean = 
Cast.needsTimeZone(child.dataType, dataType)
 
   // [[func]] assumes the input is no longer null because eval already does 
the null check.
-  @inline private[this] def buildCast[T](a: Any, func: T => Any): Any = 
func(a.asInstanceOf[T])
+  @inline private[catalyst] def buildCast[T](a: Any, func: T => Any): Any = 
func(a.asInstanceOf[T])
 
 Review comment:
   this is minor but just want to make it clear. In `PostgreCastToBoolean` we 
call `super.castToBoolean`, why the modifier of `buildCast` becomes a problem?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to