public static boolean needOpenTransaction(final SQLStatement sqlStatement) {
        if (sqlStatement instanceof SelectStatement && !((SelectStatement) sqlStatement).getFrom().isPresent()) {
            return false;
        }
        return sqlStatement instanceof DDLStatement || sqlStatement instanceof DMLStatement;
    }
@Test
    void assertNeedOpenTransactionForSelectStatement() {
        SelectStatement selectStatement = new MySQLSelectStatement();
        assertFalse(AutoCommitUtils.needOpenTransaction(selectStatement));
        selectStatement.setFrom(mock(SimpleTableSegment.class));
        assertTrue(AutoCommitUtils.needOpenTransaction(selectStatement));
    }