Refactored common row processing for star and planet tables.