# 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.

{
  mathFunctionTypes: [
    {className: "Add", funcName: "add", op: "+", types: [
      {input1: "Int", input2: "Int", outputType: "Int", castType: "int"},
      {input1: "BigInt", input2: "BigInt", outputType: "BigInt", castType: "long"},
      {input1: "Float4", input2: "Float4", outputType: "Float4", castType: "float"},
      {input1: "Float8", input2: "Float8", outputType: "Float8", castType: "double"},
      {input1: "SmallInt", input2: "SmallInt", outputType: "SmallInt", castType: "short"},
      {input1: "TinyInt", input2: "TinyInt", outputType: "TinyInt", castType: "byte"},
      {input1: "UInt1", input2: "UInt1", outputType: "UInt1", castType: "byte"},
      {input1: "UInt2", input2: "UInt2", outputType: "UInt2", castType: "char"},
      {input1: "UInt4", input2: "UInt4", outputType: "UInt4", castType: "int"},
      {input1: "UInt8", input2: "UInt8", outputType: "UInt8", castType: "long"}
     ]
   },
    {className: "Subtract", funcName: "subtract", op: "-", types: [
          {input1: "Int", input2: "Int", outputType: "Int", castType: "int"},
          {input1: "BigInt", input2: "BigInt", outputType: "BigInt", castType: "long"},
          {input1: "Float4", input2: "Float4", outputType: "Float4", castType: "float"},
          {input1: "Float8", input2: "Float8", outputType: "Float8", castType: "double"},
          {input1: "SmallInt", input2: "SmallInt", outputType: "SmallInt", castType: "short"},
          {input1: "TinyInt", input2: "TinyInt", outputType: "TinyInt", castType: "byte"},
          {input1: "UInt1", input2: "UInt1", outputType: "UInt1", castType: "byte"},
          {input1: "UInt2", input2: "UInt2", outputType: "UInt2", castType: "char"},
          {input1: "UInt4", input2: "UInt4", outputType: "UInt4", castType: "int"},
          {input1: "UInt8", input2: "UInt8", outputType: "UInt8", castType: "long"}
       ]
    },
     {className: "Multiply", funcName: "multiply", op: "*", types: [
          {input1: "Int", input2: "Int", outputType: "Int", castType: "int"},
          {input1: "BigInt", input2: "BigInt", outputType: "BigInt", castType: "long"},
          {input1: "Float4", input2: "Float4", outputType: "Float4", castType: "float"},
          {input1: "Float8", input2: "Float8", outputType: "Float8", castType: "double"},
          {input1: "SmallInt", input2: "SmallInt", outputType: "SmallInt", castType: "short"},
          {input1: "TinyInt", input2: "TinyInt", outputType: "TinyInt", castType: "byte"},
          {input1: "UInt1", input2: "UInt1", outputType: "UInt1", castType: "byte"},
          {input1: "UInt2", input2: "UInt2", outputType: "UInt2", castType: "char"},
          {input1: "UInt4", input2: "UInt4", outputType: "UInt4", castType: "int"},
          {input1: "UInt8", input2: "UInt8", outputType: "UInt8", castType: "long"}
        ]
     },
      {className: "Divide", funcName: "divide", op: "/", types: [
          {input1: "Int", input2: "Int", outputType: "Int", castType: "int"},
          {input1: "BigInt", input2: "BigInt", outputType: "BigInt", castType: "long"},
          {input1: "Float4", input2: "Float4", outputType: "Float4", castType: "float"},
          {input1: "Float8", input2: "Float8", outputType: "Float8", castType: "double"},
          {input1: "SmallInt", input2: "SmallInt", outputType: "SmallInt", castType: "short"},
          {input1: "TinyInt", input2: "TinyInt", outputType: "TinyInt", castType: "byte"},
          {input1: "UInt1", input2: "UInt1", outputType: "UInt1", castType: "byte"},
          {input1: "UInt2", input2: "UInt2", outputType: "UInt2", castType: "char"},
          {input1: "UInt4", input2: "UInt4", outputType: "UInt4", castType: "int"},
          {input1: "UInt8", input2: "UInt8", outputType: "UInt8", castType: "long"}
        ]
     }
  ]
}