return whether I am an indexed column
172532
def is_indexed(self):
        
        try:
            return getattr(self.table.cols, self.cname).is_indexed
        except AttributeError:
            False
1064302
def _get_indexes_in_altered_table(self, diff):
        
        indexes = diff.from_table.get_indexes()
        column_names = self._get_column_names_in_altered_table(diff)

        for key, index in OrderedDict([(k, v) for k, v in indexes.items()]).items():
            for old_index_name, renamed_index in diff.renamed_indexes.items():
                if key.lower() == old_index_name.lower():
                    del indexes[key]

            changed = False
            index_columns = []
            for column_name in index.get_columns():
                normalized_column_name = column_name.lower()
                if normalized_column_name not in column_names:
                    del indexes[key]
                    break
                else:
                    index_columns.append(column_names[normalized_column_name])
                    if column_name != column_names[normalized_column_name]:
                        changed = True

            if changed:
                indexes[key] = Index(
                    index.get_name(),
                    index_columns,
                    index.is_unique(),
                    index.is_primary(),
                    index.get_flags(),
                )

            for index in diff.removed_indexes.values():
                index_name = index.get_name().lower()
                if index_name and index_name in indexes:
                    del indexes[index_name]

            changed_indexes = (
                list(diff.changed_indexes.values())
                + list(diff.added_indexes.values())
                + list(diff.renamed_indexes.values())
            )
            for index in changed_indexes:
                index_name = index.get_name().lower()
                if index_name:
                    indexes[index_name] = index
                else:
                    indexes[len(indexes)] = index

        return indexes
107219
Index getIndexForColumn(int col) {

        int i = bestIndexForColumn[col];

        return i == -1 ? null
                       : this.indexList[i];
    }
267099
private boolean indexCovers(Index newIndex, Index existingIndex) {
        assert(newIndex.getParent().getTypeName().equals(existingIndex.getParent().getTypeName()));

        // non-unique indexes don't help with this check
        if (existingIndex.getUnique() == false) {
            return false;
        }

        // expression indexes only help if they are on exactly the same expressions in the same order.
        // OK -- that's obviously overspecifying the requirement, since expression order has nothing
        // to do with it, and uniqueness of just a subset of the new index expressions would do, but
        // that's hard to check for, so we punt on optimized dynamic update except for the critical
        // case of grand-fathering in a surviving pre-existing index.
        if (existingIndex.getExpressionsjson().length() > 0) {
            if (existingIndex.getExpressionsjson().equals(newIndex.getExpressionsjson())) {
                return true;
            } else {
                return false;
            }
        } else if (newIndex.getExpressionsjson().length() > 0) {
            // A column index does not generally provide coverage for an expression index,
            // though there are some special cases not being recognized, here,
            // like expression indexes that list a mix of non-column expressions and unique columns.
            return false;
        }

        // partial indexes must have identical predicates
        if (existingIndex.getPredicatejson().length() > 0) {
            if (existingIndex.getPredicatejson().equals(newIndex.getPredicatejson())) {
                return true;
            } else {
                return false;
            }
        } else if (newIndex.getPredicatejson().length() > 0) {
            return false;
        }

        // iterate over all of the existing columns
        for (ColumnRef existingColRef : existingIndex.getColumns()) {
            boolean foundMatch = false;
            // see if the current column is also in the candidate index
            // for now, assume the tables in question have the same schema
            for (ColumnRef colRef : newIndex.getColumns()) {
                String colName1 = colRef.getColumn().getName();
                String colName2 = existingColRef.getColumn().getName();
                if (colName1.equals(colName2)) {
                    foundMatch = true;
                    break;
                }
            }
            // if this column isn't covered
            if (!foundMatch) {
                return false;
            }
        }

        // There exists a unique index that contains a subset of the columns in the new index
        return true;
    }
894332
def column(self):
        """"""
        line = self.line
        return self._element.start - self._element.module.charindex(line, 0)
1152513
static boolean isGroupByColumn(QuerySpecification select, int index) {
        if (!select.isGrouped) {
            return false;
        }
        for (int ii = 0; ii < select.groupIndex.getColumnCount(); ii++) {
            if (index == select.groupIndex.getColumns()[ii]) {
                return true;
            }
        }
        return false;
    }
309390
def getRowByIndex(self, index):
        
        assert isinstance(index, int)
        return Row(self._impl.getRowByIndex(index))
161915
public final String getColumnName(int index) {
        assert(verifyTableInvariants());
        if ((index < 0) || (index >= m_colCount)) {
            throw new IllegalArgumentException("Not a valid column index.");
        }

        // move to the start of the list of column names
        int pos = POS_COL_TYPES + m_colCount;
        String name = null;
        for (int i = 0; i < index; i++) {
            pos += m_buffer.getInt(pos) + 4;
        }
        name = readString(pos, METADATA_ENCODING);
        assert(name != null);

        assert(verifyTableInvariants());
        return name;
    }
749548
def does_sqlatype_require_index_len(
        coltype: Union[TypeEngine, VisitableType]) -> bool:
    
    coltype = _coltype_to_typeengine(coltype)
    if isinstance(coltype, sqltypes.Text):
        return True
    if isinstance(coltype, sqltypes.LargeBinary):
        return True
    return False
697045
boolean isTask(int sequence) {
        int index = toIndex(sequence);
        checkSequence(index, sequence);
        return isTask[index];
    }
100396
def index(self, col: str):
        
        df = self._index(col)
        if df is None:
            self.err("Can not create index")
            return
        self.df = df
1085563
def get_column_index(self, header):
        
        try:
            index = self._column_headers.index(header)
            return index
        except ValueError:
            raise_suppressed(KeyError(("'{}' is not a header for any "
                                       "column").format(header)))
661318
def _check_fill_title_column(self, column_index):
        '''
        
        '''
        # Determine if the whole column is titles
        table_column = TableTranspose(self.table)[column_index]
        prior_column = TableTranspose(self.table)[column_index-1] if column_index > 0 else table_column
        for row_index in range(self.start[0], self.end[0]):
            if is_num_cell(table_column[row_index]) or is_num_cell(prior_column[row_index]):
                return
        # Since we're a title row, stringify the column
        self._stringify_column(column_index)
273246
def get_column_at_index(self, index):
        
        if index is None:
            return None

        url = self.build_url(self._endpoints.get('get_column_index'))
        response = self.session.post(url, data={'index': index})

        if not response:
            return None

        return self.column_constructor(parent=self, **{self._cloud_data_key: response.json()})
255238
def find_by_index(self, cls, index_name, value):
        """"""
        cur = self._conn().cursor()

        # psycopg2 supports using Python formatters for queries
        # we also request our JSON as a string for the from_data calls
        query = 'select id, value::text from {0} where {1} = %s;'.format(
            cls.get_table_name(),
            index_name
        )

        found = []
        with self._conn() as conn:
            with conn.cursor() as cur:
                cur.execute(query, (value,))
                for row in cur:
                    id, data = str(row[0]).strip(), row[1]
                    obj = cls.from_data(data)
                    assert id == obj.id
                    found.append(obj)

        return found
392441
public boolean isIndexBuilt(ByteBuffer columnName)
    {
        return SystemKeyspace.isIndexBuilt(baseCfs.keyspace.getName(), getNameForSystemKeyspace(columnName));
    }
1165519
def column( self, name ):
        
        columns = self.columns()
        if ( name in columns ):
            return columns.index(name)
        return -1