public XExecution withSession(XSessionType value) { setSession(value); return this; }
public XExecution withSession(XSessionType value) { setSession(value); return this; }
public XExecution getXExecution(String query, String db, List<MapType> queryConfig, List<MapType> sessionConfig){ XExecution execution = new XExecution(); XJobQuery xJobQuery = new XJobQuery(); xJobQuery.setQuery(query); if (queryConfig != null){ xJobQuery.withConf(queryConfig); } XSessionType sessionType = new XSessionType(); if (db == null){ db = getCurrentDB(); } sessionType.setDb(db); if (sessionConfig != null){ sessionType.withConf(sessionConfig); } execution.setQuery(xJobQuery); execution.setSession(sessionType); return execution; }
private static XExecution getTestExecution(String queryString) { XExecution execution = new XExecution(); XJobQuery query = new XJobQuery(); query.setQuery(queryString); execution.setQuery(query); XSessionType sessionType = new XSessionType(); sessionType.setDb("default"); execution.setSession(sessionType); return execution; }
private XExecution getTestExecution() { XExecution execution = new XExecution(); XJobQuery query = new XJobQuery(); query.setQuery("select * from test_table"); execution.setQuery(query); XSessionType sessionType = new XSessionType(); sessionType.setDb("test"); execution.setSession(sessionType); return execution; }