[FEA] JSON Reader: Support dropFieldIfAllNull
option
#4718
Labels
feature request
New feature or request
dropFieldIfAllNull
option
#4718
Description
In Spark, if you set the option
dropFieldIfAllNull
totrue
when reading a JSON file, it will ignore the columns which isNullType
.For example, write a JSON file in spark and then read it:
The value
null
, empty string and empty array (maybe more) will be dropped whendropFieldIfAllNull
is set totrue
.In CUDF, if we read the same JSON file, we will get:
The differences in Spark and CUDF are:
null
fields will be inferred asstring
in Spark (ifdropFieldIfAllNull
is false) butint8
in CUDFDescribe the solution you'd like
support
dropFieldIfAllNull
in spark-rapids, which should have same behavior as Spark.Additional context
https://issues.apache.org/jira/browse/SPARK-23772
The text was updated successfully, but these errors were encountered: