Commit 40323db
committed
[BugFix] Guard sync MV fallback with isSyncMVQuery() hint check
Move the getMaterializedViewIndex() fallback from resolveTable() into
visitTable(), gated by TableRelation.isSyncMVQuery(). This avoids the
expensive linear scan for non-existent table names that are not sync MV
queries, matching the pattern used in QueryAnalyzer.
Also add missing test_table cleanup in PlannerMetaLockerTest.afterEach()
to prevent test pollution.
Signed-off-by: rickxz <herick.victor.rodrigues@hotmail.com>1 parent 6909362 commit 40323db
2 files changed
Lines changed: 32 additions & 13 deletions
File tree
- fe/fe-core/src
- main/java/com/starrocks/sql/analyzer
- test/java/com/starrocks/sql/analyzer
Lines changed: 28 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 179 | + | |
190 | 180 | | |
191 | 181 | | |
192 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
197 | 209 | | |
198 | 210 | | |
199 | 211 | | |
| |||
262 | 274 | | |
263 | 275 | | |
264 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
265 | 280 | | |
266 | 281 | | |
267 | 282 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
0 commit comments