I could find in 3.2.0 version this functionality was added in 2021. It is described in the documentation. You can use SparkSQL API https://spark.apache.org/docs/latest/api/sql/index.html#decode