OmniSciDB  ca0c39ec8f
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
generate_TableFunctionsFactory_init Namespace Reference

Classes

class  Declaration
 
class  Bracket
 
class  TokenizeException
 
class  ParserException
 
class  TransformerException
 
class  Token
 
class  Tokenize
 
class  AstVisitor
 
class  AstTransformer
 
class  AstPrinter
 
class  AstDebugger
 
class  TemplateTransformer
 
class  FixRowMultiplierPosArgTransformer
 
class  RenameNodesTransformer
 
class  TextEncodingDictTransformer
 
class  FieldAnnotationTransformer
 
class  SupportedAnnotationsTransformer
 
class  RangeAnnotationTransformer
 
class  DeclBracketTransformer
 
class  Node
 
class  IterableNode
 
class  UdtfNode
 
class  ArgNode
 
class  TypeNode
 
class  PrimitiveNode
 
class  ComposedNode
 
class  AnnotationNode
 
class  TemplateNode
 
class  Pipeline
 
class  Parser
 

Functions

def tostring
 
def find_comma
 
def line_is_incomplete
 
def is_identifier_cursor
 
def product_dict
 
def find_signatures
 
def format_function_args
 
def build_template_function_call
 
def build_preflight_function
 
def must_emit_preflight_function
 
def format_annotations
 
def is_template_function
 
def uses_manager
 
def is_cpu_function
 
def is_gpu_function
 
def parse_annotations
 
def add_method
 
def add_methods
 
def call_methods
 

Variables

string separator = '$=>$'
 
tuple Signature = namedtuple('Signature', ['name', 'inputs', 'outputs', 'input_annotations', 'output_annotations', 'function_annotations', 'sizer'])
 
string OutputBufferSizeTypes
 
string SupportedAnnotations
 
string SupportedFunctionAnnotations
 
tuple translate_map
 
list input_files = [os.path.join(os.path.dirname(__file__), 'test_udtf_signatures.hpp')]
 
tuple cpu_output_header = os.path.splitext(output_filename)
 
tuple gpu_output_header = os.path.splitext(output_filename)
 
list canonical_input_files = [input_file[input_file.find("/QueryEngine/") + 1:] for input_file in input_files]
 
list header_includes = ['#include "' + canonical_input_file + '"' for canonical_input_file in canonical_input_files]
 
int ADD_FUNC_CHUNK_SIZE = 100
 
string content
 
string header_content
 
tuple dirname = os.path.dirname(output_filename)
 
tuple f = open(output_filename, 'w')
 

Detailed Description

Given a list of input files, scan for lines containing UDTF
specification statements in the following form:

  UDTF: function_name(<arguments>) -> <output column types> (, <template type specifications>)?

where <arguments> is a comma-separated list of argument types. The
argument types specifications are:

- scalar types:
    Int8, Int16, Int32, Int64, Float, Double, Bool, TextEncodingDict, etc
- column types:
    ColumnInt8, ColumnInt16, ColumnInt32, ColumnInt64, ColumnFloat, ColumnDouble, ColumnBool, etc
- column list types:
    ColumnListInt8, ColumnListInt16, ColumnListInt32, ColumnListInt64, ColumnListFloat, ColumnListDouble, ColumnListBool, etc
- cursor type:
    Cursor<t0, t1, ...>
  where t0, t1 are column or column list types
- output buffer size parameter type:
    RowMultiplier<i>, ConstantParameter<i>, Constant<i>, TableFunctionSpecifiedParameter<i>
  where i is a literal integer.

The output column types is a comma-separated list of column types, see above.

In addition, the following equivalents are suppored:

  Column<T> == ColumnT
  ColumnList<T> == ColumnListT
  Cursor<T, V, ...> == Cursor<ColumnT, ColumnV, ...>
  int8 == int8_t == Int8, etc
  float == Float, double == Double, bool == Bool
  T == ColumnT for output column types
  RowMultiplier == RowMultiplier<i> where i is the one-based position of the sizer argument
  when no sizer argument is provided, Constant<1> is assumed

