Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
decimal-util.cc
Go to the documentation of this file.
1 // Copyright 2012 Cloudera Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include "util/decimal-util.h"
16 #include "runtime/types.h"
17 
18 namespace impala {
19 
21 
23  // TODO: is there a better way to do this?
25  for (int i = 0; i < ColumnType::MAX_PRECISION; ++i) {
28  }
29 }
30 
31 }
static int128_t MAX_UNSCALED_DECIMAL
Maximum absolute value of int128_t that we use. This is 38 digits of 9's.
Definition: decimal-util.h:32
static void InitMaxUnscaledDecimal()
Initializes MAX_UNSCALED_DECIMAL. Must be called once before using it.
Definition: decimal-util.cc:22
static const int MAX_PRECISION
Must be kept in sync with FE's max precision/scale.
Definition: types.h:71
__int128_t int128_t
We use the c++ int128_t type. This is stored using 16 bytes and very performant.