Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
decimal-test.cc File Reference
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <limits>
#include <gtest/gtest.h>
#include <boost/cstdint.hpp>
#include <boost/lexical_cast.hpp>
#include "runtime/decimal-value.h"
#include "util/string-parser.h"
#include "common/names.h"
Include dependency graph for decimal-test.cc:

Go to the source code of this file.

Namespaces

 impala
 This file contains type definitions that are used throughout the code base.
 

Enumerations

enum  impala::Op {
  impala::ADD, impala::SUBTRACT, impala::MULTIPLY, impala::DIVIDE,
  impala::MOD
}
 

Functions

template<typename T >
void impala::VerifyEquals (const DecimalValue< T > &t1, const DecimalValue< T > &t2)
 
template<typename T >
void impala::VerifyParse (const string &s, const ColumnType &t, const DecimalValue< T > &expected_val, StringParser::ParseResult expected_result)
 
template<typename T >
void impala::VerifyToString (const T &decimal, const ColumnType &t, const string &expected)
 
void impala::StringToAllDecimals (const string &s, const ColumnType &t, int32_t val, StringParser::ParseResult result)
 
 impala::TEST (IntToDecimal, Basic)
 
 impala::TEST (DoubleToDecimal, Basic)
 
 impala::TEST (StringToDecimal, Basic)
 
 impala::TEST (StringToDecimal, LargeDecimals)
 
 impala::TEST (DecimalTest, Overflow)
 
 impala::TEST (DecimalTest, MultiplyScaleOverflow)
 
ColumnType impala::GetResultType (const ColumnType &t1, const ColumnType &t2, Op op)
 
template<typename T >
void impala::VerifyFuzzyEquals (const T &actual, const ColumnType &t, double expected, bool overflow)
 
 impala::TEST (DecimalArithmetic, Basic)
 
 impala::TEST (DecimalArithmetic, Divide)
 
 impala::TEST (DecimalArithmetic, DivideLargeScales)
 
template<typename T >
DecimalValue< T > impala::RandDecimal (int max_precision)
 
int impala::DoubleCompare (double x, double y)
 
 impala::TEST (DecimalArithmetic, RandTesting)
 
int main (int argc, char **argv)
 

Variables

static const double impala::MAX_ERROR = 0.0001
 

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 788 of file decimal-test.cc.

References impala::DecimalUtil::InitMaxUnscaledDecimal().