compare

fun compare(other: ColumnSchema, comparisonMode: ComparisonMode = LENIENT): CompareResult

Compares this column schema with the other column schema.

Column schemas of different kinds are never comparable: the result is then CompareResult.None, whatever the comparisonMode is.

For Value the types are compared, and for Group the DataFrameSchema of the nested columns. How strict that comparison is, is decided by the comparisonMode; see ComparisonMode for what each mode means.

For Frame the DataFrameSchema of the dataframes it holds is compared as well, but nullability counts too: two frame column schemas over the same nested schema that differ in nullability never match, whatever the comparisonMode is. The nullable one comes out IsSuper of the other, and the other IsDerived of it.

This comparison ignores the order of the columns inside a nested schema, while equals requires the same columns in the same order; see equals for that difference.

Return

a CompareResult that indicates whether this column schema compared to other is matching, derived, superset, or incomparable.

Parameters

other

The column schema to compare this one with.

comparisonMode

The mode to compare the column schemas by.

See also