Hash Map Aggregation for High-Cardinality Parallel Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing hash map data structures in database systems with high-cardinality database tables lead to inefficient memory usage and limited performance in multiple-core computing systems due to unnecessary memory allocations and probing functions.

Innovation Solution

Implementing a data aggregation method that uses duplicate functions instead of probing functions for hash map data structures, and storing pointers in merged hash maps to improve memory allocation efficiency, particularly in parallel computing environments with shared memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If probing functions (e.g., linear probing) are performed on hash maps for data aggregation, then data grouping capability is improved, but memory space allocation increases and efficiency decreases for high-cardinality tables

Engineering Contradiction:
Improvedata grouping capabilityVSAvoidmemory space allocation
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent changes the operational parameters of hash maps by switching from probing functions to duplicate functions based on cardinality thresholds. For high-cardinality tables, duplicate functions are used which allocate memory differently, avoiding the excessive memory allocation caused by probing functions while maintaining data grouping capability.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The system dynamically selects between probing functions and duplicate functions based on the cardinality of the database table. This dynamic adaptation allows the system to optimize memory allocation and performance according to the specific characteristics of the data being processed, rather than using a fixed approach.

Inventive Principle:
Principle #15Dynamics

2Productivity

If probing functions are performed on hash maps, then data aggregation is achieved, but performance of multiple-core computing systems is limited

Engineering Contradiction:
Improvedata aggregation performanceVSAvoidprocessing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

By changing the function type from probing to duplicate based on cardinality parameters, the system achieves faster processing times. Duplicate functions require fewer computational steps and memory operations, directly improving data aggregation performance while reducing processing time in parallel computing environments.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If hash maps with probing functions are used for high-cardinality tables, then data grouping is performed, but memory usage efficiency decreases

Engineering Contradiction:
Improvedata grouping functionVSAvoidmemory usage efficiency
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent applies parameter changes by selecting different hash map operations based on cardinality thresholds. For high-cardinality tables, duplicate functions are used which have better memory usage efficiency compared to probing functions, as they avoid unnecessary memory allocations and probes while maintaining the essential data grouping functionality.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250355853A1Data aggregation based on hash map data structures
Publication Date: 2025.11.20 SAP SE
  • US20250355853A1 patent drawing
  • US20250355853A1 patent drawing
  • US20250355853A1 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for providing data aggregation based on hash map data structures. An embodiment operates by receiving a query specifying an input table and an aggregate function. The embodiment then generates a first thread-local hash map and a second thread-local hash map for the input table and performs a probing function associated with the first thread-local hash map. The embodiment then determines, based on the first thread-local hash map, an index cardinality associated with the input table. The embodiment then, in response to the determination that the index cardinality exceeds the threshold, performs a duplicate function associated with the second thread-local hash map and generates a second thread-local copy map. The embodiment then merges the first thread-local hash map and the second thread-local copy map, thereby generating a merged hash map.