public class RolapNativeCrossJoin extends RolapNativeSet
NativeEvaluator
that evaluates NON EMPTY
CrossJoin in SQL. The generated SQL will join the dimension tables with
the fact table and return all combinations that have a
corresponding row in the fact table. The current context (slicer) is
used for filtering (WHERE clause in SQL). This very effective computes
queries like
SELECT ... NON EMTPY Crossjoin( [product].[name].members, [customer].[name].members) ON ROWS FROM [Sales] WHERE ([store].[store #14])where both, customer.name and product.name have many members, but the resulting crossjoin only has few.
The implementation currently can not handle sets containting parent/child hierarchies, ragged hierarchies, calculated members and the ALL member. Otherwise all
Modifier and Type | Class and Description |
---|---|
(package private) static class |
RolapNativeCrossJoin.NonEmptyCrossJoinConstraint
Constraint that restricts the result to the current context.
|
RolapNativeSet.SchemaReaderWithMemberReaderAvailable, RolapNativeSet.SetConstraint, RolapNativeSet.SetEvaluator
RolapNative.Listener, RolapNative.NativeEvent, RolapNative.TupleEvent
LOGGER
listener
Constructor and Description |
---|
RolapNativeCrossJoin() |
Modifier and Type | Method and Description |
---|---|
(package private) CrossJoinArg[] |
combineArgs(List<CrossJoinArg[]> allArgs) |
(package private) NativeEvaluator |
createEvaluator(RolapEvaluator evaluator,
FunDef fun,
Exp[] args)
If function can be implemented in SQL, returns a NativeEvaluator that
computes the result; otherwise returns null.
|
protected boolean |
restrictMemberTypes()
Returns whether certain member types (e.g.
|
crossJoinArgFactory, isPreferInterpreter, overrideContext, useHardCache
getListener, isEnabled, setEnabled, setListener
public RolapNativeCrossJoin()
protected boolean restrictMemberTypes()
RolapNativeSet
If true, expressions containing calculated members will be evaluated by the interpreter, instead of using SQL.
If false, calc members will be ignored and the computation will be done in SQL, returning more members than requested. This is ok, if the superflous members are filtered out in java code afterwards.
restrictMemberTypes
in class RolapNativeSet
NativeEvaluator createEvaluator(RolapEvaluator evaluator, FunDef fun, Exp[] args)
RolapNative
createEvaluator
in class RolapNative
CrossJoinArg[] combineArgs(List<CrossJoinArg[]> allArgs)