Package com.facebook.presto.tuple

Examples of com.facebook.presto.tuple.TupleReadable


            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];

                if (tuple.isNull()) {
                    return null;
                }

                switch (tuple.getTupleInfo().getType()) {
                    case BOOLEAN:
                        return tuple.getBoolean();
                    case FIXED_INT_64:
                        return tuple.getLong();
                    case DOUBLE:
                        return tuple.getDouble();
                    case VARIABLE_BINARY:
                        return tuple.getSlice();
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here


            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];

                if (tuple.isNull()) {
                    return null;
                }

                switch (tuple.getTupleInfo().getType()) {
                    case BOOLEAN:
                        return tuple.getBoolean();
                    case FIXED_INT_64:
                        return tuple.getLong();
                    case DOUBLE:
                        return tuple.getDouble();
                    case VARIABLE_BINARY:
                        return tuple.getSlice();
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here

            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];

                if (tuple.isNull()) {
                    return null;
                }

                switch (tuple.getTupleInfo().getType()) {
                    case BOOLEAN:
                        return tuple.getBoolean();
                    case FIXED_INT_64:
                        return tuple.getLong();
                    case DOUBLE:
                        return tuple.getDouble();
                    case VARIABLE_BINARY:
                        return tuple.getSlice();
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here

            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];
                int field = input.getField();

                if (tuple.isNull(field)) {
                    return null;
                }

                switch (tuple.getTupleInfo().getTypes().get(field)) {
                    case BOOLEAN:
                        return tuple.getBoolean(field);
                    case FIXED_INT_64:
                        return tuple.getLong(field);
                    case DOUBLE:
                        return tuple.getDouble(field);
                    case VARIABLE_BINARY:
                        return tuple.getSlice(field);
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here

            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];

                if (tuple.isNull()) {
                    return null;
                }

                switch (tuple.getTupleInfo().getType()) {
                    case BOOLEAN:
                        return tuple.getBoolean();
                    case FIXED_INT_64:
                        return tuple.getLong();
                    case DOUBLE:
                        return tuple.getDouble();
                    case VARIABLE_BINARY:
                        return tuple.getSlice();
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here

            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];
                int field = input.getField();

                if (tuple.isNull(field)) {
                    return null;
                }

                switch (tuple.getTupleInfo().getTypes().get(field)) {
                    case BOOLEAN:
                        return tuple.getBoolean(field);
                    case FIXED_INT_64:
                        return tuple.getLong(field);
                    case DOUBLE:
                        return tuple.getDouble(field);
                    case VARIABLE_BINARY:
                        return tuple.getSlice(field);
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here

            Input input = node.getInput();

            int channel = input.getChannel();
            if (context instanceof TupleReadable[]) {
                TupleReadable[] inputs = (TupleReadable[]) context;
                TupleReadable tuple = inputs[channel];

                if (tuple.isNull()) {
                    return null;
                }

                switch (tuple.getTupleInfo().getType()) {
                    case BOOLEAN:
                        return tuple.getBoolean();
                    case FIXED_INT_64:
                        return tuple.getLong();
                    case DOUBLE:
                        return tuple.getDouble();
                    case VARIABLE_BINARY:
                        return tuple.getSlice();
                    default:
                        throw new UnsupportedOperationException("not yet implemented");
                }
            }
            else if (context instanceof RecordCursor) {
View Full Code Here

TOP

Related Classes of com.facebook.presto.tuple.TupleReadable

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.