One of the solution of [FAILED_READ_FILE.NO_HINT] Error while reading file, when display() or SELECT
I got stuck with the above error when using `spark.read.table().display()` or directly query the table using %sql.
While the display method is just one example, it's likely that this error can occur in other situations as well.
So, the workaround I’m about to share is just one possible solution.
Avoid void type
If a void type exists in a database, it may prevent the data from being displayed, such as when using SQL.
This often happens when using spark.createDataFrame to create a Spark DataFrame from a Pandas DataFrame.
For example, columns that contain only null values may be automatically inferred as void types by Spark. When this happens, the data cannot be displayed.
An even trickier case is when an object-type column contains dictionaries, and the value inside those dictionaries is inferred as a void type. In this case, the same error can occur.