mondrian.rolap
Class RolapProfilingEvaluator

java.lang.Object
  extended by mondrian.rolap.RolapEvaluator
      extended by mondrian.rolap.RolapProfilingEvaluator
All Implemented Interfaces:
Evaluator

public class RolapProfilingEvaluator
extends RolapEvaluator

Evaluator that collects profiling information as it evaluates expressions.

TODO: Cleanup tasks as part of explain/profiling project:

1. Obsolete AbstractCalc.calcs member, AbstractCalc.getCalcs(), and Calc[] constructor parameter to many Calc subclasses. Store the tree structure (children of a calc, parent of a calc) in RolapEvaluatorRoot.compiledExps.

Rationale: Children calcs are used in about 50 places, but mostly for dependency-checking (e.g. AbstractCalc.anyDepends(mondrian.calc.Calc[], mondrian.olap.Hierarchy)). A few places uses the calcs array but should use more strongly typed members. e.g. FilterFunDef.MutableMemberIterCalc should have data members 'MemberListCalc listCalc' and 'BooleanCalc conditionCalc'.

2. Split Query into parse tree, plan, statement. Fits better into the createStatement - prepare - execute JDBC lifecycle. Currently Query has aspects of all of these, and some other state is held in RolapResult (computed in the constructor, unfortunately) and RolapEvaluatorRoot. This cleanup may not be essential for the explain/profiling task but should happen soon afterwards.

Since:
October, 2010
Author:
jhyde

Nested Class Summary
(package private) static class RolapProfilingEvaluator.ProfilingEvaluatorCompiler
          Expression compiler which introduces dependency testing.
 
Nested classes/interfaces inherited from interface mondrian.olap.Evaluator
Evaluator.NamedSetEvaluator
 
Field Summary
 
Fields inherited from class mondrian.rolap.RolapEvaluator
aggregationLists, cellReader, root
 
Constructor Summary
RolapProfilingEvaluator(RolapEvaluatorRoot root)
          Creates a profiling evaluator.
 
Method Summary
protected  RolapEvaluator _push(List<List<Member>> aggregationList)
          Creates a clone of the current validator.
 
Methods inherited from class mondrian.rolap.RolapEvaluator
addCalculation, clearExpResultCache, create, currentIsEmpty, equals, evaluateCurrent, format, format, getActiveNativeExpansions, getAggregationLists, getCachedResult, getConnectionLocale, getContext, getContext, getCube, getDepth, getDialect, getExpanding, getFormatString, getIterationLength, getLogger, getMeasureCube, getMembers, getMissCount, getNamedSetEvaluator, getNonAllMembers, getParameterValue, getParent, getPreviousContext, getProperty, getQuery, getQueryStartTime, getSchemaReader, getSlicerMembers, getTiming, hashCode, isEvalAxes, isNonEmpty, mightReturnNullForUnrelatedDimension, nativeEnabled, needToReturnNullForUnrelatedDimension, newEvalException, push, push, push, push, push, pushAggregation, removeCalculation, restore, savepoint, setCellReader, setContext, setContext, setContext, setContext, setContext, setContext, setEvalAxes, setExpanding, setIterationLength, setNativeEnabled, setNonEmpty, setSlicerContext, shouldIgnoreUnrelatedDimensions
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RolapProfilingEvaluator

RolapProfilingEvaluator(RolapEvaluatorRoot root)
Creates a profiling evaluator.

Parameters:
root - Shared context between this evaluator and its children
Method Detail

_push

protected RolapEvaluator _push(List<List<Member>> aggregationList)
Description copied from class: RolapEvaluator
Creates a clone of the current validator.

Overrides:
_push in class RolapEvaluator
Parameters:
aggregationList - List of tuples to add to aggregation context, or null

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads