$ 0 0 Using Spark Sql 2.4.0 you can do that:spark.sql("SELECT STRING(NULLIF(column,'')) as column_string")