Examples of TupleDescriptor


Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                RelationPlan subPlan = process(namedQuery, null);
                return new RelationPlan(subPlan.getRoot(), analysis.getOutputDescriptor(node), subPlan.getOutputSymbols());
            }
        }

        TupleDescriptor descriptor = analysis.getOutputDescriptor(node);
        TableHandle handle = analysis.getTableHandle(node);

        ImmutableList.Builder<Symbol> outputSymbolsBuilder = ImmutableList.builder();
        ImmutableMap.Builder<Symbol, ColumnHandle> columns = ImmutableMap.builder();
        for (int i = 0; i < descriptor.getFields().size(); i++) {
            Field field = descriptor.getFields().get(i);
            Symbol symbol = symbolAllocator.newSymbol(field.getName().get(), field.getType());

            outputSymbolsBuilder.add(symbol);
            columns.put(symbol, analysis.getColumn(field));
        }
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

    @Override
    protected RelationPlan visitAliasedRelation(AliasedRelation node, Void context)
    {
        RelationPlan subPlan = process(node.getRelation(), context);

        TupleDescriptor outputDescriptor = analysis.getOutputDescriptor(node);

        return new RelationPlan(subPlan.getRoot(), outputDescriptor, subPlan.getOutputSymbols());
    }
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

    @Override
    protected RelationPlan visitSampledRelation(SampledRelation node, Void context)
    {
        RelationPlan subPlan = process(node.getRelation(), context);

        TupleDescriptor outputDescriptor = analysis.getOutputDescriptor(node);
        double ratio = analysis.getSampleRatio(node);
        return new RelationPlan(
                new SampleNode(idAllocator.getNextId(), subPlan.getRoot(), ratio, SampleNode.Type.fromType(node.getType())),
                outputDescriptor,
                subPlan.getOutputSymbols());
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                columnHandleBuilder.add(targetColumnHandle);
                outputSymbolsBuilder.add(symbol);
            }

            ImmutableList<Symbol> outputSymbols = outputSymbolsBuilder.build();
            plan = new RelationPlan(new TableScanNode(idAllocator.getNextId(), sourceTableHandle, outputSymbols, inputColumnsBuilder.build(), TRUE_LITERAL, TRUE_LITERAL), new TupleDescriptor(fields.build()), outputSymbols);

            targetColumnHandles = columnHandleBuilder.build();
        }
        else {
            RelationPlanner planner = new RelationPlanner(analysis, symbolAllocator, idAllocator, metadata, session);
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

        }

        ImmutableMap<Symbol, ColumnHandle> assignments = columns.build();
        TableScanNode tableScan = new TableScanNode(idAllocator.getNextId(), table, ImmutableList.copyOf(assignments.keySet()), assignments, TRUE_LITERAL, TRUE_LITERAL);

        return new RelationPlan(tableScan, new TupleDescriptor(), ImmutableList.<Symbol>of());
    }
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                columnHandleBuilder.add(targetColumnHandle);
                outputSymbolsBuilder.add(symbol);
            }

            ImmutableList<Symbol> outputSymbols = outputSymbolsBuilder.build();
            plan = new RelationPlan(new TableScanNode(idAllocator.getNextId(), sourceTableHandle, outputSymbols, inputColumnsBuilder.build(), null, Optional.<GeneratedPartitions>absent()), new TupleDescriptor(fields.build()), outputSymbols);

            targetColumnHandles = columnHandleBuilder.build();
        }
        else {
            RelationPlanner planner = new RelationPlanner(analysis, symbolAllocator, idAllocator, metadata, session);
View Full Code Here

Examples of com.facebook.presto.sql.analyzer.TupleDescriptor

                RelationPlan subPlan = process(namedQuery, null);
                return new RelationPlan(subPlan.getRoot(), analysis.getOutputDescriptor(node), subPlan.getOutputSymbols());
            }
        }

        TupleDescriptor descriptor = analysis.getOutputDescriptor(node);
        TableHandle handle = analysis.getTableHandle(node);

        ImmutableList.Builder<Symbol> outputSymbolsBuilder = ImmutableList.builder();
        ImmutableMap.Builder<Symbol, ColumnHandle> columns = ImmutableMap.builder();
        for (int i = 0; i < descriptor.getFields().size(); i++) {
            Field field = descriptor.getFields().get(i);
            Symbol symbol = symbolAllocator.newSymbol(field.getName().get(), field.getType());

            outputSymbolsBuilder.add(symbol);
            columns.put(symbol, analysis.getColumn(field));
        }
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.