Repository navigation
Commit 8565db2
authored
[fix](ivm) Repair the removed rewrite-context constructor call in IvmNormalizeMTMVJoinTest (#67775)
#67646 replaced `IvmRewriteContext`'s public three-argument constructor
with factory methods. #67669, merged a few minutes later, added a test
that still called the removed constructor, so the fe-core test sources
no longer compile on master:
```
fe/fe-core/src/test/java/org/apache/doris/mtmv/ivm/IvmNormalizeMTMVJoinTest.java:1053: error:
constructor IvmRewriteContext cannot be applied to given types;
required: (Mode, MTMV, String, boolean, ExecutionKind, Optional<IvmDryRunLimit>, Map<...>, Optional<StreamReadMode>)
found: (Mode, MTMV, boolean)
```
The two changes do not conflict textually, so each PR was green on its
own and the breakage only showed up once both had landed.
### What is changed?
Construct the context in
`testFullKeysSinkMaterializesSameNamedUnprojectedKey` through the
factory the CREATE MATERIALIZED VIEW analyze flow already uses,
`IvmRewriteContext.normalize(mtmv)` (see `MTMVPlanUtil`), instead of the
removed constructor. Test-only change; no production code is touched.
`normalize(mtmv)` is needed here rather than `create(mtmvName)`: the
test enables full keys through `mtmv.getIvmInfo().setUseFullKeys(true)`,
which `IvmNormalizeMTMV.resolveUseFullKeys()` only reads on its fallback
path — when the context carries a null `useFullKeys` but a non-null
MTMV. `create(...)` leaves the MTMV null, which would silently resolve
that setting to `false`, so the test would compile but fail.
`Mode.NORMALIZE` also avoids the `Mode.INCREMENTAL` plan-signature
validation, and nothing in this test asserts on the mode.
### Test
- `IvmNormalizeMTMVJoinTest` — 44 tests, 0 failures, 0 errors
- `mvn test-compile -pl fe-core -am` — BUILD SUCCESS, no errors; all
fe-core test sources compile again1 parent ee4a917 commit 8565db2
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
1052 | | - | |
1053 | | - | |
| 1052 | + | |
1054 | 1053 | | |
1055 | 1054 | | |
1056 | 1055 | | |
| |||
0 commit comments