Package com.facebook.presto.tuple.TupleInfo

Examples of com.facebook.presto.tuple.TupleInfo.Type


                    Object value = data.get(i);
                    if (value == null) {
                        row.add(null);
                        continue;
                    }
                    Type type = tupleInfos.get(i).getType();
                    switch (type) {
                        case BOOLEAN:
                            row.add(value);
                            break;
                        case FIXED_INT_64:
View Full Code Here


                    Object value = data.get(i);
                    if (value == null) {
                        tuple.appendNull();
                        continue;
                    }
                    Type type = tupleInfo.getTypes().get(i);
                    switch (type) {
                        case BOOLEAN:
                            tuple.append((Boolean) value);
                            break;
                        case FIXED_INT_64:
View Full Code Here

            checkArgument(names.size() == types.size(), "names and types size mismatch");

            ImmutableList.Builder<Column> list = ImmutableList.builder();
            for (int i = 0; i < names.size(); i++) {
                String name = names.get(i);
                Type type = types.get(i);
                switch (type) {
                    case BOOLEAN:
                        list.add(new Column(name, "boolean"));
                        break;
                    case FIXED_INT_64:
View Full Code Here

                    Object value = data.get(i);
                    if (value == null) {
                        row.add(null);
                        continue;
                    }
                    Type type = tupleInfos.get(i).getType();
                    switch (type) {
                        case BOOLEAN:
                            row.add(value);
                            break;
                        case FIXED_INT_64:
View Full Code Here

                    Object value = data.get(i);
                    if (value == null) {
                        tuple.appendNull();
                        continue;
                    }
                    Type type = tupleInfo.getTypes().get(i);
                    switch (type) {
                        case BOOLEAN:
                            tuple.append((Boolean) value);
                            break;
                        case FIXED_INT_64:
View Full Code Here

                    BlockBuilder output = pageBuilder.getBlockBuilder(column);
                    if (cursor.isNull(column)) {
                        output.appendNull();
                    }
                    else {
                        Type type = getTupleInfos().get(column).getType();
                        switch (type) {
                            case BOOLEAN:
                                output.append(cursor.getBoolean(column));
                                break;
                            case FIXED_INT_64:
View Full Code Here

        private int hashCurrentRow()
        {
            int result = 0;
            for (int channel = 0; channel < types.size(); channel++) {
                Type type = types.get(channel);
                BlockCursor cursor = currentRow[channel];
                result = addToHashCode(result, valueHashCode(type, cursor.getRawSlice(), cursor.getRawOffset()));
            }
            return result;
        }
View Full Code Here

    @Override
    public BlockCursor cursor()
    {
        if (tupleInfo.getFieldCount() == 1) {
            Type type = tupleInfo.getTypes().get(0);
            if (type == Type.BOOLEAN) {
                return new UncompressedBooleanBlockCursor(positionCount, slice);
            }
            if (type == Type.FIXED_INT_64) {
                return new UncompressedLongBlockCursor(positionCount, slice);
View Full Code Here

    @Override
    public int compare(int left, int right)
    {
        checkArgument(left >= 0 && right >= 0);
        for (int field = 0; field < types.length; field++) {
            Type type = types[field];
            int comparison;
            switch (type) {
                case BOOLEAN:
                    comparison = Boolean.compare(tupleInfo.getBoolean(slice, left, field), tupleInfo.getBoolean(slice, right, field));
                    break;
View Full Code Here

            Slice rightSlice = slices[((int) (rightSliceAddress >> 32))];
            int rightOffset = (int) rightSliceAddress;

            for (int i = 0; i < sortFields.length; i++) {
                int field = sortFields[i];
                Type type = types[field];

                // todo add support for nulls first, nulls last
                int comparison;
                switch (type) {
                    case BOOLEAN:
View Full Code Here

TOP

Related Classes of com.facebook.presto.tuple.TupleInfo.Type

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.