Package com.facebook.presto.operator

Examples of com.facebook.presto.operator.Operator


        return results;
    }

    private Object selectSingleValue(OperatorFactory operatorFactory, Session session)
    {
        Operator operator = operatorFactory.createOperator(createDriverContext(session));
        return selectSingleValue(operator);
    }
View Full Code Here


    }

    @Override
    public void finish()
    {
        Operator delegate;
        synchronized (this) {
            delegate = getSource();
            if (delegate == null) {
                source = new FinishedOperator(operatorContext, types);
                return;
            }
        }
        delegate.finish();
    }
View Full Code Here

    }

    @Override
    public boolean isFinished()
    {
        Operator delegate = getSource();
        return delegate != null && delegate.isFinished();
    }
View Full Code Here

    }

    @Override
    public Page getOutput()
    {
        Operator delegate = getSource();
        if (delegate == null) {
            return null;
        }
        return delegate.getOutput();
    }
View Full Code Here

        return results;
    }

    public Object selectSingleValue(OperatorFactory operatorFactory, ConnectorSession session)
    {
        Operator operator = operatorFactory.createOperator(createDriverContext(session));
        return selectSingleValue(operator);
    }
View Full Code Here

        storageManager.commit(fileHandles);

        assertTrue(storageManager.shardExists(shardUuid));

        OperatorContext operatorContext = driverContext.addOperatorContext(0, AlignmentOperator.class.getSimpleName());
        Operator operator = new AlignmentOperator(
                operatorContext,
                ImmutableList.<Type>of(VARCHAR, BIGINT),
                ImmutableList.of(
                        storageManager.getBlocks(shardUuid, columnHandles.get(0)),
                        storageManager.getBlocks(shardUuid, columnHandles.get(1)))
        );

        // materialize pages to force comparison only on contents and not page boundaries
        MaterializedResult expected = toMaterializedResult(operator.getOperatorContext().getSession(), operator.getTypes(), pages);

        OperatorAssertion.assertOperatorEquals(operator, expected);
    }
View Full Code Here

        return results;
    }

    public static Object selectSingleValue(OperatorFactory operatorFactory, Session session)
    {
        Operator operator = operatorFactory.createOperator(createDriverContext(session));
        return selectSingleValue(operator);
    }
View Full Code Here

        return results;
    }

    public static Object selectSingleValue(OperatorFactory operatorFactory, Session session)
    {
        Operator operator = operatorFactory.createOperator(createDriverContext(session));
        return selectSingleValue(operator);
    }
View Full Code Here

        assertTrue(storageManager.shardExists(shardUuid));

        AlignmentOperatorFactory factory = new AlignmentOperatorFactory(0,
                storageManager.getBlocks(shardUuid, columnHandles.get(0)),
                storageManager.getBlocks(shardUuid, columnHandles.get(1)));
        Operator operator = factory.createOperator(driverContext);

        // materialize pages to force comparision only on contents and not page boundaries
        MaterializedResult expected = toMaterializedResult(operator.getOperatorContext().getSession(), operator.getTypes(), pages);

        OperatorAssertion.assertOperatorEquals(operator, expected);
    }
View Full Code Here

        return results;
    }

    public Object selectSingleValue(OperatorFactory operatorFactory, ConnectorSession session)
    {
        Operator operator = operatorFactory.createOperator(createDriverContext(session));
        return selectSingleValue(operator);
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.operator.Operator

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.