protected function compileInsertFromSelect(
        $table,
        string $tableAlias = null,
        array $columns = null,
        $selectQuery
    ): StatementInterface {
        $bindings = [];

        $sqlLine1 = 'INSERT INTO '.$this->compileIdentifierWithAlias($table, $tableAlias, $bindings);
        if ($columns !== null) {
            $sqlLine1 .= ' ('.implode(', ', array_map([$this, 'quoteCompositeIdentifier'], $columns)).')';
        }

        $sqlLine2 = $this->compileSubQuery($selectQuery, $bindings, false);

        return new Raw($this->implodeSQL([$sqlLine1, $sqlLine2]), $bindings);
    }