Package com.facebook.presto.client

Examples of com.facebook.presto.client.Column


                    // this is a hack to suppress the warn message in the client saying that there are no columns.
                    // The reason for this is that the current API definition assumes that everything is a query,
                    // so statements without results produce an error in the client otherwise.
                    //
                    // TODO: add support to the API for non-query statements.
                    columns = ImmutableList.of(new Column("result", "varchar"));
                    data = ImmutableSet.<List<Object>>of(ImmutableList.<Object>of("true"));
                }
            }

            // only return a next if the query is not done or there is more data to send (due to buffering)
View Full Code Here


            ImmutableList.Builder<Column> list = ImmutableList.builder();
            for (int i = 0; i < names.size(); i++) {
                String name = names.get(i);
                String type = types.get(i).getName();
                list.add(new Column(name, type));
            }
            return list.build();
        }
View Full Code Here

                    // this is a hack to suppress the warn message in the client saying that there are no columns.
                    // The reason for this is that the current API definition assumes that everything is a query,
                    // so statements without results produce an error in the client otherwise.
                    //
                    // TODO: add support to the API for non-query statements.
                    columns = ImmutableList.of(new Column("result", "boolean"));
                    data = ImmutableSet.<List<Object>>of(ImmutableList.<Object>of(true));
                }
            }

            // only return a next if the query is not done or there is more data to send (due to buffering)
View Full Code Here

            ImmutableList.Builder<Column> list = ImmutableList.builder();
            for (int i = 0; i < names.size(); i++) {
                String name = names.get(i);
                String type = types.get(i).getName();
                list.add(new Column(name, type));
            }
            return list.build();
        }
View Full Code Here

                    // this is a hack to suppress the warn message in the client saying that there are no columns.
                    // The reason for this is that the current API definition assumes that everything is a query,
                    // so statements without results produce an error in the client otherwise.
                    //
                    // TODO: add support to the API for non-query statements.
                    columns = ImmutableList.of(new Column("result", "varchar"));
                    data = ImmutableSet.<List<Object>>of(ImmutableList.<Object>of("true"));
                }
            }

            // only return a next if the query is not done or there is more data to send (due to buffering)
View Full Code Here

            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:
                        list.add(new Column(name, "bigint"));
                        break;
                    case DOUBLE:
                        list.add(new Column(name, "double"));
                        break;
                    case VARIABLE_BINARY:
                        list.add(new Column(name, "varchar"));
                        break;
                    default:
                        throw new IllegalArgumentException("unhandled type: " + type);
                }
            }
View Full Code Here

                    // this is a hack to suppress the warn message in the client saying that there are no columns.
                    // The reason for this is that the current API definition assumes that everything is a query,
                    // so statements without results produce an error in the client otherwise.
                    //
                    // TODO: add support to the API for non-query statements.
                    columns = ImmutableList.of(new Column("result", "boolean"));
                    data = ImmutableSet.<List<Object>>of(ImmutableList.<Object>of(true));
                }
            }

            // only return a next if the query is not done or there is more data to send (due to buffering)
View Full Code Here

            ImmutableList.Builder<Column> list = ImmutableList.builder();
            for (int i = 0; i < names.size(); i++) {
                String name = names.get(i);
                String type = types.get(i).getName();
                list.add(new Column(name, type));
            }
            return list.build();
        }
View Full Code Here

                    // this is a hack to suppress the warn message in the client saying that there are no columns.
                    // The reason for this is that the current API definition assumes that everything is a query,
                    // so statements without results produce an error in the client otherwise.
                    //
                    // TODO: add support to the API for non-query statements.
                    columns = ImmutableList.of(new Column("result", "boolean"));
                    data = ImmutableSet.<List<Object>>of(ImmutableList.<Object>of(true));
                }
            }

            // only return a next if the query is not done or there is more data to send (due to buffering)
View Full Code Here

            ImmutableList.Builder<Column> list = ImmutableList.builder();
            for (int i = 0; i < names.size(); i++) {
                String name = names.get(i);
                String type = types.get(i).getName();
                list.add(new Column(name, type));
            }
            return list.build();
        }
View Full Code Here

TOP

Related Classes of com.facebook.presto.client.Column

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.