refactor:extract getJoinFieldName
refactor: extract join query