Package io.crate.planner.node.dql

Examples of io.crate.planner.node.dql.QueryThenFetchNode


        Function whereClause = new Function(new FunctionInfo(
                new FunctionIdent(EqOperator.NAME, Arrays.<DataType>asList(DataTypes.DOUBLE, DataTypes.DOUBLE)),
                DataTypes.BOOLEAN),
                Arrays.<Symbol>asList(minScore_ref, Literal.newLiteral(0.4))
        );
        QueryThenFetchNode node = new QueryThenFetchNode(new Routing(),
                ImmutableList.<Symbol>of(), null, null, null, null, null, new WhereClause(whereClause), null);
        BytesReference bytesReference = generator.convert(node);

        assertThat(bytesReference.toUtf8(),
                is("{\"_source\":false,\"query\":{\"match_all\":{}},\"min_score\":0.4,\"from\":0,\"size\":10000}"));
View Full Code Here


    @Test
    public void testConvertESSearchNode() throws Exception {
        FunctionImplementation eqImpl = functions.get(new FunctionIdent(EqOperator.NAME, typeX2(DataTypes.STRING)));
        Function whereClause = new Function(eqImpl.info(), Arrays.<Symbol>asList(name_ref, Literal.newLiteral("Marvin")));

        QueryThenFetchNode searchNode = new QueryThenFetchNode(
                new Routing(),
                ImmutableList.<Symbol>of(name_ref),
                ImmutableList.<Symbol>of(),
                new boolean[0],
                new Boolean[0],
View Full Code Here

    }

    @Test
    public void testSelect_OnlyVersion() throws Exception {
        Reference version_ref = createReference("_version", DataTypes.INTEGER);
        QueryThenFetchNode searchNode = new QueryThenFetchNode(
                new Routing(),
                ImmutableList.<Symbol>of(version_ref),
                null,
                null,
                null,
View Full Code Here

    public void testSelect_WholeObjectAndPartial() throws Exception {
        Reference author = createReference("author", DataTypes.OBJECT);
        Reference age = createReference(
                ColumnIdent.getChild(author.info().ident().columnIdent(), "age"), DataTypes.INTEGER);

        QueryThenFetchNode searchNode = new QueryThenFetchNode(
                new Routing(),
                ImmutableList.<Symbol>of(author, age),
                null,
                null,
                null,
View Full Code Here

    }

    @Test
    public void testSelect_excludePartitionedColumns() throws Exception {
        PartitionName partitionName = new PartitionName(characters.name(), Arrays.asList(new BytesRef("0.5")));
        QueryThenFetchNode searchNode = new QueryThenFetchNode(
                new Routing(),
                ImmutableList.<Symbol>of(name_ref, weight_ref),
                null,
                null,
                null,
View Full Code Here

                Arrays.<Symbol>asList(
                        createReference("location", DataTypes.GEO_POINT),
                        Literal.newLiteral(DataTypes.GEO_POINT, DataTypes.GEO_POINT.value("POINT (10 20)"))
                )
        );
        QueryThenFetchNode searchNode = new QueryThenFetchNode(
                new Routing(),
                ImmutableList.<Symbol>of(name_ref),
                ImmutableList.<Symbol>of(distanceFunction),
                new boolean[] { false },
                new Boolean[] { null },
View Full Code Here

                new FunctionInfo(
                        new FunctionIdent(RoundFunction.NAME, Arrays.<DataType>asList(DataTypes.DOUBLE)),
                        DataTypes.LONG),
                Arrays.<Symbol>asList(createReference("price", DataTypes.DOUBLE))
        );
        QueryThenFetchNode searchNode = new QueryThenFetchNode(
                new Routing(),
                ImmutableList.<Symbol>of(name_ref),
                ImmutableList.<Symbol>of(scalarFunction),
                new boolean[] { false },
                new Boolean[] { null },
View Full Code Here

TOP

Related Classes of io.crate.planner.node.dql.QueryThenFetchNode

Copyright © 2018 www.massapicom. 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.