Argument types can be annotated using `|' (bar) symbol after an
argument type specification. An annotation is specified by a label and
a value separated by `=' (equal) symbol. Multiple annotations can be
specified by using `|` (bar) symbol as the annotations separator.
Supported annotation labels are:

- name: to specify argument name
- input_id: to specify the dict id mapping for output TextEncodingDict columns.

If argument type follows an identifier, it will be mapped to name
annotations. For example, the following argument type specifications
are equivalent:

  Int8 a
  Int8 | name=a

Template type specifications is a comma separated list of template
type assignments where values are lists of argument type names. For
instance:

  T = [Int8, Int16, Int32, Float], V = [Float, Double]

Function Documentation

def generate_TableFunctionsFactory_init.add_method (   i,
  chunk 
)

Definition at line 2001 of file generate_TableFunctionsFactory_init.py.

References join().

Referenced by add_methods().

2002 def add_method(i, chunk):
2003  return '''
2004  NO_OPT_ATTRIBUTE void add_table_functions_%d() const {
2005  %s
2006  }
2007 ''' % (i, '\n '.join(chunk))
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.add_methods (   add_stmts)

Definition at line 2008 of file generate_TableFunctionsFactory_init.py.

References add_method().

2009 def add_methods(add_stmts):
2010  chunks = [ add_stmts[n:n+ADD_FUNC_CHUNK_SIZE] for n in range(0, len(add_stmts), ADD_FUNC_CHUNK_SIZE) ]
2011  return [ add_method(i,chunk) for i,chunk in enumerate(chunks) ]

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.build_preflight_function (   fn_name,
  sizer,
  input_types,
  output_types,
  uses_manager 
)

Definition at line 1766 of file generate_TableFunctionsFactory_init.py.

References format_function_args().

Referenced by parse_annotations().

1767 def build_preflight_function(fn_name, sizer, input_types, output_types, uses_manager):
1768 
1769  def format_error_msg(err_msg, uses_manager):
1770  if uses_manager:
1771  return " return mgr.error_message(%s);\n" % (err_msg,)
1772  else:
1773  return " return table_function_error(%s);\n" % (err_msg,)
1774 
1775  cpp_args, _ = format_function_args(input_types,
1776  output_types,
1777  uses_manager,
1778  use_generic_arg_name=False,
1779  emit_output_args=False)
1780 
1781  if uses_manager:
1782  fn = "EXTENSION_NOINLINE int32_t\n"
1783  fn += "%s(%s) {\n" % (fn_name.lower() + "__preflight", cpp_args)
1784  else:
1785  fn = "EXTENSION_NOINLINE int32_t\n"
1786  fn += "%s(%s) {\n" % (fn_name.lower() + "__preflight", cpp_args)
1787 
1788  for typ in input_types:
1789  if isinstance(typ, Declaration):
1790  ann = typ.annotations
1791  for key, value in ann:
1792  if key == 'require':
1793  err_msg = '"Constraint `%s` is not satisfied."' % (value[1:-1])
1794 
1795  fn += " if (!(%s)) {\n" % (value[1:-1].replace('\\', ''),)
1796  fn += format_error_msg(err_msg, uses_manager)
1797  fn += " }\n"
1798 
1799  if sizer.is_arg_sizer():
1800  precomputed_nrows = str(sizer.args[0])
1801  if '"' in precomputed_nrows:
1802  precomputed_nrows = precomputed_nrows[1:-1]
1803  # check to see if the precomputed number of rows > 0
1804  err_msg = '"Output size expression `%s` evaluated in a negative value."' % (precomputed_nrows)
1805  fn += " auto _output_size = %s;\n" % (precomputed_nrows)
1806  fn += " if (_output_size < 0) {\n"
1807  fn += format_error_msg(err_msg, uses_manager)
1808  fn += " }\n"
1809  fn += " return _output_size;\n"
1810  else:
1811  fn += " return 0;\n"
1812  fn += "}\n\n"
1813 
1814  return fn
1815 

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.build_template_function_call (   caller,
  called,
  input_types,
  output_types,
  uses_manager 
)

