private void addConf(Rows.Row r, HiveConf hiveConf) {
    if (r.isMeta) {
      return;
    }
    if (r.values == null || r.values[0] == null || r.values[0].isEmpty()) {
      return;
    }
    String val = r.values[0];
    if (r.values[0].startsWith(SystemVariables.SYSTEM_PREFIX) || r.values[0]
        .startsWith(SystemVariables.ENV_PREFIX)) {
      return;
    } else {
      String[] kv = val.split("=", 2);
      if (kv.length == 2)
        hiveConf.set(kv[0], kv[1]);
    }
  }
Use call statement to retrieve the configurations for substitution and sql for the substitution.

@param call
@return
beeline/src/java/org/apache/hive/beeline/Commands.java