注意:以下翻译的准确性尚未经过验证。这是使用 AIP ↗ 从原始英文文本进行的机器翻译。
array(*cols)array_contains(col, value)size(col)sort_array(col, asc=True)struct(*cols)asc(col)desc(col)bitwiseNOT(col)shiftLeft(col, numBits)shiftRight(col, numBits)shiftRightUnsigned(col, numBits)coalesce(*cols)isnan(col)isnull(col)col(col) or column(col)create_map(*cols)explode(col)expr(str)hash(*cols)input_file_name()posexplode(col)sha1(col)sha2(col, numBits)soundex(col)spark_partition_id()from_json(col, schema, options={})get_json_object(col, path)json_tuple(col, *fields)to_json(col, options={})checkpoint(eager=True)
setCheckpointDir(dir)函数设置自定义检查点目录,该上下文可以通过ctx.spark_session.sparkContext访问。确保将ctx作为输入参数包含在变换的compute()函数中。localCheckpoint(eager=True)checkpoint()函数用于将DataFrame临时存储在磁盘上,而localCheckpoint()将它们存储在执行器内存中。使用localCheckpoint()时,您无需设置目录。使用eager参数值来设置DataFrame是否立即进行检查点(默认值为True)。