Get the last element from Apache Spark SQL split() Function

后端 未结 4 944
太阳男子
太阳男子 2021-02-06 13:54

I want to get the last element from the Array that return from Spark SQL split() function.

split(4:3-2:3-5:4-6:4-5:2,\'-\')

I know it can get b

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-06 14:20

    use split(MY_COLUMN,'-').getItem(0) if you are using Java

提交回复
热议问题