private void replaceDynamicLists(ExprNodeDesc node, Collection<ExprNodeConstantDesc> dynArgs) {
    List<ExprNodeDesc> children = node.getChildren();
    if (children != null && !children.isEmpty()) {
      ListIterator<ExprNodeDesc> iterator = node.getChildren().listIterator();
      while (iterator.hasNext()) {
        ExprNodeDesc child = iterator.next();
        if (child instanceof ExprNodeDynamicListDesc) {
          iterator.remove();
          dynArgs.forEach(iterator::add);
        } else {
          replaceDynamicLists(child, dynArgs);
        }
      }
    }
  }
Recursively replaces the ExprNodeDynamicListDesc to the list of the actual values. As a result of this call the
original expression is modified so it can be used for pushing down to the TableScan for filtering the data at the
source.
<p>
Please make sure to clone the predicate if needed since the original node will be modified.
@param node The node we are traversing
@param dynArgs The constant values we are substituting
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/DynamicPartitionPruner.java