def _cast_spark_column_timestamp_to_long(self, scol: Column) -> Column: return scol.cast(LongType())
def date_sub_(c1: Column, c2: Column) -> Column: return ((c1.cast("timestamp").cast("long") - 60 * 60 * 24 * c2) .cast("timestamp").cast("date"))