Return a copy of this SchemaColumn, but with the input expression
replaced by an appropriate TupleValueExpression.
@param colIndex
167416
public SchemaColumn copyAndReplaceWithTVE(int colIndex) {
        TupleValueExpression newTve;
        if (m_expression instanceof TupleValueExpression) {
            newTve = (TupleValueExpression) m_expression.clone();
            newTve.setColumnIndex(colIndex);
        }
        else {
            newTve = new TupleValueExpression(m_tableName, m_tableAlias,
                    m_columnName, m_columnAlias,
                    m_expression, colIndex);
        }
        return new SchemaColumn(m_tableName, m_tableAlias,
                m_columnName, m_columnAlias,
                newTve, m_differentiator);
    }
1301128
private static String getValue(String[] cols, int idx) {
        if (cols == null || idx >= cols.length)
            return null;
        return cols[idx];
    }
548165
public function getColumn($colIndex)
    {
        if (isset($this->_columns[$colIndex - 1])) {
            return $this->_columns[$colIndex - 1];
        }

        throw new PHPRtfLite_Exception('Invalid column index for table: ' . $colIndex);
    }
1311096
private void parseTableSchemaFromXML(String tableName,
                                         StmtCommonTableScanShared tableScan,
                                         VoltXMLElement voltXMLElement) {
        assert("table".equals(voltXMLElement.name));
        List<VoltXMLElement> columnSet = voltXMLElement.findChildren("columns");
        assert(columnSet.size() == 1);
        columnSet = columnSet.get(0).children;
        for (int idx = 0; idx < columnSet.size(); idx += 1) {
            VoltXMLElement columnXML = columnSet.get(idx);
            assert("column".equals(columnXML.name));
            String columnName = columnXML.attributes.get("name");
            // If valuetype is not defined, then we will get type
            // "none", about which typeFromString will complain.
            // Note that the types may be widened from the type
            // of the base query of a recursive common table.  This
            // happens if the corresponding type in the recursive
            // query is wider than that of the base case.  But
            // HSQL will have taken care of this for us, so we
            // will not see the widening here.
            VoltType valueType = VoltType.typeFromString(columnXML.getStringAttribute("valuetype", "none"));
            Integer columnIndex = columnXML.getIntAttribute("index", null);
            assert(columnIndex != null);
            // These appear to be optional.  Certainly "bytes"
            // only appears if the type is variably sized.
            Integer size = columnXML.getIntAttribute("size", 0);
            Boolean inBytes = columnXML.getBoolAttribute("bytes", null);
            // This TVE holds the metadata.
            TupleValueExpression tve = new TupleValueExpression(tableName, tableName, columnName, columnName, columnIndex);
            tve.setValueType(valueType);
            tve.setDifferentiator(idx);
            if (size == 0) {
                if (valueType.isVariableLength()) {
                    size = valueType.defaultLengthForVariableLengthType();
                }
                else {
                    size = valueType.getLengthInBytesForFixedTypes();
                }
            }
            tve.setValueSize(size);
            if (inBytes != null) {
                tve.setInBytes(inBytes);
            }
            // There really is no aliasing going on here, so the table
            // name and column name are the same as the table alias and
            // column alias.
            SchemaColumn schemaColumn = new SchemaColumn(tableName, tableName, columnName, columnName, tve, idx);
            tableScan.addOutputColumn(schemaColumn);
        }
    }
431443
public static _ValueReferenceWrapper getUELValueReferenceWrapper(ValueExpression valueExpression,
                                                                     final ELContext elCtx)
    {
        ValueReference valueReference = valueExpression.getValueReference(elCtx);
        
        while (valueReference != null 
                && valueReference.getBase() instanceof CompositeComponentExpressionHolder)
        {
            valueExpression = ((CompositeComponentExpressionHolder) valueReference.getBase())
                                  .getExpression((String) valueReference.getProperty());
            if(valueExpression == null)
            {
                break;
            }
            valueReference = valueExpression.getValueReference(elCtx);
        }
        
        if (valueReference != null)
        {
            return new _ValueReferenceWrapper(valueReference.getBase(), valueReference.getProperty());
        }
        
        return null;
    }
1022346
public final <T> String evalWhereId(
    final T pEntity, final ColumnsValues pColumnsValues) throws Exception {
    TableSql tableSql = this.tablesMap.get(pEntity.getClass().getSimpleName());
    StringBuffer sbWhereId = new StringBuffer("");
    for (int i = 0; i < tableSql.getIdColumnsNames().length; i++) {
      if (i > 0) {
        sbWhereId.append(" and ");
      }
      sbWhereId.append(pEntity.getClass().getSimpleName().toUpperCase()
        + "." + tableSql.getIdColumnsNames()[i].toUpperCase() + "="
          + pColumnsValues.evalSqlValue(tableSql.getIdColumnsNames()[i]));
    }
    return sbWhereId.toString();
  }
