Researchers analyzed nearly half a million nearby star systems to understand how giant planets fare as their stars expand into red giants.