Regarding the following query from a related post: Collapse vertex rows into nested table type (aggregated by ID)
WITH cte (id, x, y) as (
SELECT 1, 100, 101 FROM DUAL UNION ALL
SELECT 1, 200, 201 FROM DUAL UNION ALL
SELECT 2, 300, 301 FROM DUAL UNION ALL
SELECT 2, 400, 401 FROM DUAL UNION ALL
SELECT 2, 500, 501 FROM DUAL UNION ALL
SELECT 3, 600, 601 FROM DUAL UNION ALL
SELECT 3, 700, 701 FROM DUAL UNION ALL
SELECT 3, 800, 801 FROM DUAL UNION ALL
SELECT 3, 900, 901 FROM DUAL
)
SELECT id,
CAST(
COLLECT( --
MDSYS.VERTEX_TYPE(x, y, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, id)
ORDER BY x, y
)
AS MDSYS.VERTEX_SET_TYPE
)
FROM cte
GROUP BY id
I'm unfamiliar with using an object type this way: MDSYS.VERTEX_TYPE(...)
.
What does MDSYS.VERTEX_TYPE(...)
achieve in that context? Is the type being used to construct an object, similar to how a constructor function would be used?