Repository navigation
HTS Fixes - #299
Merged
Merged
HTS Fixes#299
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test collector always reports zero invalid-date groups, leaving date-membership validation untested and requiring out-of-calendar and missing-Date rejection cases before writes, alongside a valid multi-date split.
1 open issue
What changed in this PR
This PR extends custom hierarchical reconciliation to Spark lazy tables, using grouped validation instead of collecting full forecast data into memory.
Changes:
- Adds lazy-table coverage checks using distinct identities and grouped statistics.
- Propagates custom reconciliation errors and restores readable model names in Spark output.
- Expands local/Spark regression tests and advances the development version to
0.7.0.9019.
| File | Description |
|---|---|
| tests/testthat/test-hierarchical.R | Adds lazy Spark coverage to shared reconciliation route tests. |
| tests/testthat/test-custom-model-hierarchy.R | Adds a lazy collector helper, coverage checks, and near-zero forecast tests. |
| R/hierarchy.R | Implements lazy preflight validation, error propagation, and model-name restoration. |
| NEWS.md | Advances the existing development-version heading. |
| DESCRIPTION | Updates the package version to 0.7.0.9019. |
Review effort: Balanced
smdp2000ofc
requested changes
Oct 31, 2026
smdp2000ofc
left a comment
Collaborator
There was a problem hiding this comment.
ghcp flagged some runtime multiple rescans. please have a look
smdp2000ofc
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request improves support for custom hierarchical reconciliation with Spark (lazy table) backends in the
finntspackage, ensuring that custom coverage validation, error handling, and output are consistent and robust across both local and Spark workflows. It introduces more comprehensive validation for custom candidate coverage, adds detailed grouped statistics for lazy tables, and enhances the test suite to cover Spark-specific behaviors.Custom Hierarchical Reconciliation Improvements:
custom_reconciliation_coveragefunction to support and validate Spark lazy tables by collecting distinct identities and grouped statistics, rather than loading all forecast rows into memory. This ensures robust coverage checks for custom candidates and prevents incomplete or invalid data from proceeding. [1] [2]hierarchy.Rto clarify that Spark forecast tables remain lazy during preflight, and grouped statistics are used for validation.Error Handling and Output Consistency:
reconcile_hierarchical_datato ensure that errors in custom reconciliation with Spark are properly surfaced and that model names are restored from the custom run manifest. [1] [2] [3]Testing Enhancements:
hierarchy_lazy_collectortest helper to simulate Spark lazy table collection, enabling precise control and validation of grouped queries in tests.Documentation and Versioning:
0.7.0.9019and updatedNEWS.mdto reflect the new development version. [1] [2]These changes collectively ensure that custom hierarchical reconciliation is robust, memory-efficient, and consistent across execution environments, with comprehensive validation and strong test coverage.