Examples of DoubleLiteral


Examples of au.csiro.ontology.model.DoubleLiteral

        return new FloatLiteral(value);
    }
   
    @Deprecated
    public static Literal createDoubleLiteral(double value) {
        return new DoubleLiteral(value);
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

        return new LongLiteral(Long.toString(value));
    }

    private static DoubleLiteral doubleLiteral(double value)
    {
        return new DoubleLiteral(Double.toString(value));
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

    @Test
    public void testDouble()
            throws Exception
    {
        assertExpression("123.", new DoubleLiteral("123"));
        assertExpression("123.0", new DoubleLiteral("123"));
        assertExpression(".5", new DoubleLiteral(".5"));
        assertExpression("123.5", new DoubleLiteral("123.5"));

        assertExpression("123E7", new DoubleLiteral("123E7"));
        assertExpression("123.E7", new DoubleLiteral("123E7"));
        assertExpression("123.0E7", new DoubleLiteral("123E7"));
        assertExpression("123E+7", new DoubleLiteral("123E7"));
        assertExpression("123E-7", new DoubleLiteral("123E-7"));

        assertExpression("123.456E7", new DoubleLiteral("123.456E7"));
        assertExpression("123.456E+7", new DoubleLiteral("123.456E7"));
        assertExpression("123.456E-7", new DoubleLiteral("123.456E-7"));

        assertExpression(".4E42", new DoubleLiteral(".4E42"));
        assertExpression(".4E+42", new DoubleLiteral(".4E42"));
        assertExpression(".4E-42", new DoubleLiteral(".4E-42"));
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

    {
        assertStatement("SELECT 123.456E7 FROM DUAL",
                new Query(
                        Optional.<With>absent(),
                        new QuerySpecification(
                                selectList(new DoubleLiteral("123.456E7")),
                                table(QualifiedName.of("DUAL")),
                                Optional.<Expression>absent(),
                                ImmutableList.<Expression>of(),
                                Optional.<Expression>absent(),
                                ImmutableList.<SortItem>of(),
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

                        Optional.<With>absent(),
                        new Values(ImmutableList.of(
                                new Row(ImmutableList.<Expression>of(
                                        new StringLiteral("a"),
                                        new LongLiteral("1"),
                                        new DoubleLiteral("2.2")
                                )),
                                new Row(ImmutableList.<Expression>of(
                                        new StringLiteral("b"),
                                        new LongLiteral("2"),
                                        new DoubleLiteral("3.3")
                                ))
                        )),
                        ImmutableList.<SortItem>of(),
                        Optional.<String>absent(),
                        Optional.<Approximate>absent()));

        assertStatement("SELECT * FROM (VALUES ('a', 1, 2.2), ('b', 2, 3.3))",
                new Query(
                        Optional.<With>absent(),
                        new QuerySpecification(
                                selectList(new AllColumns()),
                                ImmutableList.<Relation>of(new TableSubquery(
                                        new Query(
                                                Optional.<With>absent(),
                                                new Values(ImmutableList.of(
                                                        new Row(ImmutableList.<Expression>of(
                                                                new StringLiteral("a"),
                                                                new LongLiteral("1"),
                                                                new DoubleLiteral("2.2")
                                                        )),
                                                        new Row(ImmutableList.<Expression>of(
                                                                new StringLiteral("b"),
                                                                new LongLiteral("2"),
                                                                new DoubleLiteral("3.3")
                                                        ))
                                                )),
                                                ImmutableList.<SortItem>of(),
                                                Optional.<String>absent(),
                                                Optional.<Approximate>absent()))
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

    @Test
    public void testDouble()
            throws Exception
    {
        assertExpression("123.", new DoubleLiteral("123"));
        assertExpression("123.0", new DoubleLiteral("123"));
        assertExpression(".5", new DoubleLiteral(".5"));
        assertExpression("123.5", new DoubleLiteral("123.5"));

        assertExpression("123E7", new DoubleLiteral("123E7"));
        assertExpression("123.E7", new DoubleLiteral("123E7"));
        assertExpression("123.0E7", new DoubleLiteral("123E7"));
        assertExpression("123E+7", new DoubleLiteral("123E7"));
        assertExpression("123E-7", new DoubleLiteral("123E-7"));

        assertExpression("123.456E7", new DoubleLiteral("123.456E7"));
        assertExpression("123.456E+7", new DoubleLiteral("123.456E7"));
        assertExpression("123.456E-7", new DoubleLiteral("123.456E-7"));

        assertExpression(".4E42", new DoubleLiteral(".4E42"));
        assertExpression(".4E+42", new DoubleLiteral(".4E42"));
        assertExpression(".4E-42", new DoubleLiteral(".4E-42"));
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

    {
        assertStatement("SELECT 123.456E7 FROM DUAL",
                new Query(
                        Optional.<With>absent(),
                        new QuerySpecification(
                                selectList(new DoubleLiteral("123.456E7")),
                                table(QualifiedName.of("DUAL")),
                                Optional.<Expression>absent(),
                                ImmutableList.<Expression>of(),
                                Optional.<Expression>absent(),
                                ImmutableList.<SortItem>of(),
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

                        Optional.<With>absent(),
                        new Values(ImmutableList.of(
                                new Row(ImmutableList.<Expression>of(
                                        new StringLiteral("a"),
                                        new LongLiteral("1"),
                                        new DoubleLiteral("2.2")
                                )),
                                new Row(ImmutableList.<Expression>of(
                                        new StringLiteral("b"),
                                        new LongLiteral("2"),
                                        new DoubleLiteral("3.3")
                                ))
                        )),
                        ImmutableList.<SortItem>of(),
                        Optional.<String>absent(),
                        Optional.<Approximate>absent()));

        assertStatement("SELECT * FROM (VALUES ('a', 1, 2.2), ('b', 2, 3.3))",
                new Query(
                        Optional.<With>absent(),
                        new QuerySpecification(
                                selectList(new AllColumns()),
                                ImmutableList.<Relation>of(new TableSubquery(
                                        new Query(
                                                Optional.<With>absent(),
                                                new Values(ImmutableList.of(
                                                        new Row(ImmutableList.<Expression>of(
                                                                new StringLiteral("a"),
                                                                new LongLiteral("1"),
                                                                new DoubleLiteral("2.2")
                                                        )),
                                                        new Row(ImmutableList.<Expression>of(
                                                                new StringLiteral("b"),
                                                                new LongLiteral("2"),
                                                                new DoubleLiteral("3.3")
                                                        ))
                                                )),
                                                ImmutableList.<SortItem>of(),
                                                Optional.<String>absent(),
                                                Optional.<Approximate>absent()))
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

    @Test
    public void testDouble()
            throws Exception
    {
        assertExpression("123.", new DoubleLiteral("123"));
        assertExpression("123.0", new DoubleLiteral("123"));
        assertExpression(".5", new DoubleLiteral(".5"));
        assertExpression("123.5", new DoubleLiteral("123.5"));

        assertExpression("123E7", new DoubleLiteral("123E7"));
        assertExpression("123.E7", new DoubleLiteral("123E7"));
        assertExpression("123.0E7", new DoubleLiteral("123E7"));
        assertExpression("123E+7", new DoubleLiteral("123E7"));
        assertExpression("123E-7", new DoubleLiteral("123E-7"));

        assertExpression("123.456E7", new DoubleLiteral("123.456E7"));
        assertExpression("123.456E+7", new DoubleLiteral("123.456E7"));
        assertExpression("123.456E-7", new DoubleLiteral("123.456E-7"));

        assertExpression(".4E42", new DoubleLiteral(".4E42"));
        assertExpression(".4E+42", new DoubleLiteral(".4E42"));
        assertExpression(".4E-42", new DoubleLiteral(".4E-42"));
    }
View Full Code Here

Examples of com.facebook.presto.sql.tree.DoubleLiteral

    {
        assertStatement("SELECT 123.456E7 FROM DUAL",
                new Query(
                        Optional.<With>absent(),
                        new QuerySpecification(
                                selectList(new DoubleLiteral("123.456E7")),
                                table(QualifiedName.of("DUAL")),
                                Optional.<Expression>absent(),
                                ImmutableList.<Expression>of(),
                                Optional.<Expression>absent(),
                                ImmutableList.<SortItem>of(),
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.