@Override public Map<String, String> getOperatorDescProperties(OperatorDesc operatorDesc,
      Map<String, String> initialProps) {
    if (operatorDesc instanceof TableScanDesc) {
      TableScanDesc tableScanDesc = (TableScanDesc) operatorDesc;
      ExprNodeGenericFuncDesc filterExpr = tableScanDesc.getFilterExpr();
      String druidQuery = initialProps.get(Constants.DRUID_QUERY_JSON);

      if (filterExpr != null && druidQuery != null) {
        try {
          Query query = DruidStorageHandlerUtils.JSON_MAPPER.readValue(druidQuery, BaseQuery.class);
          Query queryWithDynamicFilters = DruidStorageHandlerUtils.addDynamicFilters(query, filterExpr, conf, false);
          Map<String, String> props = Maps.newHashMap(initialProps);
          props.put(Constants.DRUID_QUERY_JSON,
              DruidStorageHandlerUtils.JSON_MAPPER.writeValueAsString(queryWithDynamicFilters));
          return props;
        } catch (IOException e) {
          LOG.error("Exception while deserializing druid query. Explain plan may not have final druid query", e);
        }
      }
    }
    // Case when we do not have any additional info to add.
    return initialProps;
  }
This function checks the load status of Druid segments by polling druid coordinator.
@param segments List of druid segments to check for
druid-handler/src/java/org/apache/hadoop/hive/druid/DruidStorageHandler.java