Examples of cursor()


Examples of com.android.dx.io.instructions.ShortArrayCodeInput.cursor()

      int size = encodedInstructions.length;
      DecodedInstruction[] decoded = new DecodedInstruction[size];
      ShortArrayCodeInput in = new ShortArrayCodeInput(encodedInstructions);
      try {
        while (in.hasMore()) {
          decoded[in.cursor()] = DecodedInstruction.decode(in);
        }
      } catch (EOFException e) {
        throw new DecodeException(method, "", e);
      }
      insnArr = decoded;
View Full Code Here

Examples of com.android.dx.io.instructions.ShortArrayCodeInput.cursor()

    DecodedInstruction[] decoded = new DecodedInstruction[size];
    ShortArrayCodeInput in = new ShortArrayCodeInput(encodedInstructions);

    try {
      while (in.hasMore()) {
        decoded[in.cursor()] = DecodedInstruction.decode(in);
      }
    } catch (Exception e) {
      throw new DecodeException(method, "", e);
    }
    insnArr = decoded;
View Full Code Here

Examples of com.facebook.presto.block.Block.cursor()

        assertEquals(output.getChannelCount(), 1);

        Block block = output.getBlock(0);
        assertEquals(block.getPositionCount(), 1);

        BlockCursor cursor = block.cursor();
        assertTrue(cursor.advanceNextPosition());
        if (cursor.isNull()) {
            return null;
        }
        else {
View Full Code Here

Examples of com.facebook.presto.block.Block.cursor()

        assertEquals(output.getChannelCount(), 1);

        Block block = output.getBlock(0);
        assertEquals(block.getPositionCount(), 1);

        BlockCursor cursor = block.cursor();
        assertTrue(cursor.advanceNextPosition());
        if (cursor.isNull()) {
            return null;
        }
        else {
View Full Code Here

Examples of com.facebook.presto.block.Block.cursor()

        BlockCursor cursor = first.cursor();
        while (cursor.advanceNextPosition()) {
            aggregator.addValue(cursor);
        }

        cursor = second.cursor();
        while (cursor.advanceNextPosition()) {
            aggregator.addValue(cursor);
        }

        return (long) BlockAssertions.toValues(aggregator.getResult()).get(0).get(0);
View Full Code Here

Examples of com.facebook.presto.block.Block.cursor()

        Block block = output.getBlock(0);
        assertEquals(block.getPositionCount(), 1);
        assertEquals(block.getTupleInfo().getFieldCount(), 1);

        BlockCursor cursor = block.cursor();
        assertTrue(cursor.advanceNextPosition());
        if (cursor.isNull(0)) {
            return null;
        }
        else {
View Full Code Here

Examples of com.facebook.presto.block.Block.cursor()

        assertEquals(output.getChannelCount(), 1);

        Block block = output.getBlock(0);
        assertEquals(block.getPositionCount(), 1);

        BlockCursor cursor = block.cursor();
        assertTrue(cursor.advanceNextPosition());
        if (cursor.isNull()) {
            return null;
        }
        else {
View Full Code Here

Examples of com.facebook.presto.block.uncompressed.UncompressedBlock.cursor()

    protected void testPartialWithMultiplePositions(Block block, Object expectedValue)
    {
        UncompressedBlock partialsBlock = performPartialAggregation(block);
        Aggregator function = createAggregator(aggregation(getFunction(), new Input(0, 0)), Step.FINAL);
        BlockCursor partialsCursor = partialsBlock.cursor();
        while (partialsCursor.advanceNextPosition()) {
            function.addValue(partialsCursor);
        }

        assertEquals(getActualValue(function), expectedValue);
View Full Code Here

Examples of com.facebook.presto.block.uncompressed.UncompressedBlock.cursor()

    protected void testVectorPartialWithMultiplePositions(Block block, Object expectedValue)
    {
        UncompressedBlock partialsBlock = performPartialAggregation(block);
        Aggregator function = createAggregator(aggregation(getFunction(), new Input(0, 0)), Step.FINAL);

        BlockCursor blockCursor = partialsBlock.cursor();
        while (blockCursor.advanceNextPosition()) {
            function.addValue(blockCursor);
        }
        assertEquals(getActualValue(function), expectedValue);
    }
View Full Code Here

Examples of com.facebook.presto.spi.RecordSet.cursor()

    {
        ConnectorTableHandle table = getTableHandle(tableUnpartitioned);
        ConnectorPartitionResult partitionResult = splitManager.getPartitions(table, TupleDomain.<ConnectorColumnHandle>all());
        ConnectorSplit split = Iterables.getFirst(getAllSplits(splitManager.getPartitionSplits(table, partitionResult.getPartitions())), null);
        RecordSet recordSet = recordSetProvider.getRecordSet(split, ImmutableList.of(invalidColumnHandle));
        recordSet.cursor();
    }

    @Test(expectedExceptions = PrestoException.class, expectedExceptionsMessageRegExp = "Table '.*\\.presto_test_partition_schema_change' partition 'ds=2012-12-29' column 't_data' type 'string' does not match table column type 'bigint'")
    public void testPartitionSchemaMismatch()
            throws Exception
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.