OmniSciDB  085a039ca4
 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  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 ExtArgumentTypes
 
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 1935 of file generate_TableFunctionsFactory_init.py.

References join().

Referenced by add_methods().

1936 def add_method(i, chunk):
1937  return '''
1938  NO_OPT_ATTRIBUTE void add_table_functions_%d() const {
1939  %s
1940  }
1941 ''' % (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 1942 of file generate_TableFunctionsFactory_init.py.

References add_method().

1943 def add_methods(add_stmts):
1944  chunks = [ add_stmts[n:n+ADD_FUNC_CHUNK_SIZE] for n in range(0, len(add_stmts), ADD_FUNC_CHUNK_SIZE) ]
1945  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 1701 of file generate_TableFunctionsFactory_init.py.

References format_function_args().

Referenced by parse_annotations().

1702 def build_preflight_function(fn_name, sizer, input_types, output_types, uses_manager):
1703 
1704  def format_error_msg(err_msg, uses_manager):
1705  if uses_manager:
1706  return " return mgr.error_message(%s);\n" % (err_msg,)
1707  else:
1708  return " return table_function_error(%s);\n" % (err_msg,)
1709 
1710  cpp_args, _ = format_function_args(input_types,
1711  output_types,
1712  uses_manager,
1713  use_generic_arg_name=False,
1714  emit_output_args=False)
1715 
1716  if uses_manager:
1717  fn = "EXTENSION_NOINLINE int32_t\n"
1718  fn += "%s(%s) {\n" % (fn_name.lower() + "__preflight", cpp_args)
1719  else:
1720  fn = "EXTENSION_NOINLINE int32_t\n"
1721  fn += "%s(%s) {\n" % (fn_name.lower() + "__preflight", cpp_args)
1722 
1723  for typ in input_types:
1724  ann = typ.annotations
1725  for key, value in ann:
1726  if key == 'require':
1727  err_msg = '"Constraint `%s` is not satisfied."' % (value[1:-1])
1728 
1729  fn += " if (!(%s)) {\n" % (value[1:-1].replace('\\', ''),)
1730  fn += format_error_msg(err_msg, uses_manager)
1731  fn += " }\n"
1732 
1733  if sizer.is_arg_sizer():
1734  precomputed_nrows = str(sizer.args[0])
1735  if '"' in precomputed_nrows:
1736  precomputed_nrows = precomputed_nrows[1:-1]
1737  # check to see if the precomputed number of rows > 0
1738  err_msg = '"Output size expression `%s` evaluated in a negative value."' % (precomputed_nrows)
1739  fn += " auto _output_size = %s;\n" % (precomputed_nrows)
1740  fn += " if (_output_size < 0) {\n"
1741  fn += format_error_msg(err_msg, uses_manager)
1742  fn += " }\n"
1743  fn += " return _output_size;\n"
1744  else:
1745  fn += " return 0;\n"
1746  fn += "}\n\n"
1747 
1748  return fn
1749 

+ 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 1687 of file generate_TableFunctionsFactory_init.py.

References format_function_args().

Referenced by parse_annotations().

1688 def build_template_function_call(caller, called, input_types, output_types, uses_manager):
1689  cpp_args, name_args = format_function_args(input_types,
1690  output_types,
1691  uses_manager,
1692  use_generic_arg_name=True,
1693  emit_output_args=True)
1694 
1695  template = ("EXTENSION_NOINLINE int32_t\n"
1696  "%s(%s) {\n"
1697  " return %s(%s);\n"
1698  "}\n") % (caller, cpp_args, called, name_args)
1699  return template
1700 

+ 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 1946 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 355 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.parse().

356 def find_comma(line):
357  d = 0
358  for i, c in enumerate(line):
359  if c in '<([{':
360  d += 1
361  elif c in '>)]{':
362  d -= 1
363  elif d == 0 and c == ',':
364  return i
365  return -1
366 

+ 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 1594 of file generate_TableFunctionsFactory_init.py.

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

Referenced by parse_annotations().

1595 def find_signatures(input_file):
1596  """Returns a list of parsed UDTF signatures."""
1597  signatures = []
1598 
1599  last_line = None
1600  for line in open(input_file).readlines():
1601  line = line.strip()
1602  if last_line is not None:
1603  line = last_line + ' ' + line
1604  last_line = None
1605  if not line.startswith('UDTF:'):
1606  continue
1607  if line_is_incomplete(line):
1608  last_line = line
1609  continue
1610  last_line = None
1611  line = line[5:].lstrip()
1612  i = line.find('(')
1613  j = line.find(')')
1614  if i == -1 or j == -1:
1615  sys.stderr.write('Invalid UDTF specification: `%s`. Skipping.\n' % (line))
1616  continue
1617 
1618  expected_result = None
1619  if separator in line:
1620  line, expected_result = line.split(separator, 1)
1621  expected_result = expected_result.strip().split(separator)
1622  expected_result = list(map(lambda s: s.strip(), expected_result))
1623 
1624  ast = Parser(line).parse()
1625 
1626  if expected_result is not None:
1627  # Template transformer expands templates into multiple lines
1628  skip_signature = False
1629  try:
1630  result = Pipeline(TemplateTransformer,
1631  FieldAnnotationTransformer,
1632  TextEncodingDictTransformer,
1633  SupportedAnnotationsTransformer,
1634  FixRowMultiplierPosArgTransformer,
1635  RenameNodesTransformer,
1636  AstPrinter)(ast)
1637  except TransformerException as msg:
1638  result = ['%s: %s' % (type(msg).__name__, msg)]
1639  skip_signature = True
1640  assert set(result) == set(expected_result), "\n\tresult: %s != \n\texpected: %s" % (
1641  result,
1642  expected_result,
1643  )
1644  if skip_signature:
1645  continue
1646 
1647  signature = Pipeline(TemplateTransformer,
1648  FieldAnnotationTransformer,
1649  TextEncodingDictTransformer,
1650  SupportedAnnotationsTransformer,
1651  FixRowMultiplierPosArgTransformer,
1652  RenameNodesTransformer,
1653  DeclBracketTransformer)(ast)
1654 
1655  signatures.extend(signature)
1656 
1657  return signatures
1658 
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: omnisci_fs.cpp:64

+ 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 1760 of file generate_TableFunctionsFactory_init.py.

References join().

Referenced by parse_annotations().

1761 def format_annotations(annotations_):
1762  def fmt(k, v):
1763  # type(v) is not always 'str'
1764  if k == 'require':
1765  return v[1:-1]
1766  return v
1767 
1768  s = "std::vector<std::map<std::string, std::string>>{"
1769  s += ', '.join(('{' + ', '.join('{"%s", "%s"}' % (k, fmt(k, v)) for k, v in a) + '}') for a in annotations_)
1770  s += "}"
1771  return s
1772 
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 1659 of file generate_TableFunctionsFactory_init.py.

References join().

Referenced by build_preflight_function(), and build_template_function_call().

1660 def format_function_args(input_types, output_types, uses_manager, use_generic_arg_name, emit_output_args):
1661  cpp_args = []
1662  name_args = []
1663 
1664  if uses_manager:
1665  cpp_args.append('TableFunctionManager& mgr')
1666  name_args.append('mgr')
1667 
1668  for idx, typ in enumerate(input_types):
1669  cpp_arg, name = typ.format_cpp_type(idx,
1670  use_generic_arg_name=use_generic_arg_name,
1671  is_input=True)
1672  cpp_args.append(cpp_arg)
1673  name_args.append(name)
1674 
1675  if emit_output_args:
1676  for idx, typ in enumerate(output_types):
1677  cpp_arg, name = typ.format_cpp_type(idx,
1678  use_generic_arg_name=use_generic_arg_name,
1679  is_input=False)
1680  cpp_args.append(cpp_arg)
1681  name_args.append(name)
1682 
1683  cpp_args = ', '.join(cpp_args)
1684  name_args = ', '.join(name_args)
1685  return cpp_args, name_args
1686 
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 1782 of file generate_TableFunctionsFactory_init.py.

References uses_manager().

Referenced by parse_annotations().

1783 def is_cpu_function(sig):
1784  # Any function that does not have _gpu_ suffix is a cpu function.
1785  i = sig.name.rfind('_gpu_')
1786  if i >= 0 and '__' in sig.name[:i + 1]:
1787  if uses_manager(sig):
1788  raise ValueError('Table function {} with gpu execution target cannot have TableFunctionManager argument'.format(sig.name))
1789  return False
1790  return True
1791 

+ 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 1792 of file generate_TableFunctionsFactory_init.py.

References uses_manager().

Referenced by parse_annotations().

1793 def is_gpu_function(sig):
1794  # A function with TableFunctionManager argument is a cpu-only function
1795  if uses_manager(sig):
1796  return False
1797  # Any function that does not have _cpu_ suffix is a gpu function.
1798  i = sig.name.rfind('_cpu_')
1799  return not (i >= 0 and '__' in sig.name[:i + 1])
1800 

+ 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 373 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Parser.parse_composed().

374 def is_identifier_cursor(identifier):
375  return identifier.lower() == 'cursor'
376 
377 
378 # fmt: on
379 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.is_template_function (   sig)

Definition at line 1773 of file generate_TableFunctionsFactory_init.py.

Referenced by parse_annotations().

1774 def is_template_function(sig):
1775  i = sig.name.rfind('_template')
1776  return i >= 0 and '__' in sig.name[:i + 1]
1777 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.line_is_incomplete (   line)

Definition at line 367 of file generate_TableFunctionsFactory_init.py.

Referenced by find_signatures().

368 def line_is_incomplete(line):
369  # TODO: try to parse the line to be certain about completeness.
370  # `$=>$' is used to separate the UDTF signature and the expected result
371  return line.endswith(',') or line.endswith('->') or line.endswith(separator) or line.endswith('|')
372 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.must_emit_preflight_function (   sig,
  sizer 
)

Definition at line 1750 of file generate_TableFunctionsFactory_init.py.

Referenced by parse_annotations().

1751 def must_emit_preflight_function(sig, sizer):
1752  if sizer.is_arg_sizer():
1753  return True
1754  for arg_annotations in sig.input_annotations:
1755  d = dict(arg_annotations)
1756  if 'require' in d.keys():
1757  return True
1758  return False
1759 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.parse_annotations (   input_files)

Definition at line 1801 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().

1802 def parse_annotations(input_files):
1803 
1804  counter = 0
1805 
1806  add_stmts = []
1807  cpu_template_functions = []
1808  gpu_template_functions = []
1809  cpu_function_address_expressions = []
1810  gpu_function_address_expressions = []
1811  cond_fns = []
1812 
1813  for input_file in input_files:
1814  for sig in find_signatures(input_file):
1815 
1816  # Compute sql_types, input_types, and sizer
1817  sql_types_ = []
1818  input_types_ = []
1819  input_annotations = []
1820 
1821  sizer = None
1822  if sig.sizer is not None:
1823  expr = sig.sizer.value
1824  sizer = Bracket('kPreFlightParameter', (expr,))
1825 
1826  uses_manager = False
1827  for i, (t, annot) in enumerate(zip(sig.inputs, sig.input_annotations)):
1828  if t.is_output_buffer_sizer():
1829  if t.is_user_specified():
1830  sql_types_.append(Bracket.parse('int32').normalize(kind='input'))
1831  input_types_.append(sql_types_[-1])
1832  input_annotations.append(annot)
1833  assert sizer is None # exactly one sizer argument is allowed
1834  assert len(t.args) == 1, t
1835  sizer = t
1836  elif t.name == 'Cursor':
1837  for t_ in t.args:
1838  input_types_.append(t_)
1839  input_annotations.append(annot)
1840  sql_types_.append(Bracket('Cursor', args=()))
1841  elif t.name == 'TableFunctionManager':
1842  if i != 0:
1843  raise ValueError('{} must appear as a first argument of {}, but found it at position {}.'.format(t, sig.name, i))
1844  uses_manager = True
1845  else:
1846  input_types_.append(t)
1847  input_annotations.append(annot)
1848  if t.is_column_any():
1849  # XXX: let Bracket handle mapping of column to cursor(column)
1850  sql_types_.append(Bracket('Cursor', args=()))
1851  else:
1852  sql_types_.append(t)
1853 
1854  if sizer is None:
1855  name = 'kTableFunctionSpecifiedParameter'
1856  idx = 1 # this sizer is not actually materialized in the UDTF
1857  sizer = Bracket(name, (idx,))
1858 
1859  assert sizer is not None
1860  ns_output_types = tuple([a.apply_namespace(ns='ExtArgumentType') for a in sig.outputs])
1861  ns_input_types = tuple([t.apply_namespace(ns='ExtArgumentType') for t in input_types_])
1862  ns_sql_types = tuple([t.apply_namespace(ns='ExtArgumentType') for t in sql_types_])
1863 
1864  sig.function_annotations.append(('uses_manager', str(uses_manager).lower()))
1865 
1866  input_types = 'std::vector<ExtArgumentType>{%s}' % (', '.join(map(tostring, ns_input_types)))
1867  output_types = 'std::vector<ExtArgumentType>{%s}' % (', '.join(map(tostring, ns_output_types)))
1868  sql_types = 'std::vector<ExtArgumentType>{%s}' % (', '.join(map(tostring, ns_sql_types)))
1869  annotations = format_annotations(input_annotations + sig.output_annotations + [sig.function_annotations])
1870 
1871  # Notice that input_types and sig.input_types, (and
1872  # similarly, input_annotations and sig.input_annotations)
1873  # have different lengths when the sizer argument is
1874  # Constant or TableFunctionSpecifiedParameter. That is,
1875  # input_types contains all the user-specified arguments
1876  # while sig.input_types contains all arguments of the
1877  # implementation of an UDTF.
1878 
1879  if must_emit_preflight_function(sig, sizer):
1880  fn_name = '%s_%s' % (sig.name, str(counter)) if is_template_function(sig) else sig.name
1881  check_fn = build_preflight_function(fn_name, sizer, input_types_, sig.outputs, uses_manager)
1882  cond_fns.append(check_fn)
1883 
1884  if is_template_function(sig):
1885  name = sig.name + '_' + str(counter)
1886  counter += 1
1887  t = build_template_function_call(name, sig.name, input_types_, sig.outputs, uses_manager)
1888  address_expression = ('avoid_opt_address(reinterpret_cast<void*>(%s))' % name)
1889  if is_cpu_function(sig):
1890  cpu_template_functions.append(t)
1891  cpu_function_address_expressions.append(address_expression)
1892  if is_gpu_function(sig):
1893  gpu_template_functions.append(t)
1894  gpu_function_address_expressions.append(address_expression)
1895  add = ('TableFunctionsFactory::add("%s", %s, %s, %s, %s, %s, /*is_runtime:*/false);'
1896  % (name, sizer.format_sizer(), input_types, output_types, sql_types, annotations))
1897  add_stmts.append(add)
1898 
1899  else:
1900  add = ('TableFunctionsFactory::add("%s", %s, %s, %s, %s, %s, /*is_runtime:*/false);'
1901  % (sig.name, sizer.format_sizer(), input_types, output_types, sql_types, annotations))
1902  add_stmts.append(add)
1903  address_expression = ('avoid_opt_address(reinterpret_cast<void*>(%s))' % sig.name)
1904 
1905  if is_cpu_function(sig):
1906  cpu_function_address_expressions.append(address_expression)
1907  if is_gpu_function(sig):
1908  gpu_function_address_expressions.append(address_expression)
1909 
1910  return add_stmts, cpu_template_functions, gpu_template_functions, cpu_function_address_expressions, gpu_function_address_expressions, cond_fns
1911 
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 751 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.TemplateTransformer.visit_udtf_node().

752 def product_dict(**kwargs):
753  keys = kwargs.keys()
754  vals = kwargs.values()
755  for instance in itertools.product(*vals):
756  yield dict(zip(keys, instance))
757 

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.tostring (   obj)

Definition at line 175 of file generate_TableFunctionsFactory_init.py.

176 def tostring(obj):
177  return obj.tostring()
178 
def generate_TableFunctionsFactory_init.uses_manager (   sig)

Definition at line 1778 of file generate_TableFunctionsFactory_init.py.

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

1779 def uses_manager(sig):
1780  return sig.inputs and sig.inputs[0].name == 'TableFunctionManager'
1781 

+ Here is the caller graph for this function:

Variable Documentation

int generate_TableFunctionsFactory_init.ADD_FUNC_CHUNK_SIZE = 100

Definition at line 1933 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 1929 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.content

Definition at line 1950 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 1923 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 2047 of file generate_TableFunctionsFactory_init.py.

string generate_TableFunctionsFactory_init.ExtArgumentTypes
Initial value:
1 = ''' Int8, Int16, Int32, Int64, Float, Double, Void, PInt8, PInt16,
2 PInt32, PInt64, PFloat, PDouble, PBool, Bool, ArrayInt8, ArrayInt16,
3 ArrayInt32, ArrayInt64, ArrayFloat, ArrayDouble, ArrayBool, GeoPoint,
4 GeoLineString, Cursor, GeoPolygon, GeoMultiPolygon, ColumnInt8,
5 ColumnInt16, ColumnInt32, ColumnInt64, ColumnFloat, ColumnDouble,
6 ColumnBool, ColumnTextEncodingDict, ColumnTimestamp, TextEncodingNone,
7 TextEncodingDict, Timestamp, ColumnListInt8, ColumnListInt16, ColumnListInt32,
8 ColumnListInt64, ColumnListFloat, ColumnListDouble, ColumnListBool,
9 ColumnListTextEncodingDict'''

Definition at line 82 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 2057 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 1924 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 2038 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 1930 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 1914 of file generate_TableFunctionsFactory_init.py.

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

Definition at line 92 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
3 '''

Definition at line 96 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 101 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 105 of file generate_TableFunctionsFactory_init.py.