Definition at line 1752 of file generate_TableFunctionsFactory_init.py.

References format_function_args().

Referenced by parse_annotations().

1753 def build_template_function_call(caller, called, input_types, output_types, uses_manager):
1754  cpp_args, name_args = format_function_args(input_types,
1755  output_types,
1756  uses_manager,
1757  use_generic_arg_name=True,
1758  emit_output_args=True)
1759 
1760  template = ("EXTENSION_NOINLINE int32_t\n"
1761  "%s(%s) {\n"
1762  " return %s(%s);\n"
1763  "}\n") % (caller, cpp_args, called, name_args)
1764  return template
1765 

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.call_methods (   add_stmts)

Definition at line 2012 of file generate_TableFunctionsFactory_init.py.

2013 def call_methods(add_stmts):
2014  quot, rem = divmod(len(add_stmts), ADD_FUNC_CHUNK_SIZE)
2015  return [ 'add_table_functions_%d();' % (i) for i in range(quot + int(0 < rem)) ]
def generate_TableFunctionsFactory_init.find_comma (   line)

Definition at line 363 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.parse().

364 def find_comma(line):
365  d = 0
366  for i, c in enumerate(line):
367  if c in '<([{':
368  d += 1
369  elif c in '>)]{':
370  d -= 1
371  elif d == 0 and c == ',':
372  return i
373  return -1
374 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.find_signatures (   input_file)
Returns a list of parsed UDTF signatures.

Definition at line 1656 of file generate_TableFunctionsFactory_init.py.

References join(), line_is_incomplete(), heavyai.open(), split(), and run_benchmark_import.type.

Referenced by parse_annotations().

1657 def find_signatures(input_file):
1658  """Returns a list of parsed UDTF signatures."""
1659  signatures = []
1660 
1661  last_line = None
1662  for line in open(input_file).readlines():
1663  line = line.strip()
1664  if last_line is not None:
1665  line = last_line + ' ' + line
1666  last_line = None
1667  if not line.startswith('UDTF:'):
1668  continue
1669  if line_is_incomplete(line):
1670  last_line = line
1671  continue
1672  last_line = None
1673  line = line[5:].lstrip()
1674  i = line.find('(')
1675  j = line.find(')')
1676  if i == -1 or j == -1:
1677  sys.stderr.write('Invalid UDTF specification: `%s`. Skipping.\n' % (line))
1678  continue
1679 
1680  expected_result = None
1681  if separator in line:
1682  line, expected_result = line.split(separator, 1)
1683  expected_result = expected_result.strip().split(separator)
1684  expected_result = list(map(lambda s: s.strip(), expected_result))
1685 
1686  ast = Parser(line).parse()
1687 
1688  if expected_result is not None:
1689  # Template transformer expands templates into multiple lines
1690  try:
1691  result = Pipeline(TemplateTransformer,
1692  FieldAnnotationTransformer,
1693  TextEncodingDictTransformer,
1694  SupportedAnnotationsTransformer,
1695  RangeAnnotationTransformer,
1696  FixRowMultiplierPosArgTransformer,
1697  RenameNodesTransformer,
1698  AstPrinter)(ast)
1699  except TransformerException as msg:
1700  result = ['%s: %s' % (type(msg).__name__, msg)]
1701  assert len(result) == len(expected_result), "\n\tresult: %s \n!= \n\texpected: %s" % (
1702  '\n\t\t '.join(result),
1703  '\n\t\t '.join(expected_result)
1704  )
1705  assert set(result) == set(expected_result), "\n\tresult: %s != \n\texpected: %s" % (
1706  '\n\t\t '.join(result),
1707  '\n\t\t '.join(expected_result),
1708  )
1709 
1710  else:
1711  signature = Pipeline(TemplateTransformer,
1712  FieldAnnotationTransformer,
1713  TextEncodingDictTransformer,
1714  SupportedAnnotationsTransformer,
1715  RangeAnnotationTransformer,
1716  FixRowMultiplierPosArgTransformer,
1717  RenameNodesTransformer,
1718  DeclBracketTransformer)(ast)
1719 
1720  signatures.extend(signature)
1721 
1722  return signatures
1723 
std::string join(T const &container, std::string const &delim)
std::vector< std::string > split(std::string_view str, std::string_view delim, std::optional< size_t > maxsplit)
split apart a string into a vector of substrings
int open(const char *path, int flags, int mode)
Definition: heavyai_fs.cpp:66

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.format_annotations (   annotations_)

