private void bindOperatorsWithDynamicParams(Map<Integer, ASTNode> parameterMap)
      throws SemanticException {
    // Push the node in the stack
    Collection<Operator> allOps = this.getParseContext().getAllOps();
    for (Operator op:allOps) {
      switch (op.getType()) {
      case FILTER:
        FilterOperator filterOp = (FilterOperator) op;
        ExprNodeDesc predicate = filterOp.getConf().getPredicate();
        filterOp.getConf().setPredicate(
            replaceDynamicParamsWithConstant(predicate, TypeInfoFactory.booleanTypeInfo,
                parameterMap));
        break;

      }
    }
  }
Given an expression tree root at expr and type info of the expression this method traverse
the expression tree and replaces all dynamic expression with the constant expression.
This method also does type inference for the new constant expression.
Note about type inference
Since dynamic parameter lacks type we need to figure out appropriate type to create constant
out of string value. To do this, we choose the type of first child of the parent expression
which isn't dynamic parameter
ql/src/java/org/apache/hadoop/hive/ql/parse/ExecuteStatementAnalyzer.java