OLAP Query Syntax Tree Refinement for Metadata Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Static queries in OLAP systems are inefficient as they incur data storage and access requests each time a set is created, and their results are not intuitive to users, as they are affected by changes in OLAP hierarchy metadata, unlike dynamic queries which are optimized but reflect all changes in metadata.
Innovation Solution
Evaluating dynamic queries as static queries by parsing them into syntax trees and refining these trees to remove references to calculations when changes occur in the OLAP hierarchy metadata, ensuring results are independent of metadata changes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If static queries are used to evaluate sets in OLAP systems, then results are independent of metadata changes and intuitive to users, but data storage overhead and access request overhead increase
Solution Approach 1:
The patent segments the query evaluation process into two phases: a compilation phase where the query is parsed into an abstract syntax tree (AST) and stored, and an execution phase where the stored AST is evaluated against current metadata. This segmentation allows the system to avoid storing full query results while maintaining result consistency, as the AST can be re-evaluated with current metadata state.
Solution Approach 2:
The patent performs preliminary parsing of the dynamic query into an abstract syntax tree during the compilation phase, before the actual set evaluation occurs. This preliminary action transforms the query into a structured format that can be efficiently stored and re-evaluated, reducing the overhead of repeatedly parsing the same query while maintaining dynamic query optimization benefits.
2Productivity
If dynamic queries are used to evaluate sets in OLAP systems, then query optimization is achieved and response time is reduced, but results are affected by changes in OLAP hierarchy metadata
Solution Approach 1:
The patent separates query processing into compilation (parsing to AST) and execution (evaluating AST against metadata) phases. The AST serves as a stable intermediate representation that captures the query structure without being affected by metadata changes, allowing fast re-execution while maintaining consistent interpretation of the original query intent.
Solution Approach 2:
The patent creates an abstract syntax tree as a copy or representation of the original dynamic query. This AST copy preserves the query structure and logic while being independent of the actual metadata state, allowing the system to evaluate the query multiple times with different metadata states without re-parsing, thus maintaining both speed and consistency.
3Productivity
If dynamic queries are parsed and re-evaluated each time a set is created, then query optimization is maintained, but data access request overhead increases
Solution Approach 1:
The patent performs the time-consuming parsing operation in advance during the compilation phase, transforming the dynamic query into an abstract syntax tree. This parsed representation is then stored and reused during multiple set creation operations, eliminating the need to re-parse the same query repeatedly and thus reducing processing time while maintaining query optimization benefits.
Solution Approach 2:
The patent creates an abstract syntax tree as a reusable copy of the parsed query structure. This AST copy can be stored and referenced multiple times during set creation operations, avoiding the repeated overhead of parsing the original query text while preserving the optimized query evaluation path.
Data Source
Figure 1A~1B
Figure 2
Figure 3
AI summary
A computer readable storage medium comprises executable instructions to receive a query referencing a set of members of an OLAP hierarchy. The query is parsed into a syntax tree. Changes to the OLAP hierarchy metadata are received. The syntax tree is refined in response to the changes. The query is evaluated to return results that are independent of the changes to the OLAP hierarchy metadata.