Definition at line 1826 of file generate_TableFunctionsFactory_init.py.

References join().

Referenced by parse_annotations().

1827 def format_annotations(annotations_):
1828  def fmt(k, v):
1829  # type(v) is not always 'str'
1830  if k == 'require':
1831  return v[1:-1]
1832  return v
1833 
1834  s = "std::vector<std::map<std::string, std::string>>{"
1835  s += ', '.join(('{' + ', '.join('{"%s", "%s"}' % (k, fmt(k, v)) for k, v in a) + '}') for a in annotations_)
1836  s += "}"
1837  return s
1838 
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.format_function_args (   input_types,
  output_types,
  uses_manager,
  use_generic_arg_name,
  emit_output_args 
)

Definition at line 1724 of file generate_TableFunctionsFactory_init.py.

References join().

Referenced by build_preflight_function(), and build_template_function_call().

1725 def format_function_args(input_types, output_types, uses_manager, use_generic_arg_name, emit_output_args):
1726  cpp_args = []
1727  name_args = []
1728 
1729  if uses_manager:
1730  cpp_args.append('TableFunctionManager& mgr')
1731  name_args.append('mgr')
1732 
1733  for idx, typ in enumerate(input_types):
1734  cpp_arg, name = typ.format_cpp_type(idx,
1735  use_generic_arg_name=use_generic_arg_name,
1736  is_input=True)
1737  cpp_args.append(cpp_arg)
1738  name_args.append(name)
1739 
1740  if emit_output_args:
1741  for idx, typ in enumerate(output_types):
1742  cpp_arg, name = typ.format_cpp_type(idx,
1743  use_generic_arg_name=use_generic_arg_name,
1744  is_input=False)
1745  cpp_args.append(cpp_arg)
1746  name_args.append(name)
1747 
1748  cpp_args = ', '.join(cpp_args)
1749  name_args = ', '.join(name_args)
1750  return cpp_args, name_args
1751 
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.is_cpu_function (   sig)

Definition at line 1848 of file generate_TableFunctionsFactory_init.py.

References uses_manager().

Referenced by parse_annotations().

1849 def is_cpu_function(sig):
1850  # Any function that does not have _gpu_ suffix is a cpu function.
1851  i = sig.name.rfind('_gpu_')
1852  if i >= 0 and '__' in sig.name[:i + 1]:
1853  if uses_manager(sig):
1854  raise ValueError('Table function {} with gpu execution target cannot have TableFunctionManager argument'.format(sig.name))
1855  return False
1856  return True
1857 

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.is_gpu_function (   sig)

Definition at line 1858 of file generate_TableFunctionsFactory_init.py.

References uses_manager().

Referenced by parse_annotations().

1859 def is_gpu_function(sig):
1860  # A function with TableFunctionManager argument is a cpu-only function
1861  if uses_manager(sig):
1862  return False
1863  # Any function that does not have _cpu_ suffix is a gpu function.
1864  i = sig.name.rfind('_cpu_')
1865  return not (i >= 0 and '__' in sig.name[:i + 1])
1866 

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.is_identifier_cursor (   identifier)

Definition at line 381 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Parser.parse_composed().

382 def is_identifier_cursor(identifier):
383  return identifier.lower() == 'cursor'
384 
385 
386 # fmt: on
387 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.is_template_function (   sig)

Definition at line 1839 of file generate_TableFunctionsFactory_init.py.

Referenced by parse_annotations().

1840 def is_template_function(sig):
1841  i = sig.name.rfind('_template')
1842  return i >= 0 and '__' in sig.name[:i + 1]
1843 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.line_is_incomplete (   line)

Definition at line 375 of file generate_TableFunctionsFactory_init.py.

Referenced by find_signatures().

376 def line_is_incomplete(line):
377  # TODO: try to parse the line to be certain about completeness.
378  # `$=>$' is used to separate the UDTF signature and the expected result
379  return line.endswith(',') or line.endswith('->') or line.endswith(separator) or line.endswith('|')
380 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.must_emit_preflight_function (   sig,
  sizer 
)

Definition at line 1816 of file generate_TableFunctionsFactory_init.py.

Referenced by parse_annotations().

1817 def must_emit_preflight_function(sig, sizer):
1818  if sizer.is_arg_sizer():
1819  return True
1820  for arg_annotations in sig.input_annotations:
1821  d = dict(arg_annotations)
1822  if 'require' in d.keys():
1823  return True
1824  return False
1825 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.parse_annotations (   input_files)

Definition at line 1867 of file generate_TableFunctionsFactory_init.py.

References build_preflight_function(), build_template_function_call(), find_signatures(), format_annotations(), is_cpu_function(), is_gpu_function(), is_template_function(), join(), and must_emit_preflight_function().

