Examples of TPreparedField


Examples of com.foundationdb.server.types.texpressions.TPreparedField

                                                                  RowType outerRowType, RowType innerRowType, int bindingPosition) {
            return new ResultSetSubqueryTExpression(operator, preptimeValue.type(), outerRowType, innerRowType, bindingPosition);
        }

        public TPreparedExpression field(RowType rowType, int position) {
            return new TPreparedField(rowType.typeAt(position), position);
        }
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

        };
        use(db);
        fullAddressRowType = schema.tableRowType(table(fullAddress));
        ciCollator = customerRowType.table().getColumn(1).getCollator();
        genericExpressionList = new ArrayList<>();
        genericExpressionList.add(new TPreparedField(customerRowType.typeAt(0), 0));
        emptyExpressionList = new ArrayList<>();
        emptyBoundExpressionList = new ArrayList<>();
    }
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

        }
        for( int i = 0, j = 0; i < innerRowType.nFields(); i++){
            if(j < innerJoinFields.length && innerJoinFields[j] == i) {
                j++;
            }else{
                expressions.add(new TPreparedField(innerRowType.typeAt(i), i));
            }
        }


        List<TPreparedExpression> outerExpressions = new ArrayList<>();
        for (int i : outerJoinFields){
            outerExpressions.add(new TPreparedBoundField(outerRowType, ROW_BINDING_POSITION, i));
        }
        List<TPreparedExpression> innerExpressions = new ArrayList<>();
        for(int i : innerJoinFields){
            innerExpressions.add(new TPreparedField(innerRowType.typeAt(i), i));
        }

        Operator project = project_Default(
                hashTableLookup_Default(
                        innerRowType,
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

                                                         bound, true,
                                                         bound, true);

        Ordering ordering = API.ordering();
        for (int i = 0; i < nkeys; i++) {
            ordering.append(new TPreparedField(indexType.typeAt(i), i),
                            false);
        }

        return API.indexScan_Default(indexType, indexRange, ordering);
    }
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

                                         comparison.getKeyComparable(),
                                         queryContext);
    }

    private TPreparedExpression assembleFieldExpression(RowType rowType, int fieldIndex) {
        return new TPreparedField(rowType.typeAt(fieldIndex), fieldIndex);
    }
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

        this.latColumn = spatialIndex.firstSpatialArgument();
        this.lonColumn = latColumn + 1;
        API.Ordering zOrdering = new API.Ordering();
        IndexRowType rowType = keyRange.indexRowType().physicalRowType();
        for (int f = 0; f < rowType.nFields(); f++) {
            zOrdering.append(new TPreparedField(rowType.typeAt(f), f), true);
        }
        // The index column selector needs to select all the columns before the z column, and the z column itself.
        this.indexColumnSelector = new IndexRowPrefixSelector(this.latColumn + 1);
        for (IndexKeyRange zKeyRange : zKeyRanges(context, keyRange)) {
            IterationHelper rowState = adapter.createIterationHelper(keyRange.indexRowType());
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

        }
        for( int i = 0, j = 0; i < innerRowType.nFields(); i++){
            if(j < innerJoinFields.length && innerJoinFields[j] == i) {
                j++;
            }else{
                expressions.add(new TPreparedField(innerRowType.typeAt(i), i));
            }
        }

        List<TPreparedExpression> outerExpressions = new ArrayList<>();
        for (int i : outerJoinFields){
            outerExpressions.add(new TPreparedBoundField(outerRowType, ROW_BINDING_POSITION, i));
        }
        List<TPreparedExpression> innerExpressions = new ArrayList<>();
        for(int i : innerJoinFields){
            innerExpressions.add(new TPreparedField(innerRowType.typeAt(i), i));
        }
        innerTimeOperator = new TimeOperator(innerStream);
        outerTimeOperator = new TimeOperator(outerStream);
        Operator project = project_Default(
                hashTableLookup_Default(
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

            if(oldPosition == null) {
                projections.add(buildColumnDefault(newCol, typesRegistry, typesTranslator, origContext));
            } else {
                Column oldCol = origTable.getColumnsIncludingInternal().get(oldPosition);
                TInstance oldInst = oldCol.getType();
                TPreparedExpression pExp = new TPreparedField(oldInst, oldPosition);
                if(!oldInst.equalsExcludingNullable(newInst)) {
                    TCast cast = typesRegistry.getCastsResolver().cast(oldInst.typeClass(), newInst.typeClass());
                    pExp = new TCastExpression(pExp, cast, newInst);
                }
                projections.add(pExp);
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

            TValidatedScalar and = typesRegistryService.getScalarsResolver().get("AND", Collections.nCopies(2, emptyTPV)).getOverload();
            TInstance boolType = AkBool.INSTANCE.instance(false);
            TPreparedExpression predicate = null;
            for (int i = 0; i < plan.ncols; i++) {
                Column referencingColumn = referencingColumns.get(i);
                TPreparedField field = new TPreparedField(referencingColumn.getType(), referencingColumn.getPosition());
                TPreparedExpression clause = new TPreparedFunction(isNull, boolType, Arrays.asList(field));
                clause = new TPreparedFunction(not, boolType, Arrays.asList(clause));
                if (predicate == null) {
                    predicate = clause;
                }
View Full Code Here

Examples of com.foundationdb.server.types.texpressions.TPreparedField

            .row(4L,"abc")
            .row(9L,"def")
            .row(7L,"abc")
        );
        Ordering ordering = ordering();
        ordering.append(new TPreparedField(input.rowType().typeAt(0), 0), true);
        ordering.append(new TPreparedField(input.rowType().typeAt(1), 1), true);
        Operator sort = sort_InsertionLimited(input, input.rowType(),
                                              ordering, SortOption.PRESERVE_DUPLICATES, 200);
        Operator plan = distinct_Partial(sort, sort.rowType());
        Deque<Row> expected = new RowsBuilder(MNumeric.INT.instance(true), MString.varchar())
            .row(0L,"abc")
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.