OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
generate_TableFunctionsFactory_init.Bracket Class Reference

Public Member Functions

def __init__
 
def __repr__
 
def __str__
 
def tostring
 
def normalize
 
def apply_cursor
 
def apply_column
 
def apply_namespace
 
def is_cursor
 
def is_column_any
 
def is_column_list
 
def is_column
 
def is_any_text_encoding_dict
 
def is_column_text_encoding_dict
 
def is_column_list_text_encoding_dict
 
def is_output_buffer_sizer
 
def is_row_multiplier
 
def is_arg_sizer
 
def is_user_specified
 
def format_sizer
 
def get_cpp_type
 
def format_cpp_type
 
def parse
 

Public Attributes

 name
 
 args
 

Detailed Description

Holds a `NAME<ARGS>`-like structure.

Definition at line 179 of file generate_TableFunctionsFactory_init.py.

Constructor & Destructor Documentation

def generate_TableFunctionsFactory_init.Bracket.__init__ (   self,
  name,
  args = None 
)

Definition at line 183 of file generate_TableFunctionsFactory_init.py.

184  def __init__(self, name, args=None):
185  assert isinstance(name, str)
186  assert isinstance(args, tuple) or args is None, args
187  self.name = name
188  self.args = args

Member Function Documentation

def generate_TableFunctionsFactory_init.Bracket.__repr__ (   self)

Definition at line 189 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.args, com.mapd.parser.server.ExtensionFunction.args, com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

190  def __repr__(self):
191  return 'Bracket(%r, args=%r)' % (self.name, self.args)
def generate_TableFunctionsFactory_init.Bracket.__str__ (   self)

Definition at line 192 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.args, com.mapd.parser.server.ExtensionFunction.args, join(), com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

193  def __str__(self):
194  if not self.args:
195  return self.name
196  return '%s<%s>' % (self.name, ', '.join(map(str, self.args)))
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.apply_column (   self)

Definition at line 230 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.is_column(), generate_TableFunctionsFactory_init.Bracket.is_column_list(), com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

231  def apply_column(self):
232  if not self.is_column() and not self.is_column_list():
233  return Bracket('Column' + self.name)
234  return self

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.apply_cursor (   self)
Apply cursor to a non-cursor column argument type.
TODO: this method is currently unused but we should apply
cursor to all input column arguments in order to distingush
signatures like:
  foo(Cursor(Column<int32>, Column<float>)) -> Column<int32>
  foo(Cursor(Column<int32>), Cursor(Column<float>)) -> Column<int32>
