Fwd: Question about ARRAY_INSERT between Spark and Databricks

2023-08-14 Thread Ran Tao
> Forward to dev Yes, the databricks runtime 13.0 and 13.1 and 13.2 are all ok and have the same behavior with open source Apache Spark 3.4.x. But I think the docs of databricks need to be updated[1]. It's confusing. [1]

Re: Question about ARRAY_INSERT between Spark and Databricks

2023-08-13 Thread Sean Owen
There shouldn't be any difference here. In fact, I get the results you list for 'spark' from Databricks. It's possible the difference is a bug fix along the way that is in the Spark version you are using locally but not in the DBR you are using. But, yeah seems to work as. you say. If you're

Question about ARRAY_INSERT between Spark and Databricks

2023-08-13 Thread Ran Tao
Hi, devs. I found that the ARRAY_INSERT[1] function (from spark 3.4.0) has different semantics with databricks[2]. e.g. // spark SELECT array_insert(array('a', 'b', 'c'), -1, 'z'); ["a","b","z","c"] // databricks SELECT array_insert(array('a', 'b', 'c'), -1, 'z'); ["a","b","c","z"] //