The immutable state of the phase that can also be accessed by other phases.
The immutable state of the phase that can also be accessed by other phases.
Run the phase
Run the phase
The unique name of the phase
The unique name of the phase
Transform a zip
operation of the form
Bind(s1, Join(jlsym, jrsym, l @ Bind(_, _, Pure(StructNode(ldefs), _)), r @ Bind(_, _, Pure(StructNode(rdefs), _)), JoinType.Zip, LiteralNode(true)), sel)
into an equivalent mapping operation using RowNum
by first transforming both sides of the
join into zipWithIndex
and then using transformZipWithIndex
on those.
Transform a zipWithIndex
operation of the form
Bind(s1, Join(_, _, Bind(ls, from, Pure(StructNode(defs), _)), RangeFrom(offset), JoinType.Zip, LiteralNode(true)), p)
into an equivalent mapping operation using RowNum
.
Transform a zipWithIndex
operation of the form
Bind(s1, Join(_, _, Bind(ls, from, Pure(StructNode(defs), _)), RangeFrom(offset), JoinType.Zip, LiteralNode(true)), p)
into an equivalent mapping operation using RowNum
. This method can be overridden in
subclasses to implement non-standard translations.
Rewrite zip joins into a form suitable for SQL using inner joins and RowNumber columns.
We rely on having a Bind around every Join and both of its generators, which should have been generated by Phase.forceOuterBinds. The inner Binds need to select
Pure(StructNode(...))
which should be the outcome of Phase.flattenProjections.