}
@Nullable
public ThinQuery convertQuery(@NotNull String xml) throws Exception {
if (StringUtils.isNotBlank(xml) && xml.trim().startsWith("<?xml")) {
QueryDeserializer qd = new QueryDeserializer();
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());