Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Check if a variant value is a variant null. Returns true if and only if the input is a variant null and false otherwise (including in the case of SQL NULL).
Syntax
from pyspark.sql import functions as sf
sf.is_variant_null(v)
Parameters
| Parameter | Type | Description |
|---|---|---|
v |
pyspark.sql.Column or str |
A variant column or column name. |
Returns
pyspark.sql.Column: a boolean column indicating whether the variant value is a variant null
Examples
from pyspark.sql import functions as sf
df = spark.createDataFrame([ {'json': '''{ "a" : 1 }'''} ])
df.select(sf.is_variant_null(sf.parse_json(df.json)).alias("r")).collect()
[Row(r=False)]