class MySqlUpdateParser extends MySqlSqlParser {

    protected void checkUpdateColumn(){
        MySqlUpdateStatement update = (MySqlUpdateStatement)statement;
        String tableName = StringUtil.removeBackquote(update.getTableName().getSimpleName());
        List<SQLUpdateSetItem> updateSetItem = update.getItems();
        String[] partitionColumns = BaymaxContext.getPartitionColumns(tableName);
        if(partitionColumns != null && partitionColumns.length > 0 && updateSetItem != null && updateSetItem.size() > 0) {
            for(SQLUpdateSetItem item : updateSetItem) {
                String column = StringUtil.removeBackquote(item.getColumn().toString());
                if (StringUtil.contains(partitionColumns, column)){
                    throw new BayMaxException("分区表的分区键不能被更新:" + tableName + "." + column);
                }
            }
        }
    }

}