Package com.facebook.presto.sql.analyzer

Examples of com.facebook.presto.sql.analyzer.ExpressionAnalyzer$Visitor


        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata, experimentalSyntaxEnabled);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here


        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata, approximateQueriesEnabled);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

                .addDriverContext();
    }

    private Type getExpressionType(Expression projection)
    {
        return new ExpressionAnalyzer(new Analysis(), SESSION, metadataManager, false).analyze(projection, TUPLE_DESCRIPTOR, new AnalysisContext());
    }
View Full Code Here

        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

        }

        // TODO: temporary addition to infer result type from expression. fix this with the new planner refactoring (martint)
        private Type extractType(Expression expression)
        {
            ExpressionAnalyzer expressionAnalyzer = new ExpressionAnalyzer(new Analysis(), session, metadata);
            List<Field> fields = IterableTransformer.<Symbol>on(DependencyExtractor.extractUnique(expression))
                    .transform(new Function<Symbol, Field>()
                    {
                        @Override
                        public Field apply(Symbol symbol)
                        {
                            return Field.newUnqualified(symbol.getName(), symbolAllocator.getTypes().get(symbol));
                        }
                    })
                    .list();
            return expressionAnalyzer.analyze(expression, new TupleDescriptor(fields), new AnalysisContext());
        }
View Full Code Here

                .addDriverContext();
    }

    private Type getExpressionType(Expression projection)
    {
        return new ExpressionAnalyzer(new Analysis(), SESSION, metadataManager, false).analyze(projection, TUPLE_DESCRIPTOR, new AnalysisContext());
    }
View Full Code Here

                .addDriverContext();
    }

    private Type getExpressionType(Expression projection)
    {
        return new ExpressionAnalyzer(new Analysis(), SESSION, metadataManager, false).analyze(projection, TUPLE_DESCRIPTOR, new AnalysisContext());
    }
View Full Code Here

TOP

Related Classes of com.facebook.presto.sql.analyzer.ExpressionAnalyzer$Visitor

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.