#54 Swap Axes implemented differently XMLA (XMLA_QueryAdapter)

open
nobody
None
5
2009-02-17
2009-02-17
Dipendra Pokhrel
No

Mondrian implementation :
public void setSwapAxes(boolean swap) {
if (monQuery.getAxes().length != 2)
return;
// swap axes if neccessary
if (swap != axesSwapped) {
monQuery.swapAxes();
axesSwapped = swap;
if (logger.isInfoEnabled()) {
logger.info("swapAxes " + axesSwapped);
}
model.fireModelChanged();
}
}

XMLA implementation :
void setSwapAxes(boolean swap) {
if (parsedQuery.getAxes().length >= 2) {
axesSwapped = swap;
if (logger.isInfoEnabled()) {
logger.info("swapAxes " + axesSwapped);
}
model.fireModelChanged();
}
}

XMLA implementation does not actually make swapping when setSwapAxes() is called. But XMLA_QueryAdapter.onExecute() is actually doing the swap job, see :
protected void onExecute() {
...........
...........
if (axesSwapped) {
swapAxes();
}
.............
.............
}

This causes 'Swap Axes' inconsistent if enabled

Discussion