Package org.apache.drill.common.logical.data

Examples of org.apache.drill.common.logical.data.WindowFrame


            "{id: 3}" +
            "{id: 4}";

    @Test
    public void windowShouldWorkWithBefore() throws IOException {
        WindowFrameROP rop = new WindowFrameROP(new WindowFrame(null, null, -2L, 0L));
        RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
        rop.setInput(incoming);
        RecordIterator out = rop.getOutput();

        List<WindowObj> windows = Lists.newArrayList(
View Full Code Here


        verifyWindowOrder(windows, out);
    }

    @Test
    public void windowShouldWorkWithAfter() throws IOException {
        WindowFrameROP rop = new WindowFrameROP(new WindowFrame(null, null, 0L, 2L));
        RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
        rop.setInput(incoming);
        RecordIterator out = rop.getOutput();

        List<WindowObj> windows = Lists.newArrayList(
View Full Code Here

        verifyWindowOrder(windows, out);
    }

    @Test
    public void windowShouldWorkWithBeforeAndAfter() throws IOException {
        WindowFrameROP rop = new WindowFrameROP(new WindowFrame(null, null, -2L, 2L));
        RecordIterator incoming = TestUtils.jsonToRecordIterator("test", input);
        rop.setInput(incoming);
        RecordIterator out = rop.getOutput();

        List<WindowObj> windows = Lists.newArrayList(
View Full Code Here

                "{id: 0, v: 0}" +
                "{id: 1, v: 1}" +
                "{id: 2, v: 2}" +
                "{id: 3, v: 3}" +
                "{id: 4, v: 4}";
        WindowFrameROP rop = new WindowFrameROP(new WindowFrame(new FieldReference("test.v", ExpressionPosition.UNKNOWN), null, -2L, 2L));
        RecordIterator incoming = TestUtils.jsonToRecordIterator("test", withinInput);
        rop.setInput(incoming);
        RecordIterator out = rop.getOutput();

        List<WindowObj> windows = Lists.newArrayList(
View Full Code Here

                "{id: 0, v: 0}" +
                "{id: 1, v: 0}" +
                "{id: 2, v: 1}" +
                "{id: 3, v: 1}" +
                "{id: 4, v: 2}";
        WindowFrameROP rop = new WindowFrameROP(new WindowFrame(new FieldReference("test.v", ExpressionPosition.UNKNOWN), null, -1L, 2L));
        RecordIterator incoming = TestUtils.jsonToRecordIterator("test", withinInput);
        rop.setInput(incoming);
        RecordIterator out = rop.getOutput();

        List<WindowObj> windows = Lists.newArrayList(
View Full Code Here

                "{id: 2, v: 0}" +
                "{id: 3, v: 0}" +
                "{id: 4, v: 1}" +
                "{id: 5, v: 1}" +
                "{id: 6, v: 2}";
        WindowFrameROP rop = new WindowFrameROP(new WindowFrame(new FieldReference("test.v", ExpressionPosition.UNKNOWN), null, -1L, 3L));
        RecordIterator incoming = TestUtils.jsonToRecordIterator("test", withinInput);
        rop.setInput(incoming);
        RecordIterator out = rop.getOutput();

        List<WindowObj> windows = Lists.newArrayList(
View Full Code Here

TOP

Related Classes of org.apache.drill.common.logical.data.WindowFrame

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.