Returns the DataType
that can be used when generating code that converts input data
into the Spark SQL internal format.
Returns the DataType
that can be used when generating code that converts input data
into the Spark SQL internal format. Unlike externalDataTypeFor
, the DataType
returned
by this function can be more permissive since multiple external types may map to a single
internal type. For example, for an input with DecimalType in external row, its external types
can be scala.math.BigDecimal
, java.math.BigDecimal
, or
org.apache.spark.sql.types.Decimal
.
A factory for constructing encoders that convert external row to/from the Spark SQL internal binary representation.
The following is a mapping between Spark SQL types and its allowed external types: