You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "zhangfengcdt (via GitHub)" <gi...@apache.org> on 2025/10/22 02:30:21 UTC
[I] Support creating permanent views in Sedona and Spark [sedona]
zhangfengcdt opened a new issue, #2419:
URL: https://github.com/apache/sedona/issues/2419
Currently, we cannot create permanent views if the view uses Sedona expressions, for example,
```
CREATE VIEW nyc_buildings_with_functions AS
SELECT * FROM (
SELECT
nyc_buildings_geom_test.PROP_ADDR AS name,
nyc_buildings_geom_test.geom AS building_geom,
avg(elevation_zones_test.elevation) AS elevation
FROM
nyc_buildings_geom_test
JOIN
elevation_zones_test
ON
st_intersects(elevation_zones_test.zone_geom, elevation_zones_test.zone_geom)
GROUP BY
nyc_buildings_geom_test.PROP_ADDR, nyc_buildings_geom_test.geom
)
WHERE elevation > 0
```
It fails with the following errors:
[INVALID_TEMP_OBJ_REFERENCE] Cannot create the persistent object `spark_catalog`.`default`.`nyc_buildings_with_functions` of the type VIEW because it references to the temporary object `st_intersects` of the type FUNCTION. Please make the temporary object `st_intersects` persistent, or make the persistent object `spark_catalog`.`default`.`nyc_buildings_with_functions` temporary.
org.apache.spark.sql.AnalysisException: [INVALID_TEMP_OBJ_REFERENCE] Cannot create the persistent object `spark_catalog`.`default`.`nyc_buildings_with_functions` of the type VIEW because it references to the temporary object `st_intersects` of the type FUNCTION. Please make the temporary object `st_intersects` persistent, or make the persistent object `spark_catalog`.`default`.`nyc_buildings_with_functions` temporary.
at org.apache.spark.sql.errors.QueryCompilationErrors$.notAllowedToCreatePermanentViewByReferencingTempFuncError(QueryCompilationErrors.scala:2891)
We will need to fix this so that users can create permanent (not temp) views like this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Support creating permanent views in Sedona and Spark [sedona]
Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu closed issue #2419: Support creating permanent views in Sedona and Spark
URL: https://github.com/apache/sedona/issues/2419
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org