Table already has a parent.

I have found your mistake:

// you return the source table as generated column, but you have to return null, if you cannot generate component
  return source;

Thanks it worked.