class ShardingPreparedStatement extends AbstractPreparedStatementAdapter {

    @Override
    public ResultSet executeQuery() throws SQLException {
        ResultSet result;
        try {
//            路由到预编译对象执行单元集合
            Collection<PreparedStatementUnit> preparedStatementUnits = route();
//            多线程执行sql查询返回结果集对象集合
            List<ResultSet> resultSets = new PreparedStatementExecutor(
                    getShardingConnection().getShardingContext().getExecutorEngine(), getRouteResult().getSqlStatement().getType(), preparedStatementUnits, getParameters()).executeQuery();
//走结果计归并引擎执行结果集归并逻辑-》
            result = new ShardingResultSet(resultSets, new MergeEngine(
                    getShardingConnection().getShardingContext().getDatabaseType(), resultSets, (SelectStatement) getRouteResult().getSqlStatement()).merge());
        } finally {
//            释放内存
            clearBatch();
        }
//        设置当前的结果集
        setCurrentResultSet(result);
        return result;
    }

    public  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql);
    public  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql, final int resultSetType, final int resultSetConcurrency);
    public  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql, final int autoGeneratedKeys);
    public  ShardingPreparedStatement(final ShardingConnection shardingConnection, final String sql, final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability);

}