add sanity check when reading hive intermediate table