pjfanning opened a new pull request, #1311:
URL: https://github.com/apache/poi/pull/1311

   ## Summary
   
   `IStabilityClassifier` is consulted in exactly one place — 
`WorkbookEvaluator.evaluateAny` — and nothing asserted what that line does. 
`SheetRangeEvaluatorTest` passes `TOTALLY_IMMUTABLE` only to construct an 
evaluator, and `BaseTestForkedEvaluator.testBasic`'s custom classifier does not 
influence its assertions (it would pass with `null`).
   
   Adds `BaseTestFormulaEvaluatorStabilityClassifier` with HSSF and XSSF 
subclasses (which supply `HSSFFormulaEvaluator.create(wb, classifier, null)` / 
`XSSFFormulaEvaluator.create(...)`), on the shared fixture from #1307/#1308:
   
   - **`totallyImmutableGivesTheSameResults`** — results are identical to the 
default, and `clearAllCachedResultValues()` still picks up changes.
   - **`totallyImmutableDoesNotTrackInputs`** — with no dependencies recorded, 
`notifyUpdateCell` on a plain input does not reach the formulas that read it; 
`notifySetFormula` on a formula cell still discards that cell's own result but 
not its dependents'. This is the documented trade-off (and what the ~27% saving 
in the HSSF benchmark buys).
   - **`selectiveClassifierTracksOnlyNonFinalCells`** — `Prices` final, `Data` 
not: data-sheet changes propagate through the whole chain, lookup-table changes 
don't.
   - **`finalFormulaCellWithNonFinalInputsIsStillTracked`** — the rule 
`shouldCellDependencyBeRecorded || cce.isInputSensitive()`: declaring the 
formula block final while the data rows aren't must still propagate, because a 
formula whose inputs were recorded is itself input-sensitive; conversely a 
formula whose inputs are all final has nothing recorded for it.
   - **`classifierIsAskedAboutEveryCellRead`** — a recording classifier sees 
the plain inputs, the cross-sheet lookup cells and the formula cells (including 
via the defined name) with the right `(sheetIndex, row, col)`, and is never 
asked about cells nothing refers to (headers, spare row).
   
   `BaseTestFormulaEvaluatorFixture` gains a `createEvaluator()` hook so a 
subclass can supply the evaluator under test; the existing notification and 
rows/columns tests are unchanged and still pass.
   
   ## Test plan
   
   - [x] `TestHSSFFormulaEvaluatorStabilityClassifier`, 
`TestXSSFFormulaEvaluatorStabilityClassifier` (5 each)
   - [x] `*FormulaEvaluatorCacheNotification`, 
`*FormulaEvaluatorRowsAndColumns` still pass (33 each)
   - [ ] CI
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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