How to remove nulls with array_remove Spark SQL Built-in Function

后端 未结 3 1366
攒了一身酷
攒了一身酷 2020-12-16 17:33

Spark 2.4 introduced new useful Spark SQL functions involving arrays but I was a little bit puzzled when I find out that the result of: select array_remove(array(1, 2,

3条回答
  •  眼角桃花
    2020-12-16 18:11

    https://docs.databricks.com/_static/notebooks/apache-spark-2.4-functions.html

    array_remove(array, T): array Remove all elements that equal to the given element from the given array.

    Note: I only referred the documentation and they have taken the same data. **null can never be equal to null.

提交回复
热议问题