Examples of ident()


Examples of com.sun.tools.javac.tree.TreeMaker.Ident()

  }

  private Symbol attribIdent(String name) {
    Attr attr = Attr.instance(context);
    TreeMaker tm = TreeMaker.instance(context);
    return attr.attribIdent(tm.Ident(getName(name)), compilationUnit);
  }

  private Name getName(String name) {
    return Names.instance(context).fromString(name);
  }
View Full Code Here

Examples of io.crate.metadata.FunctionInfo.ident()

    public void testArrayCompareAny() throws Exception {
        SelectAnalysis analysis =  analyze("select * from users where 0 = ANY (counters)");
        assertThat(analysis.whereClause().hasQuery(), is(true));

        FunctionInfo anyInfo = ((Function)analysis.whereClause().query()).info();
        assertThat(anyInfo.ident().name(), is("any_="));
        //assertThat(anyInfo.ident().argumentTypes(), contains(DataTypes.LONG_ARRAY, DataType.LONG));

        analysis =  analyze("select * from users where 0 = ANY (counters)");
        assertThat(analysis.whereClause().hasQuery(), is(true));

View Full Code Here

Examples of io.crate.metadata.FunctionInfo.ident()

        analysis =  analyze("select * from users where 0 = ANY (counters)");
        assertThat(analysis.whereClause().hasQuery(), is(true));

        anyInfo = ((Function)analysis.whereClause().query()).info();
        assertThat(anyInfo.ident().name(), is("any_="));
        //assertThat(anyInfo.ident().argumentTypes(), contains(DataTypes.LONG_ARRAY, DataType.LONG));
    }

    @Test
    public void testArrayCompareAnyNeq() throws Exception {
View Full Code Here

Examples of io.crate.metadata.FunctionInfo.ident()

        SelectAnalysis analysis = (SelectAnalysis) analyze("select * from users where ? != ANY (counters)",
                new Object[]{ 4.3F });
        assertThat(analysis.whereClause().hasQuery(), is(true));

        FunctionInfo anyInfo = ((Function)analysis.whereClause().query()).info();
        assertThat(anyInfo.ident().name(), is("any_<>"));
        //assertThat(anyInfo.ident().argumentTypes(), contains(DataTypes.LONG_ARRAY, DataType.LONG));

    }

    @Test(expected = UnsupportedFeatureException.class)
View Full Code Here

Examples of io.crate.metadata.FunctionInfo.ident()

        Functions functions = new ModulesBuilder()
                .add(new AggregationImplModule()).createInjector().getInstance(Functions.class);

        AggregationContext aggregationContext = new AggregationContext(
                (AggregationFunction)functions.get(countInfo.ident()),
                countAggregation);

        AggregationContext[] aggregations = new AggregationContext[] { aggregationContext };
        GroupingProjector projector = new GroupingProjector(
                Arrays.asList(DataTypes.STRING),
View Full Code Here

Examples of io.crate.metadata.ReferenceInfo.ident()

        assertEquals(innerFunction.info().ident().name(), CollectSetAggregation.NAME);
        List<Symbol> innerArguments = innerFunction.arguments();
        assertThat(innerArguments.get(0), IsInstanceOf.instanceOf(Reference.class));
        assertThat(((Reference) innerArguments.get(0)).info(), IsInstanceOf.instanceOf(ReferenceInfo.class));
        ReferenceInfo refInfo = ((Reference) innerArguments.get(0)).info();
        assertThat(refInfo.ident().columnIdent().name(), is("load"));
        assertThat(refInfo.ident().columnIdent().path().get(0), is("1"));

        assertSame(collectSet, innerFunction);
    }
View Full Code Here

Examples of io.crate.metadata.ReferenceInfo.ident()

        List<Symbol> innerArguments = innerFunction.arguments();
        assertThat(innerArguments.get(0), IsInstanceOf.instanceOf(Reference.class));
        assertThat(((Reference) innerArguments.get(0)).info(), IsInstanceOf.instanceOf(ReferenceInfo.class));
        ReferenceInfo refInfo = ((Reference) innerArguments.get(0)).info();
        assertThat(refInfo.ident().columnIdent().name(), is("load"));
        assertThat(refInfo.ident().columnIdent().path().get(0), is("1"));

        assertSame(collectSet, innerFunction);
    }

    @Test(expected = IllegalArgumentException.class)
View Full Code Here

Examples of io.crate.metadata.ReferenceInfo.ident()

            int numPartitionColumns = node.partitionBy().size();
            partitionValues = new HashMap<>(numPartitionColumns);
            for (int i = 0; i < node.partitionBy().size(); i++) {
                ReferenceInfo info = node.partitionBy().get(i);
                partitionValues.put(
                        info.ident().columnIdent().fqn(),
                        info.type().value(partitionName.values().get(i))
                );
            }
        }
        return partitionValues;
View Full Code Here

Examples of io.crate.metadata.blob.BlobTableInfo.ident()

        @Override
        protected void bindSchemas() {
            super.bindSchemas();
            SchemaInfo schemaInfo = mock(SchemaInfo.class);
            BlobTableInfo blobTableInfo = mock(BlobTableInfo.class);
            when(blobTableInfo.ident()).thenReturn(TEST_BLOB_TABLE_IDENT);
            when(schemaInfo.getTableInfo(TEST_BLOB_TABLE_IDENT.name())).thenReturn(blobTableInfo);
            schemaBinder.addBinding(BlobSchemaInfo.NAME).toInstance(schemaInfo);

            SchemaInfo docSchemaInfo = mock(SchemaInfo.class);
            when(docSchemaInfo.getTableInfo(TEST_PARTITIONED_TABLE_IDENT.name()))
View Full Code Here

Examples of io.crate.metadata.doc.DocTableInfo.ident()

    public void testDocTable() throws Exception {
        execute("create table t1 (id int primary key, name string, details object(dynamic) as (size byte, created timestamp)) clustered into 10 shards with(number_of_replicas=1)");
        ensureGreen();

        DocTableInfo ti = (DocTableInfo) referenceInfos.getTableInfo(new TableIdent(null, "t1"));
        assertThat(ti.ident().name(), is("t1"));

        assertThat(ti.columns().size(), is(3));
        assertThat(ti.primaryKey().size(), is(1));
        assertThat(ti.primaryKey().get(0), is(new ColumnIdent("id")));
        assertThat(ti.clusteredBy(), is(new ColumnIdent("id")));
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.