@@ -39,7 +39,6 @@ public static function process(
39
39
40
40
foreach ($ left_result ->rows as $ row ) {
41
41
foreach ($ right_result ->rows as $ r ) {
42
- $ left_row = $ row ;
43
42
$ candidate_row = \array_merge ($ row , $ r );
44
43
if (!$ filter
45
44
|| ExpressionEvaluator::evaluate (
@@ -95,41 +94,7 @@ public static function process(
95
94
break ;
96
95
97
96
case JoinType::RIGHT :
98
- $ null_placeholder = [];
99
-
100
- foreach ($ right_result ->columns as $ name => $ _ ) {
101
- $ parts = explode ('.%. ' , $ name );
102
- $ null_placeholder [$ right_table_name . '.%. ' . end ($ parts )] = null ;
103
- }
104
-
105
- $ joined_columns = array_merge ($ left_result ->columns , $ right_result ->columns );
106
-
107
- foreach ($ right_result ->rows as $ raw ) {
108
- $ any_match = false ;
109
-
110
- foreach ($ left_result ->rows as $ row ) {
111
- $ left_row = $ row ;
112
- $ candidate_row = \array_merge ($ left_row , $ raw );
113
-
114
- if (!$ filter
115
- || ExpressionEvaluator::evaluate (
116
- $ conn ,
117
- $ scope ,
118
- $ filter ,
119
- $ candidate_row ,
120
- new QueryResult ([], $ joined_columns )
121
- )
122
- ) {
123
- $ rows [] = $ candidate_row ;
124
- $ any_match = true ;
125
- }
126
- }
127
-
128
- if (!$ any_match ) {
129
- $ rows [] = $ raw ;
130
- }
131
- }
132
- break ;
97
+ throw new \Exception ('Right joins are currently unsupported ' );
133
98
134
99
case JoinType::CROSS :
135
100
$ joined_columns = array_merge ($ left_result ->columns , $ right_result ->columns );
@@ -185,10 +150,10 @@ protected static function buildNaturalJoinFilter(array $left_dataset, array $rig
185
150
throw new ParserException ("Attempted NATURAL join with no data present " );
186
151
}
187
152
188
- foreach ($ left as $ column => $ val ) {
153
+ foreach ($ left as $ column => $ _val ) {
189
154
$ name_parts = \explode ('.%. ' , $ column );
190
155
$ name = end ($ name_parts );
191
- foreach ($ right as $ col => $ v ) {
156
+ foreach ($ right as $ col => $ _v ) {
192
157
$ col_parts = \explode ('.%. ' , $ col );
193
158
$ colname = end ($ col_parts );
194
159
if ($ colname === $ name ) {
0 commit comments