/root/doris/be/src/vec/functions/divide.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | // Licensed to the Apache Software Foundation (ASF) under one |
2 | | // or more contributor license agreements. See the NOTICE file |
3 | | // distributed with this work for additional information |
4 | | // regarding copyright ownership. The ASF licenses this file |
5 | | // to you under the Apache License, Version 2.0 (the |
6 | | // "License"); you may not use this file except in compliance |
7 | | // with the License. You may obtain a copy of the License at |
8 | | // |
9 | | // http://www.apache.org/licenses/LICENSE-2.0 |
10 | | // |
11 | | // Unless required by applicable law or agreed to in writing, |
12 | | // software distributed under the License is distributed on an |
13 | | // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
14 | | // KIND, either express or implied. See the License for the |
15 | | // specific language governing permissions and limitations |
16 | | // under the License. |
17 | | // This file is copied from |
18 | | // https://github.com/ClickHouse/ClickHouse/blob/master/src/Functions/divide.cpp |
19 | | // and modified by Doris |
20 | | |
21 | | #include <string.h> |
22 | | |
23 | | #include <utility> |
24 | | |
25 | | #include "runtime/decimalv2_value.h" |
26 | | #include "vec/columns/column_vector.h" |
27 | | #include "vec/core/types.h" |
28 | | #include "vec/data_types/number_traits.h" |
29 | | #include "vec/functions/function_binary_arithmetic.h" |
30 | | #include "vec/functions/simple_function_factory.h" |
31 | | |
32 | | namespace doris::vectorized { |
33 | | |
34 | | static const DecimalV2Value one(1, 0); |
35 | | |
36 | | template <typename A, typename B> |
37 | | struct DivideFloatingImpl { |
38 | | using ResultType = typename NumberTraits::ResultOfFloatingPointDivision<A, B>::Type; |
39 | | using Traits = NumberTraits::BinaryOperatorTraits<A, B>; |
40 | | |
41 | | static const constexpr bool allow_decimal = true; |
42 | | |
43 | | template <typename Result = ResultType> |
44 | | static void apply(const typename Traits::ArrayA& a, B b, |
45 | | typename ColumnVector<Result>::Container& c, |
46 | 0 | typename Traits::ArrayNull& null_map) { |
47 | 0 | size_t size = c.size(); |
48 | 0 | UInt8 is_null = b == 0; |
49 | 0 | memset(null_map.data(), is_null, size); |
50 | |
|
51 | 0 | if (!is_null) { |
52 | 0 | for (size_t i = 0; i < size; i++) { |
53 | 0 | c[i] = (double)a[i] / (double)b; |
54 | 0 | } |
55 | 0 | } |
56 | 0 | } Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhhE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhaE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhsE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhiE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhlE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhnE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhfE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhdE5applyIdEEvRKNS0_8PODArrayIhLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERS8_ Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIahE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIaaE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIasE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIaiE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIalE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIanE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIafE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIadE5applyIdEEvRKNS0_8PODArrayIaLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIshE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsaE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIssE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsiE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIslE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsnE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsfE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsdE5applyIdEEvRKNS0_8PODArrayIsLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIihE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIiaE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIisE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIiiE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIilE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIinE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIifE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIidE5applyIdEEvRKNS0_8PODArrayIiLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlhE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlaE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlsE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIliE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIllE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlnE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlfE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIldE5applyIdEEvRKNS0_8PODArrayIlLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInhE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInaE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInsE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIniE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInlE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInnE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInfE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIndE5applyIdEEvRKNS0_8PODArrayInLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfhE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfaE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfsE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfiE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIflE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfnE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIffE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfdE5applyIdEEvRKNS0_8PODArrayIfLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdhE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEhRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdaE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEaRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdsE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEsRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdiE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEiRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdlE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEElRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdnE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEnRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdfE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEfRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIddE5applyIdEEvRKNS0_8PODArrayIdLm4096E9AllocatorILb0ELb0ELb0E22DefaultMemoryAllocatorELm16ELm15EEEdRNS0_12ColumnVectorIT_E9ContainerERNS4_IhLm4096ES7_Lm16ELm15EEE |
57 | | |
58 | | template <typename Result = DecimalV2Value> |
59 | 0 | static inline DecimalV2Value apply(DecimalV2Value a, DecimalV2Value b, UInt8& is_null) { |
60 | 0 | is_null = b.is_zero(); |
61 | 0 | return a / (is_null ? one : b); |
62 | 0 | } Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIiiE5applyINS_14DecimalV2ValueEEES4_S4_S4_Rh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIllE5applyINS_14DecimalV2ValueEEES4_S4_S4_Rh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInnE5applyINS_14DecimalV2ValueEEES4_S4_S4_Rh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIN4wide7integerILm256EiEES4_E5applyINS_14DecimalV2ValueEEES7_S7_S7_Rh |
63 | | |
64 | | template <typename Result = ResultType> |
65 | 4 | static inline Result apply(A a, B b, UInt8& is_null) { |
66 | 4 | is_null = b == 0; |
67 | 4 | return static_cast<Result>(a) / (b + is_null); |
68 | 4 | } Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhhE5applyIdEET_hhRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhaE5applyIdEET_haRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhsE5applyIdEET_hsRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhiE5applyIdEET_hiRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhlE5applyIdEET_hlRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhnE5applyIdEET_hnRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhfE5applyIdEET_hfRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIhdE5applyIdEET_hdRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIiiE5applyIiEET_iiRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIllE5applyIlEET_llRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInnE5applyInEET_nnRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIN4wide7integerILm256EiEES4_E5applyIS4_EET_S4_S4_Rh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIahE5applyIdEET_ahRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIaaE5applyIdEET_aaRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIasE5applyIdEET_asRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIaiE5applyIdEET_aiRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIalE5applyIdEET_alRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIanE5applyIdEET_anRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIafE5applyIdEET_afRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIadE5applyIdEET_adRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIshE5applyIdEET_shRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsaE5applyIdEET_saRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIssE5applyIdEET_ssRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsiE5applyIdEET_siRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIslE5applyIdEET_slRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsnE5applyIdEET_snRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsfE5applyIdEET_sfRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIsdE5applyIdEET_sdRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIihE5applyIdEET_ihRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIiaE5applyIdEET_iaRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIisE5applyIdEET_isRh _ZN5doris10vectorized18DivideFloatingImplIiiE5applyIdEET_iiRh Line | Count | Source | 65 | 2 | static inline Result apply(A a, B b, UInt8& is_null) { | 66 | 2 | is_null = b == 0; | 67 | 2 | return static_cast<Result>(a) / (b + is_null); | 68 | 2 | } |
Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIilE5applyIdEET_ilRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIinE5applyIdEET_inRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIifE5applyIdEET_ifRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIidE5applyIdEET_idRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlhE5applyIdEET_lhRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlaE5applyIdEET_laRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlsE5applyIdEET_lsRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIliE5applyIdEET_liRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIllE5applyIdEET_llRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlnE5applyIdEET_lnRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIlfE5applyIdEET_lfRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIldE5applyIdEET_ldRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInhE5applyIdEET_nhRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInaE5applyIdEET_naRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInsE5applyIdEET_nsRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIniE5applyIdEET_niRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInlE5applyIdEET_nlRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInnE5applyIdEET_nnRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplInfE5applyIdEET_nfRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIndE5applyIdEET_ndRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfhE5applyIdEET_fhRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfaE5applyIdEET_faRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfsE5applyIdEET_fsRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfiE5applyIdEET_fiRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIflE5applyIdEET_flRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfnE5applyIdEET_fnRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIffE5applyIdEET_ffRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIfdE5applyIdEET_fdRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdhE5applyIdEET_dhRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdaE5applyIdEET_daRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdsE5applyIdEET_dsRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdiE5applyIdEET_diRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdlE5applyIdEET_dlRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdnE5applyIdEET_dnRh Unexecuted instantiation: _ZN5doris10vectorized18DivideFloatingImplIdfE5applyIdEET_dfRh _ZN5doris10vectorized18DivideFloatingImplIddE5applyIdEET_ddRh Line | Count | Source | 65 | 2 | static inline Result apply(A a, B b, UInt8& is_null) { | 66 | 2 | is_null = b == 0; | 67 | 2 | return static_cast<Result>(a) / (b + is_null); | 68 | 2 | } |
|
69 | | }; |
70 | | |
71 | | struct NameDivide { |
72 | | static constexpr auto name = "divide"; |
73 | | }; |
74 | | using FunctionDivide = FunctionBinaryArithmetic<DivideFloatingImpl, NameDivide, true>; |
75 | | |
76 | 1 | void register_function_divide(SimpleFunctionFactory& factory) { |
77 | 1 | factory.register_function<FunctionDivide>(); |
78 | 1 | } |
79 | | |
80 | | } // namespace doris::vectorized |