GitHub user jiayuasu added a comment to the discussion: Databricks + Sedona
TypeError JavaPackage object is not callable
OK. You will need to run the following code (basically explicitly call
`SedonaContext.create`).
```
from pyspark.sql import functions as f
from sedona.spark import *
sedona = SedonaContext.create(spark)
df = sedona.sql("SELECT array(0.0, 1.0, 2.0) AS values")
min_value = f.array_min("values")
max_value = f.array_max("values")
df = df.select(ST_Point(min_value, max_value))
df.show()
```
I don’t know why the `create` is needed since Sedona on Databricks alreay did
the same via the SesonaSqlExtension in config. But anyway, this fixes the issue
GitHub link:
https://github.com/apache/sedona/discussions/1949#discussioncomment-13301887
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]