Source:
public Long newQuery(final QueryEncoding query) throws CatalogException { Objects.requireNonNull(query, "query"); if (isClosed) { throw new CatalogException("Catalog is closed."); } final QueryStatusEncoding queryStatus = QueryStatusEncoding.submitted(query); final String physicalString; try { physicalString = MyriaJsonMapperProvider.getMapper().writeValueAsString(query.plan); } catch (JsonProcessingException e) { throw new CatalogException(e); } try { return queue.execute(new SQLiteJob<Long>() { @Override protected Long job(final SQLiteConnection sqliteConnection) throws CatalogException, SQLiteException { try { SQLiteStatement statement = sqliteConnection .prepare("INSERT INTO queries (raw_query, logical_ra, plan, submit_time, start_time, finish_time, elapsed_nanos, status, profiling_mode, ft_mode, language) VALUES (?,?,?,?,?,?,?,?,?,?,?);"); statement.bind(1, queryStatus.rawQuery); statement.bind(2, queryStatus.logicalRa); statement.bind(3, physicalString); statement.bind(4, queryStatus.submitTime); statement.bind(5, queryStatus.startTime); statement.bind(6, queryStatus.finishTime); if (queryStatus.elapsedNanos != null) { statement.bind(7, queryStatus.elapsedNanos); } else { statement.bindNull(7); } statement.bind(8, queryStatus.status.toString()); if (queryStatus.profilingMode) { statement.bind(9, 1); } else { statement.bind(9, 0); } statement.bind(10, queryStatus.ftMode); if (queryStatus.language != null) { statement.bind(11, queryStatus.language); } else { statement.bindNull(11); } statement.stepThrough(); statement.dispose(); return sqliteConnection.getLastInsertId(); } catch (final SQLiteException e) { throw new CatalogException(e); } } }).get(); } catch (InterruptedException | ExecutionException e) { throw new CatalogException(e); } }

Target:
public Long newQuery(final QueryEncoding query) throws CatalogException { Objects.requireNonNull(query, "query"); if (isClosed) { throw new CatalogException("Catalog is closed."); } final QueryStatusEncoding queryStatus = QueryStatusEncoding.submitted(query); final String physicalString; try { physicalString = MyriaJsonMapperProvider.getMapper().writeValueAsString(query.plan); } catch (JsonProcessingException e) { throw new CatalogException(e); } try { return queue.execute(new SQLiteJob<Long>() { @Override protected Long job(final SQLiteConnection sqliteConnection) throws CatalogException, SQLiteException { try { SQLiteStatement statement = sqliteConnection .prepare("INSERT INTO queries (raw_query, logical_ra, plan, submit_time, start_time, finish_time, elapsed_nanos, status, profiling_mode, ft_mode, language) VALUES (?,?,?,?,?,?,?,?,?,?,?);"); statement.bind(1, queryStatus.rawQuery); statement.bind(2, queryStatus.logicalRa); statement.bind(3, physicalString); statement.bind(4, queryStatus.submitTime); statement.bind(5, queryStatus.startTime); statement.bind(6, queryStatus.finishTime); if (queryStatus.elapsedNanos != null) { statement.bind(7, queryStatus.elapsedNanos); } else { statement.bindNull(7); } statement.bind(8, queryStatus.status.toString()); if (queryStatus.profilingMode) { statement.bind(9, 1); } else { statement.bind(9, 0); } statement.bind(10, queryStatus.ftMode); statement.bind(11, queryStatus.language); statement.stepThrough(); statement.dispose(); return sqliteConnection.getLastInsertId(); } catch (final SQLiteException e) { throw new CatalogException(e); } } }).get(); } catch (InterruptedException | ExecutionException e) { throw new CatalogException(e); } }