// Copyright 2023 PingCAP, Inc. // // Licensed 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. #pragma once #include #include #include #include #include #define FOR_UNSIGNED_INTEGER_TYPES(M) \ M(UInt8) \ M(UInt16) \ M(UInt32) \ M(UInt64) #define FOR_NUMERIC_TYPES(M) \ M(UInt8) \ M(UInt16) \ M(UInt32) \ M(UInt64) \ M(Int8) \ M(Int16) \ M(Int32) \ M(Int64) \ M(Float32) \ M(Float64) #define FOR_NUMERIC_TYPES_AND_ENUMS(M) \ M(UInt8, DataTypeUInt8) \ M(UInt16, DataTypeUInt16) \ M(UInt32, DataTypeUInt32) \ M(UInt64, DataTypeUInt64) \ M(Int8, DataTypeInt8) \ M(Int16, DataTypeInt16) \ M(Int32, DataTypeInt32) \ M(Int64, DataTypeInt64) \ M(Float32, DataTypeFloat32) \ M(Float64, DataTypeFloat64) \ M(UInt8, DataTypeEnum8) \ M(UInt16, DataTypeEnum16) #define FOR_DECIMAL_TYPES(M) \ M(Decimal32, DataTypeDecimal32) \ M(Decimal64, DataTypeDecimal64) \ M(Decimal128, DataTypeDecimal128) \ M(Decimal256, DataTypeDecimal256) namespace DB { template