Examples of writeSlice()


Examples of com.facebook.presto.jdbc.internal.type.type.Type.writeSlice()

                        else if (javaType == double.class) {
                            type.writeDouble(output, cursor.getDouble(column));
                        }
                        else if (javaType == Slice.class) {
                            Slice slice = cursor.getSlice(column);
                            type.writeSlice(output, slice, 0, slice.length());
                        }
                        else {
                            throw new AssertionError("Unimplemented type: " + javaType.getName());
                        }
                    }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

        else if (javaType == double.class) {
            type.writeDouble(builder, (Double) value);
        }
        else if (javaType == Slice.class) {
            Slice slice = Slices.utf8Slice((String) value);
            type.writeSlice(builder, slice, 0, slice.length());
        }
        else {
            throw new IllegalArgumentException("bad value: " + value.getClass().getName());
        }
    }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

            else if (javaType == double.class) {
                type.writeDouble(blockBuilder, (Double) value);
            }
            else if (javaType == Slice.class) {
                Slice slice = (Slice) value;
                type.writeSlice(blockBuilder, slice, 0, slice.length());
            }
            else {
                throw new UnsupportedOperationException("not yet implemented: " + javaType);
            }
        }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

        {
            Slice value = Slices.utf8Slice(formatApproximateResult(count, countError(samples, count), confidence, true));

            Type finalType = getFinalType();
            BlockBuilder blockBuilder = finalType.createBlockBuilder(new BlockBuilderStatus());
            finalType.writeSlice(blockBuilder, value, 0, value.length());
            return blockBuilder.build();
        }
    }

    public static Slice createIntermediate(long count, long samples)
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

        else if (javaType == double.class) {
            type.writeDouble(builder, (Double) value);
        }
        else if (javaType == Slice.class) {
            Slice slice = Slices.utf8Slice((String) value);
            type.writeSlice(builder, slice, 0, slice.length());
        }
        else {
            throw new IllegalArgumentException("bad value: " + value.getClass().getName());
        }
    }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

            else if (javaType == double.class) {
                type.writeDouble(blockBuilder, (Double) value);
            }
            else if (javaType == Slice.class) {
                Slice slice = (Slice) value;
                type.writeSlice(blockBuilder, slice, 0, slice.length());
            }
            else {
                throw new UnsupportedOperationException("not yet implemented: " + javaType);
            }
        }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

                        else if (javaType == double.class) {
                            type.writeDouble(output, cursor.getDouble(column));
                        }
                        else if (javaType == Slice.class) {
                            Slice slice = cursor.getSlice(column);
                            type.writeSlice(output, slice, 0, slice.length());
                        }
                        else {
                            throw new AssertionError("Unimplemented type: " + javaType.getName());
                        }
                    }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

            {
                Slice value = Slices.utf8Slice(formatApproximateResult(count, countError(samples, count), confidence, true));

                Type finalType = getFinalType();
                BlockBuilder blockBuilder = finalType.createBlockBuilder(new BlockBuilderStatus());
                finalType.writeSlice(blockBuilder, value, 0, value.length());
                return blockBuilder.build();
            }
        }

        public static Slice createIntermediate(long count, long samples)
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

                        else if (javaType == double.class) {
                            type.writeDouble(output, cursor.getDouble(column));
                        }
                        else if (javaType == Slice.class) {
                            Slice slice = cursor.getSlice(column);
                            type.writeSlice(output, slice, 0, slice.length());
                        }
                        else {
                            throw new AssertionError("Unimplemented type: " + javaType.getName());
                        }
                    }
View Full Code Here

Examples of com.facebook.presto.spi.type.Type.writeSlice()

            {
                Slice value = Slices.utf8Slice(formatApproximateResult(count, countError(samples, count), confidence, true));

                Type finalType = getFinalType();
                BlockBuilder blockBuilder = finalType.createBlockBuilder(new BlockBuilderStatus());
                finalType.writeSlice(blockBuilder, value, 0, value.length());
                return blockBuilder.build();
            }
        }

        public static Slice createIntermediate(long count, long samples)
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.