Support UNNEST
#80
Labels
M
Medium sized task
SpecCompliance
Used for missing behavior from a spec. Create a label per spec and pair it with this label
Alternate syntax for Unnesting Nested Collections
In this section, we simply present an alternate way to express and think
about unnesting collections. In the spirit of some prior query
languages, PartiQL also allows you to optionally use the keyword
UNNEST
in theFROM
clause. The two queries below have identicalmeaning, regardless of whether
UNNEST
is used or not, assuming thereis no schema
e
with tableprojects
.equivalent to
In the same spirit, one may think that the
FROM
clause of theexample executes, in a sense, a
JOIN
between employees and projects.Except that unlike a conventional SQL join that would require an
ON
condition, the employees-projects join condition is implicit in the
nesting of the projects data into the employee data. If it helps you to
think in terms of
JOIN
, you may replace the comma withJOIN
.That is, the following two queries are equivalent.
equivalent to
And you can write both
JOIN
andUNNEST
as wellequivalent to
The text was updated successfully, but these errors were encountered: