Class UpCastRule

Object
org.apache.spark.sql.types.UpCastRule

public class UpCastRule extends Object
Rule that defines which upcasts are allow in Spark.
  • Constructor Details

    • UpCastRule

      public UpCastRule()
  • Method Details

    • numericPrecedence

      public static scala.collection.immutable.IndexedSeq<NumericType> numericPrecedence()
    • canUpCast

      public static boolean canUpCast(DataType from, DataType to)
      Returns true iff we can safely up-cast the from type to to type without any truncating or precision lose or possible runtime failures. For example, long to int, string to int are not up-casts.
      Parameters:
      from - (undocumented)
      to - (undocumented)
      Returns:
      (undocumented)