private static function _createDialect($class, SqlInterface $sql)
    {
        $reflection = new ReflectionClass($class);
        /** @var DialectInterface $dialect */
        $dialect = $reflection->newInstanceArgs();
        $dialect->setSql($sql);
        return $dialect;
    }