Package com.facebook.presto.sql.analyzer

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


        List<Type> functionArguments = functionInfo.getArgumentTypes();
        if (parameterTypes.size() != functionArguments.size()) {
            return false;
        }
        for (int i = 0; i < functionArguments.size(); i++) {
            Type functionArgument = functionArguments.get(i);
            Type parameterType = parameterTypes.get(i);
            if (functionArgument != parameterType && !(functionArgument == DOUBLE && parameterType == BIGINT)) {
                return false;
            }
        }
        return true;
View Full Code Here


        public FunctionListBuilder scalar(String name, MethodHandle function, boolean deterministic, FunctionBinder functionBinder, String description)
        {
            name = name.toLowerCase();

            Type returnType = type(function.type().returnType());
            List<Type> argumentTypes = types(function);
            functions.add(new FunctionInfo(new Signature(name, returnType, argumentTypes, false), description, function, deterministic, functionBinder));
            return this;
        }
View Full Code Here

            this.columnHandles = ImmutableMap.copyOf(checkNotNull(columnHandles, "columnHandles is null"));
        }

        private ColumnType checkedTypeLookup(Symbol symbol)
        {
            Type type = types.get(symbol);
            checkArgument(type != null, "Types is missing info for symbol: %s", symbol);
            return type.getColumnType();
        }
View Full Code Here

            for (Expression expression : node.getArguments()) {
                Object value = process(expression, context);
                if (value == null) {
                    return null;
                }
                Type type;
                if (value instanceof Double) {
                    type = Type.DOUBLE;
                }
                else if (value instanceof Long) {
                    type = Type.BIGINT;
View Full Code Here

            for (Expression expression : node.getArguments()) {
                Object value = process(expression, context);
                if (value == null) {
                    return null;
                }
                Type type;
                if (value instanceof Double) {
                    type = Type.DOUBLE;
                }
                else if (value instanceof Long) {
                    type = Type.BIGINT;
View Full Code Here

                    columns.add(tableScanNode.getAssignments().get(symbol));

                    Input input = new Input(channel, 0);
                    sourceLayout.put(symbol, input);

                    Type type = checkNotNull(context.getTypes().get(symbol), "No type for symbol %s", symbol);
                    sourceTypes.put(input, type);

                    channel++;
                }
            }
View Full Code Here

        List<Type> functionArguments = functionInfo.getArgumentTypes();
        if (parameterTypes.size() != functionArguments.size()) {
            return false;
        }
        for (int i = 0; i < functionArguments.size(); i++) {
            Type functionArgument = functionArguments.get(i);
            Type parameterType = parameterTypes.get(i);
            if (functionArgument != parameterType && !(functionArgument == DOUBLE && parameterType == BIGINT)) {
                return false;
            }
        }
        return true;
View Full Code Here

        public FunctionListBuilder scalar(String name, MethodHandle function, boolean deterministic, FunctionBinder functionBinder, String description)
        {
            name = name.toLowerCase();

            Type returnType = type(function.type().returnType());
            List<Type> argumentTypes = types(function);
            functions.add(new FunctionInfo(new Signature(name, returnType, argumentTypes, false), description, function, deterministic, functionBinder));
            return this;
        }
View Full Code Here

                    columns.add(tableScanNode.getAssignments().get(symbol));

                    Input input = new Input(channel);
                    sourceLayout.put(symbol, input);

                    Type type = checkNotNull(context.getTypes().get(symbol), "No type for symbol %s", symbol);
                    sourceTypes.put(input, type);

                    channel++;
                }
            }
View Full Code Here

        List<Type> functionArguments = functionInfo.getArgumentTypes();
        if (parameterTypes.size() != functionArguments.size()) {
            return false;
        }
        for (int i = 0; i < functionArguments.size(); i++) {
            Type functionArgument = functionArguments.get(i);
            Type parameterType = parameterTypes.get(i);
            if (functionArgument != parameterType && !(functionArgument == DOUBLE && parameterType == BIGINT)) {
                return false;
            }
        }
        return true;
View Full Code Here

TOP

Related Classes of com.facebook.presto.sql.analyzer.Type

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.