Refactor the logic of getMetaData

Get parent metadata from builder, for example, when create column
metadata, get parent from its table builder.