By Default spark not support Multi_Char Delimiter in spark 2.x
Spark 3.0 has added an improvement now to support multiple characters in csv. So when you run the same code in 3.0, you will get below output https://github.com/phatak-dev/spark-3.0-examples/blob/master/src/main/scala/com/madhukaraphatak/spark/sources/MultiCharacterDelimiterCSV.scala