IcebergSuperTypeFinder

@Singleton
class IcebergSuperTypeFinder(icebergTypesComparator: IcebergTypesComparator)

A utility class that determines a "supertype" given two Iceberg Types.

The "supertype" is a type to which both input types can safely be promoted without data loss. For instance, INT can be promoted to LONG, FLOAT can be promoted to DOUBLE, etc.

Constructors

Link copied to clipboard
constructor(icebergTypesComparator: IcebergTypesComparator)

Functions

Link copied to clipboard
fun findSuperType(existingType: Type, incomingType: Type, columnName: String): Type

Returns a supertype for existingType and incomingType if one exists.