File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -688,7 +688,7 @@ func (i *crossJoinIterator) Close(ctx *sql.Context) (err error) {
688688 return err
689689}
690690
691- // lateralJoinIter is an iterator that performs a lateral join.
691+ // lateralJoinIterator is an iterator that performs a lateral join.
692692// A LateralJoin is a join where the right side is a subquery that can reference the left side, like through a filter.
693693// MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/lateral-derived-tables.html
694694// Example:
@@ -806,8 +806,9 @@ func (i *lateralJoinIterator) loadSecondary(ctx *sql.Context) error {
806806
807807func (i * lateralJoinIterator ) buildRow (primaryRow , secondaryRow sql.Row ) sql.Row {
808808 row := make (sql.Row , i .rowSize )
809- copy (row , primaryRow )
810- copy (row [len (primaryRow ):], secondaryRow )
809+ copy (row , i .parentRow )
810+ copy (row [len (i .parentRow ):], primaryRow )
811+ copy (row [len (i .parentRow )+ len (primaryRow ):], secondaryRow )
811812 return row
812813}
813814
You can’t perform that action at this time.
0 commit comments