Repository navigation
perf(engine): streaming hash aggregation & direct scalar grouping - #639
Merged
Merged
Conversation
- Replace legacy TreeMapping/TreeMap with LinkedHashMap in Group.java. - Introduce immutable GroupKey holding defensive copy of Node tuple with strict W3C semantics (support unbound nulls, RDF datatypes, languages, blank nodes). - Retain exact insertion order and API compatibility with Merge.java. - Add comprehensive JUnit 5 test suite (35 unit tests in GroupTest.java). - Zero SonarLint LSP alerts; full test suite passing. - Reduces Bowlogna Q8 latency from 1,137 ms to 918 ms (-19%). - Part of #635 (Step 1).
…mulator state - Introduce DirectGroupAggregation to compute scalar projections (COUNT, SUM, AVG, MIN, MAX) in a single pass without storing member mappings. - Retain only the first representative mapping and scalar accumulator state per group key. - Promote numeric types smoothly with NumericAccumulator and preserve type error boundaries. - Add comprehensive JUnit 5 test coverage in DirectGroupAggregationTest. - Zero SonarLint alerts; full test suite passing. - Reduces Bowlogna Q8 latency from 918 ms down to 760 ms. - Part of #635 (Step 2).
4 tasks
|
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.
Description
Cette Pull Request implémente le Streaming HashAggregation pour les requêtes SPARQL avec
GROUP BYafin de résoudre le goulot d'étranglement majeur identifié sur Q8 lors des benchmarks comparatifs avec Apache Jena 6.2.0 et Eclipse RDF4J 5.3.2.Fixes #635.
Réalisations Techniques
Step 1 — Table de hachage O(1) dans
Group.java(eb1d19bc9) :TreeMap) par une table de hachageLinkedHashMap<GroupKey, Mappings>.GroupKeyavec copie défensive du tableauNode[]et implémentation rigoureuse deequalsethashCode(gestion stricte des termes RDF, unboundnull, littéraux typés, langues et nœuds anonymes).Merge.java.GroupTest.java(35 tests unitaires).Step 2 — Agrégation scalaire directe par accumulateurs (
da8e5cfba) :DirectGroupAggregation.javapermettant de réduire les groupes en une seule passeCOUNT,SUM,AVG,MIN,MAX) avec promotions numériques automatiques viaNumericAccumulator.isEligible(Query)pour les requêtes complexes.DirectGroupAggregationTest.java(24 tests unitaires).Résultats Benchmark Bowlogna (1,23M triplets)
GROUP BY ?X+COUNT(?E)) : passage de 1 830 ms (v4.6.5) à 760 ms (accélération de 2,4x / -58%).Contrôle Qualité
corese-core.