Commit 162bf30
authored
Fixed issue 945 where count(*) would have incorrect return values.
NOTE -
We need to re-evaluate if we want to use output_node or not.
If output_node is set to false, then it basically short circuits
match for instances where a variable isn't specified -
MATCH () RETURN 0;
MATCH () MATCH () RETURN 0;
While, on the surface, this appears to be a good way to improve
execution time of commands that won't do anything, it also
causes chained commands to not work correctly. This is because
a match without a variable will still feed its tuples to the next
stage(s) even though they won't necessarily be sent to the output.
For example, with count(*) -
MATCH () RETURN count(*);
MATCH () MATCH RETURN count(*);
With output_node set to false, it won't send the tuples. We will
likely need to remove all of the output_node logic. However, this
needs to be reviewed. For now, we just set it to true and update
the output of the regression tests.
Updated regression tests to accomodate the change.
Added new regression tests to cover overlooked cases.
1 parent dc82c93 commit 162bf30
6 files changed
Lines changed: 312 additions & 46 deletions
File tree
- regress
- expected
- sql
- src/backend/parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
707 | 707 | | |
708 | 708 | | |
709 | 709 | | |
710 | | - | |
711 | 710 | | |
| 711 | + | |
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | 170 | | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2230 | 2230 | | |
2231 | 2231 | | |
2232 | 2232 | | |
2233 | | - | |
2234 | 2233 | | |
2235 | | - | |
2236 | 2234 | | |
| 2235 | + | |
| 2236 | + | |
2237 | 2237 | | |
2238 | 2238 | | |
2239 | 2239 | | |
| |||
2242 | 2242 | | |
2243 | 2243 | | |
2244 | 2244 | | |
2245 | | - | |
2246 | 2245 | | |
2247 | | - | |
2248 | 2246 | | |
| 2247 | + | |
| 2248 | + | |
2249 | 2249 | | |
2250 | 2250 | | |
2251 | 2251 | | |
| |||
2284 | 2284 | | |
2285 | 2285 | | |
2286 | 2286 | | |
2287 | | - | |
2288 | 2287 | | |
2289 | | - | |
2290 | 2288 | | |
| 2289 | + | |
| 2290 | + | |
2291 | 2291 | | |
2292 | 2292 | | |
2293 | 2293 | | |
| |||
2317 | 2317 | | |
2318 | 2318 | | |
2319 | 2319 | | |
2320 | | - | |
2321 | 2320 | | |
2322 | | - | |
2323 | 2321 | | |
| 2322 | + | |
| 2323 | + | |
2324 | 2324 | | |
2325 | 2325 | | |
2326 | 2326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1135 | 1172 | | |
1136 | 1173 | | |
1137 | 1174 | | |
1138 | 1175 | | |
1139 | 1176 | | |
1140 | 1177 | | |
| 1178 | + | |
1141 | 1179 | | |
1142 | 1180 | | |
1143 | 1181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4078 | 4078 | | |
4079 | 4079 | | |
4080 | 4080 | | |
4081 | | - | |
| 4081 | + | |
4082 | 4082 | | |
4083 | 4083 | | |
4084 | 4084 | | |
| |||
4095 | 4095 | | |
4096 | 4096 | | |
4097 | 4097 | | |
| 4098 | + | |
| 4099 | + | |
| 4100 | + | |
| 4101 | + | |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
| 4106 | + | |
| 4107 | + | |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
4098 | 4114 | | |
4099 | 4115 | | |
4100 | 4116 | | |
| |||
0 commit comments