SaikuCube scube = qd.getFakeCube(xml);
OlapConnection con = olapDiscoverService.getNativeConnection(scube.getConnection());
IQuery query = qd.unparse(xml, con);
if (QueryType.QM.equals(query.getType())) {
OlapQuery qr = (OlapQuery) query;
Query sQ = QueryConverter.convertQuery(qr.getQuery());
SaikuCube converted = ObjectUtil.convert(scube.getConnection(), sQ.getCube());
return Thin.convert(sQ, converted);
} else {
SaikuCube converted = ObjectUtil.convert(scube.getConnection(), olapDiscoverService.getNativeCube(scube));
return new ThinQuery(query.getName(), converted, query.getMdx());