Go to the source code of this file.
|
| impala |
| This file contains type definitions that are used throughout the code base.
|
|
|
#define | BINARY_OP_FN(NAME, TYPE, OP) |
|
#define | BINARY_OP_CHECK_ZERO_FN(NAME, TYPE, OP) |
|
#define | BITNOT_FN(TYPE) |
|
#define | BINARY_PREDICATE_NUMERIC_FN(NAME, TYPE, OP) |
|
#define | BINARY_PREDICATE_NONNUMERIC_FN(NAME, TYPE, IMPALA_TYPE, OP) |
|
#define | BINARY_PREDICATE_CHAR(NAME, OP) |
|
#define | BINARY_OP_NUMERIC_TYPES(NAME, OP) |
|
#define | BINARY_OP_INT_TYPES(NAME, OP) |
|
#define | BINARY_OP_CHECK_ZERO_INT_TYPES(NAME, OP) |
|
#define | BINARY_PREDICATE_ALL_TYPES(NAME, OP) |
|
|
| impala::BINARY_OP_NUMERIC_TYPES (Add,+) |
|
| impala::BINARY_OP_NUMERIC_TYPES (Subtract,-) |
|
| impala::BINARY_OP_NUMERIC_TYPES (Multiply,*) |
|
| impala::BINARY_OP_FN (Divide, DoubleVal,/) |
|
| impala::BINARY_OP_CHECK_ZERO_INT_TYPES (Int_divide,/) |
|
| impala::BINARY_OP_CHECK_ZERO_INT_TYPES (Mod,%) |
|
| impala::BINARY_OP_INT_TYPES (Bitand,&) |
|
| impala::BINARY_OP_INT_TYPES (Bitxor,^) |
|
| impala::BINARY_OP_INT_TYPES (Bitor,|) |
|
| impala::BITNOT_FN (TinyIntVal) |
|
| impala::BITNOT_FN (SmallIntVal) |
|
| impala::BITNOT_FN (IntVal) |
|
| impala::BITNOT_FN (BigIntVal) |
|
| impala::BINARY_PREDICATE_ALL_TYPES (Eq,==) |
|
| impala::BINARY_PREDICATE_ALL_TYPES (Ne,!=) |
|
| impala::BINARY_PREDICATE_ALL_TYPES (Gt, >) |
|
| impala::BINARY_PREDICATE_ALL_TYPES (Lt,<) |
|
| impala::BINARY_PREDICATE_ALL_TYPES (Ge, >=) |
|
| impala::BINARY_PREDICATE_ALL_TYPES (Le,<=) |
|
#define BINARY_OP_CHECK_ZERO_FN |
( |
|
NAME, |
|
|
|
TYPE, |
|
|
|
OP |
|
) |
| |
Value:TYPE Operators::NAME##_##TYPE##_##TYPE(\
if (v1.is_null || v2.is_null || v2.val == 0) return TYPE::null();\
return TYPE(v1.val OP v2.val);\
}
Definition at line 27 of file operators.cc.
#define BINARY_OP_CHECK_ZERO_INT_TYPES |
( |
|
NAME, |
|
|
|
OP |
|
) |
| |
Value:
#define BINARY_OP_CHECK_ZERO_FN(NAME, TYPE, OP)
Definition at line 83 of file operators.cc.
#define BINARY_OP_FN |
( |
|
NAME, |
|
|
|
TYPE, |
|
|
|
OP |
|
) |
| |
Value:TYPE Operators::NAME##_##TYPE##_##TYPE(\
if (v1.is_null || v2.is_null) return TYPE::null();\
return TYPE(v1.val OP v2.val);\
}
Definition at line 20 of file operators.cc.
#define BINARY_OP_INT_TYPES |
( |
|
NAME, |
|
|
|
OP |
|
) |
| |
Value:
#define BINARY_OP_FN(NAME, TYPE, OP)
Definition at line 77 of file operators.cc.
#define BINARY_OP_NUMERIC_TYPES |
( |
|
NAME, |
|
|
|
OP |
|
) |
| |
Value:
#define BINARY_OP_FN(NAME, TYPE, OP)
Definition at line 69 of file operators.cc.
#define BINARY_PREDICATE_ALL_TYPES |
( |
|
NAME, |
|
|
|
OP |
|
) |
| |
Value:
This object has a compatible storage format with boost::ptime.
#define BINARY_PREDICATE_NUMERIC_FN(NAME, TYPE, OP)
#define BINARY_PREDICATE_NONNUMERIC_FN(NAME, TYPE, IMPALA_TYPE, OP)
#define BINARY_PREDICATE_CHAR(NAME, OP)
Definition at line 89 of file operators.cc.
#define BINARY_PREDICATE_CHAR |
( |
|
NAME, |
|
|
|
OP |
|
) |
| |
Value:
const ColumnType& v1_type = AnyValUtil::TypeDescToColumnType(*c->GetArgType(0));\
const ColumnType& v2_type = AnyValUtil::TypeDescToColumnType(*c->GetArgType(1));\
StringValue iv1 = StringValue::FromStringVal(v1);\
StringValue iv2 = StringValue::FromStringVal(v2);\
iv1.len = StringValue::UnpaddedCharLength(iv1.ptr, v1_type.len);\
iv2.len = StringValue::UnpaddedCharLength(iv2.ptr, v2_type.len);\
}
Definition at line 56 of file operators.cc.
#define BINARY_PREDICATE_NONNUMERIC_FN |
( |
|
NAME, |
|
|
|
TYPE, |
|
|
|
IMPALA_TYPE, |
|
|
|
OP |
|
) |
| |
Value:
if (v1.is_null || v2.is_null) return
BooleanVal::null();\
IMPALA_TYPE iv1 = IMPALA_TYPE::From##TYPE(v1);\
IMPALA_TYPE iv2 = IMPALA_TYPE::From##TYPE(v2);\
return BooleanVal(iv1 OP iv2);\
}
Definition at line 47 of file operators.cc.
#define BINARY_PREDICATE_NUMERIC_FN |
( |
|
NAME, |
|
|
|
TYPE, |
|
|
|
OP |
|
) |
| |
#define BITNOT_FN |
( |
|
TYPE | ) |
|
Value:
if (v.is_null) return TYPE::null();\
return TYPE(~v.val);\
}
Definition at line 34 of file operators.cc.