@Override
    public List<List<Object>> getInsertRows(Collection<Integer> primaryKeyIndex) {
        if (ast.getTop() != null) {
            //deal with top sql
            dealTop(ast);
        }
        List<SQLInsertStatement.ValuesClause> valuesClauses = ast.getValuesList();
        List<List<Object>> rows = new ArrayList<>(valuesClauses.size());
        for (SQLInsertStatement.ValuesClause valuesClause : valuesClauses) {
            List<SQLExpr> exprList = valuesClause.getValues();
            List<Object> row = new ArrayList<>(exprList.size());
            rows.add(row);
            for (int i = 0, len = exprList.size(); i < len; i++) {
                SQLExpr expr = exprList.get(i);
                if (expr instanceof SQLNullExpr) {
                    row.add(Null.get());
                } else if (expr instanceof SQLValuableExpr) {
                    row.add(((SQLValuableExpr) expr).getValue());
                } else if (expr instanceof SQLVariantRefExpr) {
                    //add '?'
                    row.add(((SQLVariantRefExpr) expr).getName());
                } else if (expr instanceof SQLMethodInvokeExpr) {
                    row.add(SqlMethodExpr.get());
                } else if (expr instanceof SQLDefaultExpr) {
                    row.add(SqlDefaultExpr.get());
                } else if (expr instanceof SQLSequenceExpr) {
                    //Supported only since 2012 version of SQL Server,use next value for
                    SQLSequenceExpr sequenceExpr = (SQLSequenceExpr) expr;
                    String sequence = sequenceExpr.getSequence().getSimpleName();
                    String function = sequenceExpr.getFunction().name;
                    row.add(new SqlSequenceExpr(sequence, function));
                } else {
                    if (primaryKeyIndex.contains(i)) {
                        wrapSQLParsingException(expr);
                    }
                    row.add(NotPlaceholderExpr.get());
                }
            }
        }
        return rows;
    }
@Test
    public void testGetInsertRows() {
        //test for null value
        String sql = "insert into t(id, no, name, age, time) values (default, null, 'a', ?, now())";
        SQLStatement ast = getSQLStatement(sql);

        SqlServerInsertRecognizer recognizer = new SqlServerInsertRecognizer(sql, ast);
        List<List<Object>> insertRows = recognizer.getInsertRows(Collections.singletonList(pkIndex));
        Assertions.assertEquals(1, insertRows.size());

        //test for sequence
        sql = "insert into t(id) values(next value for t1.id)";
        ast = getSQLStatement(sql);
        recognizer = new SqlServerInsertRecognizer(sql, ast);
        insertRows = recognizer.getInsertRows(Collections.singletonList(pkIndex));
        Assertions.assertEquals(1, insertRows.size());

        //test for top
        Assertions.assertThrows(NotSupportYetException.class, () -> {
            String s = "insert top(1) into t(id) values(id1)";
            SQLStatement sqlStatement = getSQLStatement(s);
            SqlServerInsertRecognizer sqlServerInsertRecognizer = new SqlServerInsertRecognizer(s, sqlStatement);
            sqlServerInsertRecognizer.getInsertRows(Collections.singletonList(pkIndex));
        });

        //test for exception
        Assertions.assertThrows(SQLParsingException.class, () -> {
            String s = "insert into t(a) values (?)";
            SQLStatement sqlStatement = getSQLStatement(s);
            SQLInsertStatement sqlInsertStatement = (SQLInsertStatement) sqlStatement;
            sqlInsertStatement.getValuesList().get(0).getValues().set(pkIndex, new MySqlOrderingExpr());

            SqlServerInsertRecognizer sqlServerInsertRecognizer = new SqlServerInsertRecognizer(s, sqlInsertStatement);
            sqlServerInsertRecognizer.getInsertRows(Collections.singletonList(pkIndex));
        });
    }