public IndexTransformer(DDLMessage.TentativeIndex tentativeIndex) { index = tentativeIndex.getIndex(); table = tentativeIndex.getTable(); checkArgument( !index.getUniqueWithDuplicateNulls() || index.getUniqueWithDuplicateNulls(), "isUniqueWithDuplicateNulls only for use with unique indexes"); this.typeProvider = VersionedSerializers.typesForVersion(table.getTableVersion()); List<Integer> indexColsList = index.getIndexColsToMainColMapList(); indexedCols = DDLUtils.getIndexedCols(Ints.toArray(indexColsList)); List<Integer> allFormatIds = tentativeIndex.getTable().getFormatIdsList(); mainColToIndexPosMap = DDLUtils.getMainColToIndexPosMap( Ints.toArray(index.getIndexColsToMainColMapList()), indexedCols); indexConglomBytes = DDLUtils.getIndexConglomBytes(index.getConglomerate()); indexFormatIds = new int[indexColsList.size()]; for (int i = 0; i < indexColsList.size(); i++) { indexFormatIds[i] = allFormatIds.get(indexColsList.get(i) - 1); } }
private DescriptorSerializer[] getSerializers(ExecRow execRow) { if (serializers == null) serializers = VersionedSerializers.forVersion(table.getTableVersion(), true).getSerializers(execRow); return serializers; }