Adjusting for Hive query update for grid only for pid