presto-main/src/main/java/io/prestosql/execution/CommentTask.java/CommentTask/execute
class CommentTask:    @Override
    public ListenableFuture<?> execute(Comment statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)
    {
        Session session = stateMachine.getSession();

        if (statement.getType() == Comment.Type.TABLE) {
            QualifiedObjectName tableName = createQualifiedObjectName(session, statement, statement.getName());
            Optional<TableHandle> tableHandle = metadata.getTableHandle(session, tableName);
            if (!tableHandle.isPresent()) {
                throw semanticException(TABLE_NOT_FOUND, statement, "Table does not exist: " + tableName);
            }

            accessControl.checkCanSetTableComment(session.toSecurityContext(), tableName);

            metadata.setTableComment(session, tableHandle.get(), statement.getComment());
        }
        else {
            throw new PrestoException(NOT_SUPPORTED, "Unsupported comment type: " + statement.getType());
        }

        return immediateFuture(null);
    }