yujun777 opened a new pull request, #67775:
URL: https://github.com/apache/doris/pull/67775

   ### What problem does this PR solve?
   
   #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 again
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to