Examples of TPreparedFunction


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

                input = Collections.<TPreptimeValue>emptyList();
                arguments = Collections.<TPreparedExpression>emptyList();
            }
            TValidatedScalar overload = registry.getScalarsResolver().get(functionName, input).getOverload();
            TInstance functionType = overload.resultStrategy().fixed(column.getNullable());
            TPreparedExpression expr = new TPreparedFunction(overload, functionType, arguments);
            if (!functionType.equals(columnType)) {
                TCast tcast = registry.getCastsResolver().cast(functionType.typeClass(), columnType.typeClass());
                expr = new TCastExpression(expr, tcast, columnType);
            }
            TEvaluatableExpression eval = expr.build();
            eval.with(queryContext);
            expressions[fi] = eval;
        }
        this.rowCreator = new RowDataCreator();
        this.inputStream = inputStream;
View Full Code Here

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

            else if (column.getDefaultFunction() != null) {
                OverloadResolver<TValidatedScalar> resolver = typesService.getScalarsResolver();
                TValidatedScalar overload = resolver.get(column.getDefaultFunction(),
                                                         Collections.<TPreptimeValue>emptyList()).getOverload();
                TInstance dinst = overload.resultStrategy().fixed(false);
                TPreparedExpression defExpr = new TPreparedFunction(overload,
                                                                    dinst,
                                                                    Collections.<TPreparedExpression>emptyList());
                if (!dinst.equals(type)) {
                    TCast tcast = typesService.getCastsResolver().cast(dinst.typeClass(), type.typeClass());
                    defExpr = new TCastExpression(defExpr, tcast, type);
View Full Code Here

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

        }
        else {
            throw new AssertionError(functionNode);
        }
         TInstance resultInstance = functionNode.getType();
         return new TPreparedFunction(overload, resultInstance, arguments, preptimeValues);
    }
View Full Code Here

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

        TPreparedExpression field1 = ExpressionGenerators.field(itemRowType, 1).getTPreparedExpression();
        TPreparedExpression literal = ExpressionGenerators.literal(1000).getTPreparedExpression();
        TValidatedScalar plus = typesRegistryService().getScalarsResolver().get(
            "plus", asList(new TPreptimeValue(field0.resultType()), new TPreptimeValue(literal.resultType()))
        ).getOverload();
        TPreparedFunction prepFunc = new TPreparedFunction(
            plus, plus.resultType().fixed(false), Arrays.asList(field0, literal)
        );

        // Buffer, delete, insert scan
        final Operator update = insert_Returning(
View Full Code Here

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

            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;
                }
                else {
                    predicate = new TPreparedFunction(and, boolType, Arrays.asList(predicate, clause));
                }
            }
            input = API.groupScan_Default(group);
            input = API.filter_Default(input, Collections.singletonList(tableRowType));
            input = API.select_HKeyOrdered(input, tableRowType, predicate);
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.