282633
public final <T> void prepareColumnValuesForUpdate(
    final ColumnsValues pColumnsValues,
      final T pEntity) throws Exception {
    //remove old version and ID columns:
    pColumnsValues.getLongsMap().remove(ISrvOrm.VERSIONOLD_NAME);
    TableSql tableSql = this.tablesMap.get(pEntity.getClass().getSimpleName());
    for (String idFldNm : tableSql.getIdColumnsNames()) {
      pColumnsValues.remove(idFldNm);
    }
  }
1064797
public Object getColumnValue(int iColumnIndex, int iEditMode)
    {
        Convert fieldInfo = this.getFieldInfo(iColumnIndex);
        if (fieldInfo != null)
            return fieldInfo.getString();
        return Constants.BLANK;
    }
984487
public JSONObject copyIndex(String srcIndexName, String dstIndexName) throws AlgoliaException {
    return operationOnIndex("copy", srcIndexName, dstIndexName, null, RequestOptions.empty);
  }
1048273
@Nullable
  public VirtualColumn getOrCreateVirtualColumnForExpression(
      PlannerContext plannerContext,
      DruidExpression expression,
      SqlTypeName typeName
  )
  {
    if (!isAggregateSignature && !virtualColumnsByExpression.containsKey(expression.getExpression())) {
      final String virtualColumnName = virtualColumnPrefix + virtualColumnCounter++;
      final VirtualColumn virtualColumn = expression.toVirtualColumn(
          virtualColumnName,
          Calcites.getValueTypeForSqlTypeName(typeName),
          plannerContext.getExprMacroTable()
      );
      virtualColumnsByExpression.put(
          expression.getExpression(),
          virtualColumn
      );
      virtualColumnsByName.put(
          virtualColumnName,
          virtualColumn
      );
    }

    return virtualColumnsByExpression.get(expression.getExpression());
  }
784482
private Schema getCustomColumnSchema(String columnName) {
    Schema schema = new Schema();
    String dataType = "string";
    schema.setColumnName(columnName);
    String elementDataType = "string";
    List<String> mapSymbols = null;
    JsonObject newDataType = this.convertDataType(columnName, dataType, elementDataType, mapSymbols);
    schema.setDataType(newDataType);
    schema.setWaterMark(false);
    schema.setPrimaryKey(0);
    schema.setLength(0);
    schema.setPrecision(0);
    schema.setScale(0);
    schema.setNullable(true);
    schema.setFormat(null);
    schema.setComment("Custom column");
    schema.setDefaultValue(null);
    schema.setUnique(false);
    return schema;
  }
957289
OrderedHashSet getDependentConstraints(int colIndex) {

        OrderedHashSet set = new OrderedHashSet();

        for (int i = 0, size = constraintList.length; i < size; i++) {
            Constraint c = constraintList[i];

            if (c.hasColumnOnly(colIndex)) {
                set.add(c);
            }
        }

        return set;
    }
119802
public static <T> String getSoftDeleteSQL(T t, Column softDeleteColumn, List<Object> values) {
		String setSql = getColumnName(softDeleteColumn) + "="
	                    + softDeleteColumn.softDelete()[1];
		return getCustomDeleteSQL(t, values, setSql);
	}
1143012
function copyDeep(source) {
    for (var
      key, descriptor, value,
      target = create(gPO(source)),
      names = oK(source),
      i = 0; i < names.length; i++
    ) {
      key = names[i];
      descriptor = gOPD(source, key);
      if (hOP.call(descriptor, VALUE)) {
        copyValueIfObject(descriptor, copyDeep);
      }
      defineProperty(target, key, descriptor);
    }
    return target;
  }
1332444
def convert_schema(self, nuc_tuple, inner_sat_tuples, outer_sat_tuples):
        
        nuc_tree, nuc_pos = nuc_tuple
        sat_tuples = inner_sat_tuples + outer_sat_tuples
        last_sat_tuple_pos = len(sat_tuples)-1

        for i, (sat_tree, sat_pos) in enumerate(sat_tuples):
            relname = self.get_relname(sat_tree.root_id)
            if sat_pos < nuc_pos:
                ordered_trees = [sat_tree, nuc_tree]
            else:
                ordered_trees = [nuc_tree, sat_tree]

            if i == last_sat_tuple_pos:
                nuc_tree = t(relname, ordered_trees, debug=self.debug, root_id=nuc_tree.root_id)
            else:
                nuc_tree = t('N', [(relname, ordered_trees)], debug=self.debug, root_id=nuc_tree.root_id)
        return nuc_tree
1348092
public int getIndexOfTve(TupleValueExpression tve) {
        SchemaColumn column = new SchemaColumn(
                tve.getTableName(), tve.getTableAlias(),
                tve.getColumnName(), tve.getColumnAlias(),
                tve, tve.getDifferentiator());
        return findIndexOfColumn(column);
    }
1291551
private int getConstraintIndex(int colIndex) {

        for (int i = 0; i < imColIndex.length; i++) {
            for (int j = 0; j < imColIndex[i].length; j++) {
                if (colIndex == imColIndex[i][j]) {
                    return i;
                }    // end of if (col == imColIndex[i][j])
            }        // end of for (int j=0; j<imColIndex[i].length; j++)
        }            // end of for (int i=0; i<imColIndex.length; i++)

        return -1;
    }