Replace result_source->columns loop with result->get_columns.