Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
is-null-predicate.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 
16 #include "udf/udf.h"
17 
18 using namespace impala_udf;
19 
20 namespace impala {
21 
22 template<typename T>
23 BooleanVal IsNullPredicate::IsNull(FunctionContext* ctx, const T& val) {
24  return val.is_null;
25 }
26 
27 template<typename T>
28 BooleanVal IsNullPredicate::IsNotNull(FunctionContext* ctx, const T& val) {
29  return !val.is_null;
30 }
31 
32 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const BooleanVal&);
33 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const TinyIntVal&);
34 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const SmallIntVal&);
35 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const IntVal&);
36 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const BigIntVal&);
37 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const FloatVal&);
38 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const DoubleVal&);
39 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const StringVal&);
40 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const TimestampVal&);
41 template BooleanVal IsNullPredicate::IsNull(FunctionContext*, const DecimalVal&);
42 
43 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const BooleanVal&);
44 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const TinyIntVal&);
45 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const SmallIntVal&);
46 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const IntVal&);
47 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const BigIntVal&);
48 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const FloatVal&);
49 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const DoubleVal&);
50 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const StringVal&);
51 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const TimestampVal&);
52 template BooleanVal IsNullPredicate::IsNotNull(FunctionContext*, const DecimalVal&);
53 
54 }
This object has a compatible storage format with boost::ptime.
Definition: udf.h:495
bool is_null
Definition: udf.h:359