You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two (almost identical) queries below. One in PostGIS returns 78 features, the same one in apache-sedona returns 1 feature. I don't understand why - can anyone help/advise please?
PostGIS query - returns 78 features
WITH a_table AS (
SELECT st_boundary(geom) geom
FROM emea_eu_seu.albania_prefectures_2021
UNION ALL
SELECT st_boundary(geom) geom
FROM emea_eu_seu.albania_municipalities_2021
UNION ALL
SELECT st_boundary(geom) geom
FROM emea_eu_seu.albania_2_digit_postcode_areas_2021
),
b_table AS (
SELECT geom
FROM a_table
GROUP BY geom
),
c_table AS (
SELECT ST_Union(geom) geom
FROM b_table
),
d_table AS (
SELECT ST_Polygonize(geom) AS geom
FROM c_table
),
e_table AS (
SELECT st_dump(geom) geom
FROM d_table
)
SELECT COUNT(*) FROM e_table
Sedona query - returns 1 feature
%sql
WITH a_table AS (
SELECT st_boundary(st_geomfromwkb(geom_wkb)) geom
FROM hive_metastore.gfk_bronze.albania_prefectures_2021
UNION ALL
SELECT st_boundary(st_geomfromwkb(geom_wkb)) geom
FROM hive_metastore.gfk_bronze.albania_municipalities_2021
UNION ALL
SELECT st_boundary(st_geomfromwkb(geom_wkb)) geom
FROM hive_metastore.gfk_bronze.albania_2_digit_postcode_areas_2021
),
b_table AS (
SELECT geom
FROM a_table
GROUP BY geom
),
c_table AS (
SELECT ST_Union_Aggr(geom) geom
FROM b_table
),
d_table AS (
SELECT ST_Polygonize(geom) AS geom
FROM c_table
),
e_table AS (
SELECT st_dump(geom) geom
FROM d_table
)
SELECT COUNT(*) FROM e_table
The text was updated successfully, but these errors were encountered:
JimShady
changed the title
Issue with st_polygonize and/or st_dump?
Issue with st_dump?
Jul 15, 2024
After some more digging it appears that the issue is with st_dump. In apache-sedona it is not creating 78 rows (I think?) it might be returning an array of 78 items in one record? So perhaps I need to explode it?
Two (almost identical) queries below. One in PostGIS returns 78 features, the same one in apache-sedona returns 1 feature. I don't understand why - can anyone help/advise please?
PostGIS query - returns 78 features
Sedona query - returns 1 feature
%sql
The text was updated successfully, but these errors were encountered: