Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
gen_ir_descriptions Namespace Reference

Functions

def move_if_different
 

Variables

tuple parser = OptionParser()
 
string help = "If specified, does not remove existing files and only replaces "
 
list ir_functions
 
string enums_preamble
 
string enums_epilogue
 
string names_preamble
 
string names_epilogue
 
tuple BE_PATH = os.path.join(os.environ['IMPALA_HOME'], 'be/generated-sources/impala-ir/')
 
string IR_FUNCTIONS_FILE = 'impala-ir-functions.h'
 
string IR_NAMES_FILE = 'impala-ir-names.h'
 
tuple IR_FUNCTIONS_PATH = os.path.join(BE_PATH, IR_FUNCTIONS_FILE)
 
tuple IR_NAMES_PATH = os.path.join(BE_PATH, IR_NAMES_FILE)
 
tuple TMP_IR_FUNCTIONS_PATH = os.path.join(tempfile.gettempdir(), IR_FUNCTIONS_FILE)
 
tuple TMP_IR_NAMES_PATH = os.path.join(tempfile.gettempdir(), IR_NAMES_FILE)
 
tuple enums_file = open(TMP_IR_FUNCTIONS_PATH, 'w')
 
tuple names_file = open(TMP_IR_NAMES_PATH, 'w')
 
int idx = 0
 
list enum = fn[0]
 
list fn_name = fn[1]
 

Function Documentation

def gen_ir_descriptions.move_if_different (   src_file,
  dest_file 
)
Moves src_file to dest_file if dest_file does not exist, or if
the contents of src_file and dest_file differ. Assumes that src_file exists.

Definition at line 188 of file gen_ir_descriptions.py.

Variable Documentation

tuple gen_ir_descriptions.BE_PATH = os.path.join(os.environ['IMPALA_HOME'], 'be/generated-sources/impala-ir/')

Definition at line 196 of file gen_ir_descriptions.py.

list gen_ir_descriptions.enum = fn[0]

Definition at line 218 of file gen_ir_descriptions.py.

string gen_ir_descriptions.enums_epilogue
Initial value:
1 = '\
2  };\n\
3 };\n\
4 \n\
5 }\n\
6 \n\
7 #endif\n'

Definition at line 143 of file gen_ir_descriptions.py.

tuple gen_ir_descriptions.enums_file = open(TMP_IR_FUNCTIONS_PATH, 'w')

Definition at line 209 of file gen_ir_descriptions.py.

string gen_ir_descriptions.enums_preamble
Initial value:
1 = '\
2 // Copyright 2012 Cloudera Inc.\n\
3 //\n\
4 // Licensed under the Apache License, Version 2.0 (the "License");\n\
5 // you may not use this file except in compliance with the License.\n\
6 // You may obtain a copy of the License at\n\
7 //\n\
8 // http://www.apache.org/licenses/LICENSE-2.0\n\
9 //\n\
10 // Unless required by applicable law or agreed to in writing, software\n\
11 // distributed under the License is distributed on an "AS IS" BASIS,\n\
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
13 // See the License for the specific language governing permissions and\n\
14 // limitations under the License.\n\
15 \n\
16 // This is a generated file, DO NOT EDIT IT.\n\
17 // To add new functions, see be/src/codegen/gen_ir_descriptions.py.\n\
18 \n\
19 #ifndef IMPALA_IR_FUNCTIONS_H\n\
20 #define IMPALA_IR_FUNCTIONS_H\n\
21 \n\
22 namespace impala {\n\
23 \n\
24 class IRFunction {\n\
25  public:\n\
26  enum Type {\n'

Definition at line 116 of file gen_ir_descriptions.py.

string gen_ir_descriptions.help = "If specified, does not remove existing files and only replaces "

Definition at line 25 of file gen_ir_descriptions.py.

list gen_ir_descriptions.ir_functions

Definition at line 40 of file gen_ir_descriptions.py.

string gen_ir_descriptions.IR_FUNCTIONS_FILE = 'impala-ir-functions.h'

Definition at line 197 of file gen_ir_descriptions.py.

tuple gen_ir_descriptions.IR_FUNCTIONS_PATH = os.path.join(BE_PATH, IR_FUNCTIONS_FILE)

Definition at line 199 of file gen_ir_descriptions.py.

string gen_ir_descriptions.IR_NAMES_FILE = 'impala-ir-names.h'

Definition at line 198 of file gen_ir_descriptions.py.

tuple gen_ir_descriptions.IR_NAMES_PATH = os.path.join(BE_PATH, IR_NAMES_FILE)

Definition at line 200 of file gen_ir_descriptions.py.

string gen_ir_descriptions.names_epilogue
Initial value:
1 = '\
2 };\n\
3 \n\
4 }\n\
5 \n\
6 #endif\n'

Definition at line 181 of file gen_ir_descriptions.py.

tuple gen_ir_descriptions.names_file = open(TMP_IR_NAMES_PATH, 'w')

Definition at line 212 of file gen_ir_descriptions.py.

string gen_ir_descriptions.names_preamble
Initial value:
1 = '\
2 // Copyright 2012 Cloudera Inc.\n\
3 //\n\
4 // Licensed under the Apache License, Version 2.0 (the "License");\n\
5 // you may not use this file except in compliance with the License.\n\
6 // You may obtain a copy of the License at\n\
7 //\n\
8 // http://www.apache.org/licenses/LICENSE-2.0\n\
9 //\n\
10 // Unless required by applicable law or agreed to in writing, software\n\
11 // distributed under the License is distributed on an "AS IS" BASIS,\n\
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
13 // See the License for the specific language governing permissions and\n\
14 // limitations under the License.\n\
15 \n\
16 // This is a generated file, DO NOT EDIT IT.\n\
17 // To add new functions, see be/src/codegen/gen_ir_descriptions.py.\n\
18 \n\
19 #ifndef IMPALA_IR_FUNCTION_NAMES_H\n\
20 #define IMPALA_IR_FUNCTION_NAMES_H\n\
21 \n\
22 #include "impala-ir/impala-ir-functions.h"\n\
23 \n\
24 namespace impala {\n\
25 \n\
26 static struct {\n\
27  std::string fn_name; \n\
28  IRFunction::Type fn; \n\
29 } FN_MAPPINGS[] = {\n'

Definition at line 151 of file gen_ir_descriptions.py.

tuple gen_ir_descriptions.TMP_IR_FUNCTIONS_PATH = os.path.join(tempfile.gettempdir(), IR_FUNCTIONS_FILE)

Definition at line 201 of file gen_ir_descriptions.py.

tuple gen_ir_descriptions.TMP_IR_NAMES_PATH = os.path.join(tempfile.gettempdir(), IR_NAMES_FILE)

Definition at line 202 of file gen_ir_descriptions.py.