that at the moment are treated as the same :(

Definition at line 217 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.is_column().

218  def apply_cursor(self):
219  """Apply cursor to a non-cursor column argument type.
220  TODO: this method is currently unused but we should apply
221  cursor to all input column arguments in order to distingush
222  signatures like:
223  foo(Cursor(Column<int32>, Column<float>)) -> Column<int32>
224  foo(Cursor(Column<int32>), Cursor(Column<float>)) -> Column<int32>
225  that at the moment are treated as the same :(
226  """
227  if self.is_column():
228  return Bracket('Cursor', args=(self,))
229  return self

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.apply_namespace (   self,
  ns = 'ExtArgumentType' 
)

Definition at line 235 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.args, com.mapd.parser.server.ExtensionFunction.args, com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

236  def apply_namespace(self, ns='ExtArgumentType'):
237  if self.name == 'Cursor':
238  return Bracket(ns + '::' + self.name, args=tuple(a.apply_namespace(ns=ns) for a in self.args))
239  if not self.name.startswith(ns + '::'):
240  return Bracket(ns + '::' + self.name)
241  return self
def generate_TableFunctionsFactory_init.Bracket.format_cpp_type (   self,
  idx,
  use_generic_arg_name = False,
  real_arg_name = None,
  is_input = True 
)

Definition at line 309 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Declaration.get_cpp_type(), and generate_TableFunctionsFactory_init.Bracket.get_cpp_type().

310  def format_cpp_type(self, idx, use_generic_arg_name=False, real_arg_name=None, is_input=True):
311  col_typs = ('Column', 'ColumnList')
312  literal_ref_typs = ('TextEncodingNone',)
313  if use_generic_arg_name:
314  arg_name = 'input' + str(idx) if is_input else 'output' + str(idx)
315  elif real_arg_name is not None:
316  arg_name = real_arg_name
317  else:
318  # in some cases, the real arg name is not specified
319  arg_name = 'input' + str(idx) if is_input else 'output' + str(idx)
320  const = 'const ' if is_input else ''
321  cpp_type = self.get_cpp_type()
322 
323  if any(cpp_type.startswith(t) for t in col_typs + literal_ref_typs):
324  return '%s%s& %s' % (const, cpp_type, arg_name), arg_name
325  else:
326  return '%s %s' % (cpp_type, arg_name), arg_name

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.format_sizer (   self)

Definition at line 278 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.args, com.mapd.parser.server.ExtensionFunction.args, generate_TableFunctionsFactory_init.Bracket.is_arg_sizer(), com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

279  def format_sizer(self):
280  val = 0 if self.is_arg_sizer() else self.args[0]
281  return 'TableFunctionOutputRowSizer{OutputBufferSizeType::%s, %s}' % (self.name, val)

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.get_cpp_type (   self)

Definition at line 282 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.format_cpp_type().

283  def get_cpp_type(self):
284  name = self.name.rsplit("::", 1)[-1]
285  clsname = None
286  if name.startswith('ColumnList'):
287  name = name.lstrip('ColumnList')
288  clsname = 'ColumnList'
289  elif name.startswith('Column'):
290  name = name.lstrip('Column')
291  clsname = 'Column'
292  if name.startswith('Bool'):
293  ctype = name.lower()
294  elif name.startswith('Int'):
295  ctype = name.lower() + '_t'
296  elif name in ['Double', 'Float']:
297  ctype = name.lower()
298  elif name == 'TextEncodingDict':
299  ctype = name
300  elif name == 'TextEncodingNone':
301  ctype = name
302  elif name == 'Timestamp':
303  ctype = name
304  else:
305  raise NotImplementedError(self)
306  if clsname is None:
307  return ctype
308  return '%s<%s>' % (clsname, ctype)

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_any_text_encoding_dict (   self)

Definition at line 254 of file generate_TableFunctionsFactory_init.py.

255  def is_any_text_encoding_dict(self):
256  return self.name.rsplit("::", 1)[-1].endswith('TextEncodingDict')
def generate_TableFunctionsFactory_init.Bracket.is_arg_sizer (   self)

Definition at line 269 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.format_sizer().

270  def is_arg_sizer(self):
271  return self.name.rsplit("::", 1)[-1] == 'kPreFlightParameter'

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_column (   self)

Definition at line 251 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.is_column_list().

Referenced by generate_TableFunctionsFactory_init.Bracket.apply_column(), generate_TableFunctionsFactory_init.Bracket.apply_cursor(), and generate_TableFunctionsFactory_init.ComposedNode.is_column_text_encoding_dict().

252  def is_column(self):
253  return self.name.rsplit("::", 1)[-1].startswith('Column') and not self.is_column_list()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_column_any (   self)

Definition at line 245 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.normalize().

246  def is_column_any(self):
247  return self.name.rsplit("::", 1)[-1].startswith('Column')

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_column_list (   self)

Definition at line 248 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.apply_column(), generate_TableFunctionsFactory_init.Bracket.is_column(), and generate_TableFunctionsFactory_init.ComposedNode.is_column_list_text_encoding_dict().

249  def is_column_list(self):
250  return self.name.rsplit("::", 1)[-1].startswith('ColumnList')

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_column_list_text_encoding_dict (   self)

Definition at line 260 of file generate_TableFunctionsFactory_init.py.

262  return self.name.rsplit("::", 1)[-1] == 'ColumnListTextEncodingDict'
def generate_TableFunctionsFactory_init.Bracket.is_column_text_encoding_dict (   self)

Definition at line 257 of file generate_TableFunctionsFactory_init.py.

259  return self.name.rsplit("::", 1)[-1] == 'ColumnTextEncodingDict'
def generate_TableFunctionsFactory_init.Bracket.is_cursor (   self)

Definition at line 242 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.ComposedNode.cursor_length().

243  def is_cursor(self):
244  return self.name.rsplit("::", 1)[-1] == 'Cursor'

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_output_buffer_sizer (   self)

Definition at line 263 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.is_user_specified().

264  def is_output_buffer_sizer(self):
265  return self.name.rsplit("::", 1)[-1] in OutputBufferSizeTypes

+ Here is the caller graph for this function:

def generate_TableFunctionsFactory_init.Bracket.is_row_multiplier (   self)

Definition at line 266 of file generate_TableFunctionsFactory_init.py.

267  def is_row_multiplier(self):
268  return self.name.rsplit("::", 1)[-1] == 'kUserSpecifiedRowMultiplier'
def generate_TableFunctionsFactory_init.Bracket.is_user_specified (   self)

Definition at line 272 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.is_output_buffer_sizer().

273  def is_user_specified(self):
274  # Return True if given argument cannot specified by user
275  if self.is_output_buffer_sizer():
276  return self.name.rsplit("::", 1)[-1] not in ('kConstant', 'kTableFunctionSpecifiedParameter', 'kPreFlightParameter')
277  return True

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.normalize (   self,
  kind = 'input' 
)
Normalize bracket for given kind

Definition at line 202 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.args, com.mapd.parser.server.ExtensionFunction.args, generate_TableFunctionsFactory_init.Bracket.is_column_any(), join(), com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

203  def normalize(self, kind='input'):
204  """Normalize bracket for given kind
205  """
206  assert kind in ['input', 'output'], kind
207  if self.is_column_any() and self.args:
208  return Bracket(self.name + ''.join(map(str, self.args)))
209  if kind == 'input':
210  if self.name == 'Cursor':
211  args = [(a if a.is_column_any() else Bracket('Column', args=(a,))).normalize(kind=kind) for a in self.args]
212  return Bracket(self.name, tuple(args))
213  if kind == 'output':
214  if not self.is_column_any():
215  return Bracket('Column', args=(self,)).normalize(kind=kind)
216  return self
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.parse (   cls,
  typ 
)
typ is a string in format NAME<ARGS> or NAME

Returns Bracket instance.

Definition at line 328 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.find_comma(), and strip().

329  def parse(cls, typ):
330  """typ is a string in format NAME<ARGS> or NAME
331 
332  Returns Bracket instance.
333  """
334  i = typ.find('<')
335  if i == -1:
336  name = typ.strip()
337  args = None
338  else:
339  assert typ.endswith('>'), typ
340  name = typ[:i].strip()
341  args = []
342  rest = typ[i + 1:-1].strip()
343  while rest:
344  i = find_comma(rest)
345  if i == -1:
346  a, rest = rest, ''
347  else:
348  a, rest = rest[:i].rstrip(), rest[i + 1:].lstrip()
349  args.append(cls.parse(a))
350  args = tuple(args)
351 
352  name = translate_map.get(name, name)
353  return cls(name, args)
354 
std::string strip(std::string_view str)
trim any whitespace from the left and right ends of a string

+ Here is the call graph for this function:

def generate_TableFunctionsFactory_init.Bracket.tostring (   self)

Definition at line 197 of file generate_TableFunctionsFactory_init.py.

References generate_TableFunctionsFactory_init.Bracket.args, com.mapd.parser.server.ExtensionFunction.args, join(), com.mapd.parser.extension.ddl.heavysql.HeavySqlTypeNameSpec.name, com.mapd.parser.extension.ddl.heavysql.HeavySqlColumn.name, com.mapd.parser.extension.ddl.SqlInsertValues.name, com.mapd.parser.extension.ddl.SqlDropUser.name, ai.heavy.jdbc.HeavyAIColumnTypeTest.Answer.name, com.mapd.parser.extension.ddl.SqlDropDB.name, com.mapd.parser.extension.ddl.SqlRenameDB.name, com.mapd.parser.extension.ddl.SqlRenameUser.name, com.mapd.parser.extension.ddl.SqlCreateDB.name, com.mapd.parser.extension.ddl.SqlCreateUser.name, com.mapd.parser.extension.ddl.SqlAlterUser.name, foreign_storage::ForeignServer.name, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, com.mapd.parser.extension.ddl.SqlInsertIntoTable.name, com.mapd.parser.extension.ddl.SqlCheckConstraint.name, com.mapd.parser.extension.ddl.SqlCreateView.name, com.mapd.parser.extension.ddl.SqlAttributeDefinition.name, com.mapd.parser.extension.ddl.SqlCreateTable.name, com.mapd.parser.extension.ddl.SqlKeyConstraint.name, com.mapd.parser.extension.ddl.SqlColumnDeclaration.name, Catalog_Namespace::CustomExpression.name, benchmarks.StringDictionaryBenchmark.name, import_export::RasterImporter::ImportBandInfo.name, CodeGenerator::NullCheckCodegen.name, generate_TableFunctionsFactory_init.Bracket.name, heavydb.extension_functions.ttypes.TUserDefinedFunction.name, Function::NamedArg.name, heavydb.extension_functions.ttypes.TUserDefinedTableFunction.name, ArrowForeignStorage.name, import_export::Importer::GeoFileLayerInfo.name, heavydb.thrift.ttypes.TDashboardGrantees.name, heavydb.thrift.ttypes.TGeoFileLayerInfo.name, and heavydb.thrift.ttypes.TCustomExpression.name.

198  def tostring(self):
199  if not self.args:
200  return self.name
201  return '%s<%s>' % (self.name, ', '.join(map(tostring, self.args)))
std::string join(T const &container, std::string const &delim)

+ Here is the call graph for this function:

Member Data Documentation

generate_TableFunctionsFactory_init.Bracket.args

Definition at line 187 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.__repr__(), generate_TableFunctionsFactory_init.Bracket.__str__(), generate_TableFunctionsFactory_init.Bracket.apply_namespace(), generate_TableFunctionsFactory_init.Bracket.format_sizer(), generate_TableFunctionsFactory_init.Bracket.normalize(), and generate_TableFunctionsFactory_init.Bracket.tostring().

generate_TableFunctionsFactory_init.Bracket.name

Definition at line 186 of file generate_TableFunctionsFactory_init.py.

Referenced by generate_TableFunctionsFactory_init.Bracket.__repr__(), generate_TableFunctionsFactory_init.Bracket.__str__(), generate_TableFunctionsFactory_init.UdtfNode.__str__(), generate_TableFunctionsFactory_init.Bracket.apply_column(), generate_TableFunctionsFactory_init.Bracket.apply_namespace(), generate_TableFunctionsFactory_init.Bracket.format_sizer(), generate_TableFunctionsFactory_init.Bracket.normalize(), and generate_TableFunctionsFactory_init.Bracket.tostring().


The documentation for this class was generated from the following file: