Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
HyukjinKwon committed Mar 24, 2020
1 parent 51acfeb commit dfd9343
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,12 @@ object Cast {
}

/**
* Returns `true` iif it should change the nullability of this type in the container,
* e.g. map type, array type, expression, etc. This function should take the nullability
* in the container into account. For example, it should not force to a nullable type
* when null type is non-nullable, which means an empty array of null type.
* Returns `true` iff it should change the nullability of this type in map type,
* array type, expression, etc.
*
* Note that this function should take the nullability context into account.
* For example, it should not force to nullable type when null type in array
* type is non-nullable, which means an empty array of null type.
*/
def forceNullable(from: DataType, to: DataType): Boolean = (from, to) match {
case (_, _) if from == to => false
Expand Down

0 comments on commit dfd9343

Please # to comment.