1868 def parse_annotations(input_files):
1869 
1870  counter = 0
1871 
1872  add_stmts = []
1873  cpu_template_functions = []
1874  gpu_template_functions = []
1875  cpu_function_address_expressions = []
1876  gpu_function_address_expressions = []
1877  cond_fns = []
1878 
1879  for input_file in input_files:
1880  for sig in find_signatures(input_file):
1881 
1882  # Compute sql_types, input_types, and sizer
1883  sql_types_ = []
1884  input_types_ = []
1885  input_annotations = []
1886 
1887  sizer = None
1888  if sig.sizer is not None:
1889  expr = sig.sizer.value
1890  sizer = Bracket('kPreFlightParameter', (expr,))
1891 
1892  uses_manager = False
1893  for i, (t, annot) in enumerate(zip(sig.inputs, sig.input_annotations)):
1894  if t.is_output_buffer_sizer():
1895  if t.is_user_specified():
1896  sql_types_.append(Bracket.parse('int32').normalize(kind='input'))
1897  input_types_.append(sql_types_[-1])
1898  input_annotations.append(annot)
1899  assert sizer is None # exactly one sizer argument is allowed
1900  assert len(t.args) == 1, t
1901  sizer = t
1902  elif t.name == 'Cursor':
1903  for t_ in t.args:
1904  input_types_.append(t_)
1905  input_annotations.append(annot)
1906  sql_types_.append(Bracket('Cursor', args=()))
1907  elif t.name == 'TableFunctionManager':
1908  if i != 0:
1909  raise ValueError('{} must appear as a first argument of {}, but found it at position {}.'.format(t, sig.name, i))
1910  uses_manager = True
1911  else:
1912  input_types_.append(t)
1913  input_annotations.append(annot)
1914  if t.is_column_any():
1915  # XXX: let Bracket handle mapping of column to cursor(column)
1916  sql_types_.append(Bracket('Cursor', args=()))
1917  else:
1918  sql_types_.append(t)
1919 
1920  if sizer is None:
1921  name = 'kTableFunctionSpecifiedParameter'
1922  idx = 1 # this sizer is not actually materialized in the UDTF
1923  sizer = Bracket(name, (idx,))
1924 
1925  assert sizer is not None
1926  ns_output_types = tuple([a.apply_namespace(ns='ExtArgumentType') for a in sig.outputs])
1927  ns_input_types = tuple([t.apply_namespace(ns='ExtArgumentType') for t in input_types_])
1928  ns_sql_types = tuple([t.apply_namespace(ns='ExtArgumentType') for t in sql_types_])
1929 
1930  sig.function_annotations.append(('uses_manager', str(uses_manager).lower()))
1931 
1932  input_types = 'std::vector<ExtArgumentType>{%s}' % (', '.join(map(tostring, ns_input_types)))
1933  output_types = 'std::vector<ExtArgumentType>{%s}' % (', '.join(map(tostring, ns_output_types)))
1934  sql_types = 'std::vector<ExtArgumentType>{%s}' % (', '.join(map(tostring, ns_sql_types)))
1935  annotations = format_annotations(input_annotations + sig.output_annotations + [sig.function_annotations])
1936 
1937  # Notice that input_types and sig.input_types, (and
1938  # similarly, input_annotations and sig.input_annotations)
1939  # have different lengths when the sizer argument is
1940  # Constant or TableFunctionSpecifiedParameter. That is,
1941  # input_types contains all the user-specified arguments
1942  # while sig.input_types contains all arguments of the
1943  # implementation of an UDTF.
1944 
1945  if must_emit_preflight_function(sig, sizer):
1946  fn_name = '%s_%s' % (sig.name, str(counter)) if is_template_function(sig) else sig.name
1947  check_fn = build_preflight_function(fn_name, sizer, input_types_, sig.outputs, uses_manager)
1948  cond_fns.append(check_fn)
1949 
1950  if is_template_function(sig):
1951  name = sig.name + '_' + str(counter)
1952  counter += 1
1953  t = build_template_function_call(name, sig.name, input_types_, sig.outputs, uses_manager)
1954  address_expression = ('avoid_opt_address(reinterpret_cast<void*>(%s))' % name)
1955  if is_cpu_function(sig):
1956  cpu_template_functions.append(t)
1957  cpu_function_address_expressions.append(address_expression)
1958  if is_gpu_function(sig):
1959  gpu_template_functions.append(t)
1960  gpu_function_address_expressions.append(address_expression)
1961  add = ('TableFunctionsFactory::add("%s", %s, %s, %s, %s, %s, /*is_runtime:*/false);'
1962  % (name, sizer.format_sizer(), input_types, output_types, sql_types, annotations))
1963  add_stmts.append(add)
1964 
1965  else:
1966  add = ('TableFunctionsFactory::add("%s", %s, %s, %s, %s, %s, /*is_runtime:*/false);'
1967  % (sig.name, sizer.format_sizer(), input_types, output_types, sql_types, annotations))
1968  add_stmts.append(add)
1969  address_expression = ('avoid_opt_address(reinterpret_cast<void*>(%s))' % sig.name)
1970 
1971  if is_cpu_function(sig):
1972  cpu_function_address_expressions.append(address_expression)
1973  if is_gpu_function(sig):
1974  gpu_function_address_expressions.append(address_expression)
1975 
1976  return add_stmts, cpu_template_functions, gpu_template_functions, cpu_function_address_expressions, gpu_function_address_expressions, cond_fns
1977 
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.product_dict (   kwargs)

Definition at line 763 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.TemplateTransformer.visit_udtf_node().

764 def product_dict(**kwargs):
765  keys = kwargs.keys()
766  vals = kwargs.values()
767  for instance in itertools.product(*vals):
768  yield dict(zip(keys, instance))
769 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.tostring (   obj)

Definition at line 165 of file generate_TableFunctionsFactory_init.py.

166 def tostring(obj):
167  return obj.tostring()
168 
def generate_TableFunctionsFactory_init.uses_manager (   sig)

Definition at line 1844 of file generate_TableFunctionsFactory_init.py.

Referenced by table_functions::TableFunctionsFactory.add(), is_cpu_function(), and is_gpu_function().

1845 def uses_manager(sig):
1846  return sig.inputs and sig.inputs[0].name == 'TableFunctionManager'
1847 

