Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
codegen-anyval-ir.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
#ifdef IR_COMPILE
16
#include "
runtime/string-value.inline.h
"
17
#include "
runtime/timestamp-value.h
"
18
#include "
udf/udf.h
"
19
20
using namespace
impala;
21
using namespace
impala_udf;
22
23
// Note: we explicitly pass by reference because passing by value has special ABI rules
24
25
// Used by CodegenAnyVal::Eq()
26
27
bool
StringValEq(
const
StringVal
& x,
const
StringVal
& y) {
28
return
x == y;
29
}
30
31
bool
TimestampValEq(
const
TimestampVal
& x,
const
TimestampVal
& y) {
32
return
x == y;
33
}
34
35
// Used by CodegenAnyVal::EqToNativePtr()
36
37
bool
StringValueEq(
const
StringVal
& x,
const
StringValue
& y) {
38
StringValue
sv =
StringValue::FromStringVal
(x);
39
return
sv.
Eq
(y);
40
}
41
42
bool
TimestampValueEq(
const
TimestampVal
& x,
const
TimestampValue
& y) {
43
TimestampValue
tv =
TimestampValue::FromTimestampVal
(x);
44
return
tv == y;
45
}
46
47
#else
48
#error "This file should only be used for cross compiling to IR."
49
#endif
50
impala::StringValue::Eq
bool Eq(const StringValue &other) const
==
Definition:
string-value.inline.h:74
timestamp-value.h
impala::StringValue
Definition:
string-value.h:33
udf.h
impala_udf::TimestampVal
This object has a compatible storage format with boost::ptime.
Definition:
udf.h:495
impala::TimestampValue
Definition:
timestamp-value.h:65
string-value.inline.h
impala_udf::StringVal
Definition:
udf.h:521
impala::TimestampValue::FromTimestampVal
static TimestampValue FromTimestampVal(const impala_udf::TimestampVal &udf_value)
Definition:
timestamp-value.h:111
impala::StringValue::FromStringVal
static StringValue FromStringVal(const impala_udf::StringVal &sv)
Definition:
string-value.h:103
be
src
codegen
codegen-anyval-ir.cc
Generated on Thu May 7 2015 16:10:34 for Impala by
1.8.6