public boolean containsInputRefMapping(int inputRef) {
    Set<RelColumnMapping> columnMappings = getColumnMappings();
    if (CollectionUtils.isEmpty(columnMappings)) {
      return false;
    }

    for (RelColumnMapping rcm : columnMappings) {
      if (rcm.iInputColumn == inputRef) {
        return true;
      }
    }
    return false;
  }
Check to see if the inputRef is in the column mappings.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveTableFunctionScan.java