public QueryDef translate(QuerySpec qSpec, WindowingShell wShell) throws WindowingException
{
// clone the cfg
HiveConf qCfg = new HiveConf(wShell.getCfg());
QueryDef qry = new QueryDef();
qry.setSpec(qSpec);
QueryTranslationInfo transInfo = new QueryTranslationInfo();
transInfo.setHiveCfg(qCfg);
transInfo.setWshell(wShell);
try
{
transInfo.setHive(Hive.get(qCfg));
transInfo.setHiveMSClient(HiveUtils.getClient(qCfg));
}
catch(HiveException he)
{
throw new WindowingException(he);
}
qry.setTranslationInfo(transInfo);
InputTranslation.translate(qry);
WhereTranslation.translate(qry);
OutputTranslation.translate(qry);