@Override
    public SQLRecognizer getSelectForUpdateRecognizer(String sql, SQLStatement ast) {
        List<SQLHint> hints = ((SQLSelectStatement) ast).getSelect().getQueryBlock().getFrom().getHints();
        if (CollectionUtils.isNotEmpty(hints)) {
            List<String> hintsTexts = hints
                    .stream()
                    .map(hint -> {
                        if (hint instanceof SQLExprHint) {
                            SQLExpr expr = ((SQLExprHint) hint).getExpr();
                            return expr instanceof SQLIdentifierExpr ? ((SQLIdentifierExpr) expr).getName() : "";
                        } else if (hint instanceof SQLCommentHint) {
                            return ((SQLCommentHint) hint).getText();
                        }
                        return "";
                    }).collect(Collectors.toList());
            if (hintsTexts.contains("UPDLOCK")) {
                return new SqlServerSelectForUpdateRecognizer(sql, ast);
            }
        }
        return null;
    }
@Test
    public void getSelectForUpdateTest() {
        //test with lock
        String sql = "SELECT name FROM t1 WITH (ROWLOCK, UPDLOCK) WHERE id = 'id1'";
        SQLStatement sqlStatement = getSQLStatement(sql);
        Assertions.assertNotNull(new SqlServerOperateRecognizerHolder().getSelectForUpdateRecognizer(sql, sqlStatement));

        //test with no lock
        sql = "SELECT name FROM t1 WHERE id = 'id1'";
        sqlStatement = getSQLStatement(sql);
        Assertions.assertNull(new SqlServerOperateRecognizerHolder().getSelectForUpdateRecognizer(sql, sqlStatement));
    }