| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http:# www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| { |
| |
| unaryMathFunctions : [ |
| {className: "Abs", funcName: "abs", javaFunc : "java.lang.Math.abs", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float"}, |
| {input: "Float8", outputType: "Float8", castType: "double"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "Ceil", funcName: "ceil", javaFunc : "java.lang.Math.ceil", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float"}, |
| {input: "Float8", outputType: "Float8", castType: "double"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "Floor", funcName: "floor", javaFunc : "java.lang.Math.floor", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float"}, |
| {input: "Float8", outputType: "Float8", castType: "double"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "Sqrt", funcName: "sqrt", javaFunc : "java.lang.Math.sqrt", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float"}, |
| {input: "Float8", outputType: "Float8", castType: "double"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "Trunc", funcName: "trunc", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float", roundingRequired: "true"}, |
| {input: "Float8", outputType: "Float8", castType: "double", roundingRequired: "true"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "Sign", funcName: "sign", javaFunc : "java.lang.Math.signum", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "Int", castType: "int"}, |
| {input: "Float4", outputType: "Int", castType: "int"}, |
| {input: "Float8", outputType: "Int", castType: "int"}, |
| {input: "SmallInt", outputType: "Int", castType: "int"}, |
| {input: "TinyInt", outputType: "Int", castType: "int"}, |
| {input: "UInt1", outputType: "Int", castType: "int"}, |
| {input: "UInt2", outputType: "Int", castType: "int"}, |
| {input: "UInt4", outputType: "Int", castType: "int"}, |
| {input: "UInt8", outputType: "Int", castType: "int"} |
| ] |
| } |
| ], |
| binaryMathFunctions : [ |
| {className: "Div", funcName: "div", javaFunc : " / ", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float", roundingRequired: "true"}, |
| {input: "Float8", outputType: "Float8", castType: "double", roundingRequired: "true"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "Mod", funcName: "mod", javaFunc : " % ", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "Float4", outputType: "Float4", castType: "float"}, |
| {input: "Float8", outputType: "Float8", castType: "double"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "LeftShift", funcName: "lshift", javaFunc: " << ", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| }, |
| {className: "RightShift", funcName: "rshift", javaFunc: " >> ", types: [ |
| {input: "Int", outputType: "Int", castType: "int"}, |
| {input: "BigInt", outputType: "BigInt", castType: "long"}, |
| {input: "SmallInt", outputType: "SmallInt", castType: "short"}, |
| {input: "TinyInt", outputType: "TinyInt", castType: "byte"}, |
| {input: "UInt1", outputType: "UInt1", castType: "byte"}, |
| {input: "UInt2", outputType: "UInt2", castType: "char"}, |
| {input: "UInt4", outputType: "UInt4", castType: "int"}, |
| {input: "UInt8", outputType: "UInt8", castType: "long"} |
| ] |
| } |
| ], |
| otherMathFunctions : [ |
| {className: "Truncate", funcName: "trunc", mode: "DOWN", types: [ |
| {dataType: "Int" }, |
| {dataType: "BigInt" }, |
| {dataType: "Float4" }, |
| {dataType: "Float8" }, |
| {dataType: "SmallInt" }, |
| {dataType: "TinyInt" }, |
| {dataType: "UInt1" }, |
| {dataType: "UInt2" }, |
| {dataType: "UInt4" }, |
| {dataType: "UInt8" } |
| ] |
| }, |
| {className: "Roundd", funcName: "round", mode: "HALF_UP", types: [ |
| {dataType: "Int" }, |
| {dataType: "BigInt" }, |
| {dataType: "Float4" }, |
| {dataType: "Float8" }, |
| {dataType: "SmallInt" }, |
| {dataType: "TinyInt" }, |
| {dataType: "UInt1" }, |
| {dataType: "UInt2" }, |
| {dataType: "UInt4" }, |
| {dataType: "UInt8" } |
| ] |
| } |
| ], |
| |
| logBaseMathFunction : [ |
| {className: "LogBase", funcName: "log", javaFunc : "java.lang.Math.log", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"}, |
| {input: "Decimal9"}, |
| {input: "Decimal18"} |
| ] |
| } |
| ], |
| extendedUnaryMathFunctions : [ |
| {className: "Cbrt", funcName: "cbrt", javaFunc : "java.lang.Math.cbrt", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"}, |
| {input: "Decimal9"}, |
| {input: "Decimal18"} |
| ] |
| }, |
| |
| {className: "Exp", funcName: "exp", javaFunc : "java.lang.Math.exp", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"}, |
| {input: "Decimal9"}, |
| {input: "Decimal18"} |
| ] |
| }, |
| |
| {className: "Log", funcName: "log", javaFunc : "java.lang.Math.log", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"}, |
| {input: "Decimal9"}, |
| {input: "Decimal18"} |
| ] |
| }, |
| |
| {className: "Degrees", funcName: "degrees", javaFunc : "java.lang.Math.toDegrees", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"}, |
| {input: "Decimal9"}, |
| {input: "Decimal18"} |
| ] |
| }, |
| |
| {className: "Radians", funcName: "radians", javaFunc : "java.lang.Math.toRadians", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"}, |
| {input: "Decimal9"}, |
| {input: "Decimal18"} |
| ] |
| } |
| ], |
| |
| trigoMathFunctions : [ |
| {className: "Sin", funcName: "sin", javaFunc : "java.lang.Math.sin", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "Cos", funcName: "cos", javaFunc : "java.lang.Math.cos", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "Tan", funcName: "tan", javaFunc : "java.lang.Math.tan", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "ASin", funcName: "asin", javaFunc : "java.lang.Math.asin", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "ACos", funcName: "acos", javaFunc : "java.lang.Math.acos", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "ATan", funcName: "atan", javaFunc : "java.lang.Math.atan", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "Sinh", funcName: "sinh", javaFunc : "java.lang.Math.sinh", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "Cosh", funcName: "cosh", javaFunc : "java.lang.Math.cosh", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| }, |
| {className: "Tanh", funcName: "tanh", javaFunc : "java.lang.Math.tanh", outputType: "Float8", types: [ |
| {input: "Int"}, |
| {input: "BigInt"}, |
| {input: "Float4"}, |
| {input: "Float8"}, |
| {input: "SmallInt"}, |
| {input: "TinyInt"}, |
| {input: "UInt1"}, |
| {input: "UInt2"}, |
| {input: "UInt4"}, |
| {input: "UInt8"} |
| ] |
| } |
| ] |
| } |