yujun777 opened a new issue, #65878: URL: https://github.com/apache/doris/issues/65878
### Description While reviewing PR #65472, I found that `LogicalOlapTableStreamScan` has stream-specific state that is relevant to scan equivalence, especially `StreamReadMode` (`INCREMENTAL`, `SNAPSHOT`, and `RESET`). The class includes `readMode` in `equals()`, but it does not provide a stream-specific `hasSameScanState()` override. After PR #65472 makes scan-state comparison relevant to plan rewrites such as `PullUpJoinFromUnionAll`, two stream scans may be compared through the generic OLAP scan-state logic without explicitly checking stream-specific state. If scans with different stream read modes are treated as equivalent, a rewrite could reuse or merge a scan with different stream semantics. ### Requested follow-up Please add an override for `hasSameScanState()` in `LogicalOlapTableStreamScan` (or the corresponding `OlapStreamScan` abstraction) and include all stream-specific state that affects execution. Add FE unit tests covering: - equal stream scans with the same read mode; - different read modes; - any selected-partition or stream-lowering state that must participate in scan equivalence. This is a source-level follow-up to [PR #65472](https://github.com/apache/doris/pull/65472). The direct stream/binlog runtime impact still needs an end-to-end reproduction; this issue is opened to ensure the missing override and its contract are resolved explicitly. Related tracking issues: - [#65265](https://github.com/apache/doris/issues/65265) - [#65418](https://github.com/apache/doris/issues/65418) -- 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]
