englefly commented on PR #68282:
URL: https://github.com/apache/doris/pull/68282#issuecomment-5787886957
Handled in 4879cc295ea, and the branch is now rebased onto the current
master (`776d8758b0c`).
Fixed: the injected row count and the delta baseline describe different
snapshots. `ALTER TABLE ... SET STATS ('row_count' = 'N')` replaces the
collected row count of the base index while the baseline stayed at the previous
analysis (or at the reset), and `DROP STATS t(c)` clears `userInjected` without
clearing either value, so the fallback combined them: TRUNCATE -> load N ->
inject N -> drop returned `N + (N - 0) = 2N` instead of N. The baseline now
moves to the current `updatedRows` when a job supplies the base index row
count, since such a count describes the table as of now, so the rows already
loaded are part of it. A job which collected another index still cannot move
the base index baseline.
Test added for the lifecycle you asked for:
`TableStatsMetaTest.testDeltaRowCountOfInjectedRowCountAfterDropStats` (reset
of a truncation -> load -> injection -> clearing `userInjected` as `DROP STATS`
does) asserts the record reports N and not 2N, before and after the flag is
cleared.
Rebase: the branch was 49 commits behind; `git rebase origin/master` applied
cleanly (no conflicts), the previous four commits are rewritten as
`0ada00e0d90`, `590c08a6bf6`, `9d9d00b14fe`, `2b868f25cd6` plus this one, and
the head is now on top of `776d8758b0c`.
Re-verified on the rebased revision with a full FE build and a local FE + BE
cluster: `TableStatsMetaTest` 8/8, `test_row_count_after_truncate` (including
the aggregate rollup case) and `test_drop_stats_and_truncate` pass, and the end
to end case still reports 3 rows after `TRUNCATE TABLE` + immediate load +
immediate query instead of 1.
--
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]