184185186187188189190191192193194
tableRowType = ((Schema) inputRowType.schema()).tableRowType(((HKeyRowType) inputRowType).hKey().table()); } else { ArgumentValidation.isTrue("invalid rowType", false); tableRowType = null; } Table inputTable = tableRowType.table(); this.ancestors = new ArrayList<>(outputRowTypes.size()); List<TableRowType> branchOutputRowTypes = null; Table branchRoot = null; boolean outputInputTable = false; for (TableRowType outputRowType : outputRowTypes) {
154155156157158159160161162163164
protected static OperatorCreator indexScanCreator(final int tID, final String indexName) { return new OperatorCreator() { @Override public Operator create(Schema schema) { TableRowType tableRowType = schema.tableRowType(tID); Index index = tableRowType.table().getIndex(indexName); return API.indexScan_Default(tableRowType.indexRowType(index)); } }; }
5354555657585960616263
private static final Logger logger = LoggerFactory.getLogger(RowIndexer.class); public RowIndexer(FullTextIndexInfo index, IndexWriter writer, boolean updating) { TableRowType indexedRowType = index.getIndexedRowType(); int depth = indexedRowType.table().getDepth(); ancestorRowTypes = new HashMap<>(depth+1); ancestors = new Row[depth+1]; fieldsByRowType = index.getFieldsByRowType(); Set<RowType> rowTypes = index.getRowTypes(); descendantRowTypes = new HashSet<>(rowTypes.size() - ancestorRowTypes.size());
13271328132913301331133213331334133513361337
testRow(cType, "b", 0, pk++), testRow(cType, "c", 0, pk++), testRow(cType, "d", 0, pk++), testRow(cType, "e", 3, pk++), }, adapter.newGroupCursor(cType.table().getGroup()) ); } @Test public void dropPKColumn() {
13561357135813591360136113621363136413651366
testRow(cType, "b", pk++), testRow(cType, "c", pk++), testRow(cType, "d", pk++), testRow(cType, "e", pk++), }, adapter.newGroupCursor(cType.table().getGroup()) ); } @Test public void addPKColumnToPKLessTable() {