+ Here is the caller graph for this function:

Variable Documentation

int generate_TableFunctionsFactory_init.ADD_FUNC_CHUNK_SIZE = 100

Definition at line 1999 of file generate_TableFunctionsFactory_init.py.

list generate_TableFunctionsFactory_init.canonical_input_files = [input_file[input_file.find("/QueryEngine/") + 1:] for input_file in input_files]

Definition at line 1995 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.content

Definition at line 2016 of file generate_TableFunctionsFactory_init.py.

tuple generate_TableFunctionsFactory_init.cpu_output_header = os.path.splitext(output_filename)

Definition at line 1989 of file generate_TableFunctionsFactory_init.py.

tuple generate_TableFunctionsFactory_init.dirname = os.path.dirname(output_filename)

Definition at line 2113 of file generate_TableFunctionsFactory_init.py.

tuple generate_TableFunctionsFactory_init.f = open(output_filename, 'w')

Definition at line 2123 of file generate_TableFunctionsFactory_init.py.

tuple generate_TableFunctionsFactory_init.gpu_output_header = os.path.splitext(output_filename)

Definition at line 1990 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.header_content
Initial value:
1 = '''
2 /*
3  This file is generated by %s. Do no edit!
4 */
5 %s
6 
7 %s
8 '''

Definition at line 2104 of file generate_TableFunctionsFactory_init.py.

list generate_TableFunctionsFactory_init.header_includes = ['#include "' + canonical_input_file + '"' for canonical_input_file in canonical_input_files]

Definition at line 1996 of file generate_TableFunctionsFactory_init.py.

list generate_TableFunctionsFactory_init.input_files = [os.path.join(os.path.dirname(__file__), 'test_udtf_signatures.hpp')]

Definition at line 1980 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.OutputBufferSizeTypes
Initial value:
1 = '''
2 kConstant, kUserSpecifiedConstantParameter, kUserSpecifiedRowMultiplier, kTableFunctionSpecifiedParameter, kPreFlightParameter
3 '''

Definition at line 82 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.separator = '$=>$'

Definition at line 78 of file generate_TableFunctionsFactory_init.py.

Referenced by foreign_storage::anonymous_namespace{AbstractFileStorageDataWrapper.cpp}.append_file_path(), ai.heavy.jdbc.HeavyAIEscapeFunctions.appendCall(), foreign_storage::AbstractFileStorageDataWrapper.getFullFilePath(), import_export.import_thread_shapefile(), and pop_n_rows_from_merged_heaps_gpu().

tuple generate_TableFunctionsFactory_init.Signature = namedtuple('Signature', ['name', 'inputs', 'outputs', 'input_annotations', 'output_annotations', 'function_annotations', 'sizer'])

Definition at line 80 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.DeclBracketTransformer.visit_udtf_node().

string generate_TableFunctionsFactory_init.SupportedAnnotations
Initial value:
1 = '''
2 input_id, name, fields, require, range
3 '''

Definition at line 86 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.SupportedFunctionAnnotations
Initial value:
1 = '''
2 filter_table_function_transpose, uses_manager
3 '''

Definition at line 91 of file generate_TableFunctionsFactory_init.py.

tuple generate_TableFunctionsFactory_init.translate_map
Initial value:
1 = dict(
2  Constant='kConstant',
3  PreFlight='kPreFlightParameter',
4  ConstantParameter='kUserSpecifiedConstantParameter',
5  RowMultiplier='kUserSpecifiedRowMultiplier',
6  UserSpecifiedConstantParameter='kUserSpecifiedConstantParameter',
7  UserSpecifiedRowMultiplier='kUserSpecifiedRowMultiplier',
8  TableFunctionSpecifiedParameter='kTableFunctionSpecifiedParameter',
9  short='Int16',
10  int='Int32',
11  long='Int64',
12 )

Definition at line 95 of file generate_TableFunctionsFactory_init.py.