presto-main/src/main/java/io/prestosql/execution/SqlQueryExecution.java/SqlQueryExecution/cancelQuery
class SqlQueryExecution:    @Override
    public void cancelQuery()
    {
        stateMachine.transitionToCanceled();
    }