Description
In DROPMALFORMED mode the inferred schema may incorrectly contain no columns. This occurs when one document contains a valid JSON value (such as a string or number) and the other documents contain objects or arrays.
When the default case in JsonInferSchema.compatibleRootType is reached when merging a StringType and a StructType the resulting type will be a StringType, which is then discarded because a StructType is expected.