OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TableFunctionsFactory_transformers.SupportedAnnotationsTransformer Class Reference
+ Inheritance diagram for TableFunctionsFactory_transformers.SupportedAnnotationsTransformer:
+ Collaboration diagram for TableFunctionsFactory_transformers.SupportedAnnotationsTransformer:

Public Member Functions

def visit_udtf_node
 
- Public Member Functions inherited from TableFunctionsFactory_transformers.AstTransformer
def visit_udtf_node
 
def visit_composed_node
 
def visit_arg_node
 
def visit_primitive_node
 
def visit_template_node
 
def visit_annotation_node
 
- Public Member Functions inherited from TableFunctionsFactory_transformers.AstVisitor
def visit_udtf_node
 
def visit_composed_node
 
def visit_arg_node
 
def visit_primitive_node
 
def visit_annotation_node
 
def visit_template_node
 

Detailed Description

* Checks for supported annotations in a UDTF

Definition at line 339 of file TableFunctionsFactory_transformers.py.

Member Function Documentation

def TableFunctionsFactory_transformers.SupportedAnnotationsTransformer.visit_udtf_node (   self,
  udtf_node 
)

Definition at line 343 of file TableFunctionsFactory_transformers.py.

344  def visit_udtf_node(self, udtf_node):
345  for t in udtf_node.inputs:
346  for a in t.annotations:
347  if a.key not in util.SupportedAnnotations:
348  raise TransformerException('unknown input annotation: `%s`' % (a.key))
349  for t in udtf_node.outputs:
350  for a in t.annotations:
351  if a.key not in util.SupportedAnnotations:
352  raise TransformerException('unknown output annotation: `%s`' % (a.key))
353  for annot in udtf_node.annotations:
354  if annot.key not in util.SupportedFunctionAnnotations:
355  raise TransformerException('unknown function annotation: `%s`' % (annot.key))
356  if annot.value.lower() in ['enable', 'on', '1', 'true']:
357  annot.value = '1'
358  elif annot.value.lower() in ['disable', 'off', '0', 'false']:
359  annot.value = '0'
360  return udtf_node
361 

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