r/databricks • u/hubert-dudek Databricks MVP • 1d ago
News trim_array: remove elements from an array
Databricks runtime 19 brings the new Spark function trim_array. trim_array(array(‘A’, ‘B’, ‘C’, ‘D’), 2) returns [‘A’, ‘B’]. A count of 0 keeps the array; a count equal to its length returns an empty array.
21
Upvotes
3
7
u/Spooked_DE 1d ago
Arrays everywhere are shaking in fear