Examples of SetType


Examples of com.facebook.swift.parser.model.SetType

            return type.getClass() == SetType.class;
        }

        public String convert(final ThriftType type, final boolean ignored)
        {
            final SetType setType = SetType.class.cast(type);

            final String actualType = TypeToJavaConverter.this.convert(setType.getType(), false);

            return "Set<" + actualType + ">";
        }
View Full Code Here

Examples of com.facebook.swift.parser.model.SetType

        }

        @Override
        public String convert(final ThriftType type, final boolean ignored)
        {
            final SetType setType = SetType.class.cast(type);

            final String actualType = TypeToJavaConverter.this.convert(setType.getType(), false);

            return "Set<" + actualType + ">";
        }
View Full Code Here

Examples of com.facebook.swift.parser.model.SetType

            return type.getClass() == SetType.class;
        }

        public String convert(final ThriftType type, final boolean ignored)
        {
            final SetType setType = SetType.class.cast(type);

            final String actualType = TypeToJavaConverter.this.convert(setType.getType(), false);

            return "Set<" + actualType + ">";
        }
View Full Code Here

Examples of com.facebook.swift.parser.model.SetType

            return type.getClass() == SetType.class;
        }

        public String convert(final ThriftType type, final boolean ignored)
        {
            final SetType setType = SetType.class.cast(type);

            final String actualType = TypeToJavaConverter.this.convert(setType.getType(), false);

            return "Set<" + actualType + ">";
        }
View Full Code Here

Examples of com.facebook.swift.parser.model.SetType

        }

        @Override
        public String convert(final ThriftType type, final boolean ignored)
        {
            final SetType setType = SetType.class.cast(type);

            final String actualType = TypeToJavaConverter.this.convert(setType.getElementType(), false);

            return "Set<" + actualType + ">";
        }
View Full Code Here

Examples of io.crate.types.SetType

    }

    public static void register(OperatorModule module) {
        for (DataType type : DataTypes.PRIMITIVE_TYPES) {
            FunctionInfo functionInfo = new FunctionInfo(
                    new FunctionIdent(NAME, ImmutableList.<DataType>of(type, new SetType(type))), DataTypes.BOOLEAN);
            module.registerOperatorFunction(new InOperator(functionInfo));
        }
    }
View Full Code Here

Examples of io.crate.types.SetType

        assertEquals(InOperator.NAME, whereClause.info().ident().name());
        assertThat(whereClause.arguments().get(0), IsInstanceOf.instanceOf(Reference.class));
        assertThat(whereClause.arguments().get(1), IsInstanceOf.instanceOf(Literal.class));

        Literal setLiteral = (Literal)whereClause.arguments().get(1);
        assertEquals(new SetType(DataTypes.DOUBLE), setLiteral.valueType());
    }
View Full Code Here

Examples of io.crate.types.SetType

        assertThat(havingFunction.info().ident().name(), is("op_in"));
        assertThat(havingFunction.arguments().size(), is(2));

        assertThat(havingFunction.arguments().get(0), isFunction("sum"));
        TestingHelpers.assertLiteralSymbol(havingFunction.arguments().get(1), Sets.newHashSet(42.0D, 43.0D, 44.0D), new SetType(DataTypes.DOUBLE));

    }
View Full Code Here

Examples of io.crate.types.SetType

    }


    @Test
    public void testWhereRefInSetLiteralIsConvertedToBooleanQuery() throws Exception {
        DataType dataType = new SetType(DataTypes.STRING);
        Reference foo = createReference("foo", DataTypes.STRING);
        WhereClause whereClause = new WhereClause(
                createFunction(InOperator.NAME, DataTypes.BOOLEAN,
                        foo,
                        Literal.newLiteral(dataType, Sets.newHashSet(new BytesRef("foo"), new BytesRef("bar")))
View Full Code Here

Examples of io.crate.types.SetType

    final static Joiner commaJoiner = Joiner.on(", ");

    @Test
    public void testEnsureStringTypesAreStringsSetString() throws Exception {
        DataType[] dataTypes = new DataType[] { new SetType(DataTypes.STRING) };
        Object[][] rows = new Object[1][1];
        Set<BytesRef> refs = new HashSet<>(
                Arrays.asList(new BytesRef("foo"), new BytesRef("bar")));

        rows[0][0] = refs;
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.