ResolveZipJoins
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.
Value parameters
- rownumStyle
-
Whether to use
Subqueryboundaries suitable for Oracle-style ROWNUM semantics instead of standard ROW_NUMBER().
Attributes
- Source
- ResolveZipJoins.scala
- Graph
-
- Supertypes
- Known subtypes
-
class MySQLResolveZipJoins
Members list
Type members
Types
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.
Attributes
- Source
- ResolveZipJoins.scala
Value members
Concrete methods
Run 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 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.
Attributes
- Source
- ResolveZipJoins.scala
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.
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.
Attributes
- Source
- ResolveZipJoins.scala
Inherited methods
Attributes
- Inherited from:
- Function1
Attributes
- Inherited from:
- Function1
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Function1 -> Any
- Inherited from:
- Function1
Concrete fields
Attributes
- Source
- ResolveZipJoins.scala
Attributes
- Source
- ResolveZipJoins.scala
The unique name of the phase