Module Expr Str ImportFrom alias alias alias alias alias alias ImportFrom alias alias Import alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body If Call NameLoad NameLoad body Return NameLoad Return Call NameLoad NameLoad Call AttributeLoad NameLoad attr orelse If Call NameLoad GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Return ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse If Call NameLoad AttributeLoad NameLoad attr NameLoad body Return Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Index Num Return Call NameLoad NameLoad orelse If Call NameLoad AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp Call NameLoad NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Import alias identifier Return ListComp NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad BoolOpAnd Call NameLoad NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad BoolOpAnd Call NameLoad NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr BoolOpAnd Call NameLoad NameLoad NameLoad CompareNotIn AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list Return Call NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body Assert UnaryOpNot Call NameLoad NameLoad NameLoad Return Call NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareGt NameLoad Num For NameStore Call AttributeLoad NameLoad attr body Assert UnaryOpNot Call NameLoad NameLoad NameLoad If Call NameLoad NameLoad NameLoad body AugAssignSub AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr body Assert BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad If BoolOpAnd Call NameLoad NameLoad NameLoad CompareIn AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp Call NameLoad NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad body Raise Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad If BoolOpAnd NameLoad NameLoad body Raise Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad BoolOpOr NameLoad NameLoad decorator_list Expr Call NameLoad NameLoad NameLoad decorator_list
N/A N/A 
Utility functions for use in Raco expressions
 expression Expression BinaryOperator AttributeRef NamedAttributeRef UnnamedAttributeRef NamedStateAttributeRef aggregate BuiltinAggregateExpression AggregateExpression N/A copy N/A inspect NestedAggregateException N/A Exception N/A N/A Nested aggregate functions are not allowed __init__ N/A N/A self lineno N/A N/A N/A N/A self lineno lineno N/A __str__ N/A N/A self N/A N/A N/A N/A Nested aggregate expression on line %d N/A self lineno N/A N/A ensure_unnamed N/A N/A exprs op N/A N/A N/A Returns the expressions in the supplied exprs, ensuring that all
    attribute references are in the unnamed perspective. The expressions are
    resolved against the scheme of the supplied operator, but only if
    necessary.

    :param exprs: an expression or sequence of expressions.
    :param op: the operator against whose scheme non-unnamed references will be
               resolved. Scheme is only computed if needed.
     N/A N/A isinstance exprs Expression N/A N/A N/A only_unnamed_refs exprs N/A N/A exprs N/A N/A to_unnamed_recursive exprs N/A N/A op scheme N/A N/A N/A all N/A N/A only_unnamed_refs e N/A e exprs N/A N/A exprs N/A op_scheme N/A N/A op scheme N/A N/A N/A to_unnamed_recursive e op_scheme N/A e exprs N/A toUnnamed N/A N/A ref scheme N/A N/A N/A Convert a reference to the unnamed perspective N/A N/A issubclass N/A ref __class__ UnnamedAttributeRef N/A N/A ref N/A N/A N/A issubclass N/A ref __class__ NamedAttributeRef N/A N/A N/A UnnamedAttributeRef N/A N/A scheme getPosition N/A ref name N/A N/A N/A TypeError N/A Unknown value reference %s.  Expected a position reference or an attribute reference. ref N/A toNamed N/A N/A ref scheme N/A N/A N/A Convert a reference to the named perspective N/A N/A issubclass N/A ref __class__ UnnamedAttributeRef N/A N/A attrname N/A N/A scheme N/A N/A ref position N/A 0 N/A N/A NamedAttributeRef attrname N/A N/A N/A issubclass N/A ref __class__ NamedAttributeRef N/A N/A ref N/A N/A N/A TypeError Unknown value reference %s.  Expected a position reference or an attribute reference. N/A to_unnamed_recursive N/A N/A sexpr scheme N/A N/A N/A Convert all named column references to unnamed column references. convert N/A N/A n N/A N/A N/A N/A isinstance n NamedAttributeRef N/A N/A n N/A toUnnamed n scheme N/A N/A N/A n apply convert N/A n N/A N/A N/A convert sexpr N/A only_unnamed_refs N/A N/A sexpr N/A N/A N/A Returns True if all AttributeRefs in the expression are unnamed. N/A N/A all N/A N/A isinstance e UnnamedAttributeRef N/A e N/A N/A sexpr walk N/A isinstance e AttributeRef N/A all_classes N/A N/A N/A N/A N/A Return a list of all classes in the module N/A raco.expression expr N/A N/A obj N/A N/A _ obj N/A N/A inspect getmembers expr N/A inspect isclass N/A aggregate_functions N/A N/A N/A N/A N/A Return all the classes that can be used to construct an aggregate expression N/A allclasses N/A all_classes N/A opclasses N/A opclass N/A opclass allclasses N/A N/A issubclass opclass BuiltinAggregateExpression N/A N/A N/A inspect isabstract opclass N/A opclasses N/A binary_ops N/A N/A N/A N/A N/A Return a list of all classes used to construct arithmetic, like PLUS, DIVIDE, etc. N/A allclasses N/A all_classes N/A opclasses N/A opclass N/A opclass allclasses N/A N/A issubclass opclass BinaryOperator N/A N/A N/A inspect isabstract opclass N/A opclasses N/A udf_undefined_vars N/A N/A expr vars N/A N/A N/A Return a list of undefined variables in a UDF.

    :param expr: An expression corresponding to a UDF.  Variable references are
    identified by instances of NamedAttributeRef.

    :param vars: A list of variables in the argument list to the function.
    :type vars: list of strings
     N/A N/A N/A ex name N/A ex N/A N/A expr walk N/A N/A isinstance ex NamedAttributeRef N/A N/A ex name vars N/A resolve_function N/A N/A func_expr arg_dict N/A N/A N/A Bind variables to arguments in a function invocation.

    :param func_expr: An expression corresponding to function
    :type func_expr: Expression
    :param arg_dict: The arguments to the function
    :type arg_dict: A dictionary mapping string to Expression
    :returns: An expression with no variables
     convert N/A N/A n N/A N/A N/A N/A isinstance n NamedAttributeRef N/A N/A n N/A N/A copy deepcopy N/A arg_dict N/A N/A n name N/A N/A N/A N/A n apply convert N/A n N/A N/A N/A convert N/A N/A copy deepcopy func_expr N/A resolve_state_vars N/A N/A expr state_vars mangled_names N/A N/A N/A Convert references to state variables into NamedStateAttributeRef
    references.

    :param expr: An expression instances
    :type expr: Expression
    :param state_vars: Variables that represent state variables
    :type state_vars: List of strings
    :param mangled_names: A mapping from name to its mangled version
    :type mangled_names: Dictionary from string to string
    :return: An instance of Expression
     convert N/A N/A n N/A N/A N/A N/A N/A isinstance n NamedAttributeRef N/A N/A n name state_vars N/A N/A n N/A NamedStateAttributeRef N/A mangled_names N/A N/A n name N/A N/A N/A N/A n apply convert N/A n N/A N/A N/A convert N/A N/A copy deepcopy expr N/A accessed_columns N/A N/A expr N/A N/A N/A Return a set of column indexes accessed by an expression.

    Assumes that named attribute references have been converted to integer
    positions.
     N/A ex N/A N/A expr walk N/A N/A N/A N/A isinstance ex NamedAttributeRef N/A N/A set N/A N/A ex position N/A ex N/A N/A expr walk N/A isinstance ex UnnamedAttributeRef N/A rebase_expr N/A N/A expr offset N/A N/A N/A Subtract the given offset from each column access.

    Assumes that named attribute references have been converted to integer
    positions.
     N/A N/A offset 0 N/A ex N/A N/A expr walk N/A N/A N/A N/A isinstance ex NamedAttributeRef N/A N/A isinstance ex UnnamedAttributeRef N/A N/A N/A ex position offset N/A reindex_expr N/A N/A expr index_map N/A N/A N/A Changes references to key columns to references to value columns in
    index_map.

    Assumes that named attribute references have been converted to integer
    positions.
     N/A ex N/A N/A expr walk N/A N/A N/A N/A N/A isinstance ex AttributeRef N/A isinstance ex UnnamedAttributeRef N/A N/A N/A isinstance ex UnnamedAttributeRef N/A N/A ex position index_map N/A N/A N/A ex position N/A index_map N/A N/A ex position N/A expression_contains_aggregate N/A N/A ex N/A N/A N/A Return True if the expression contains an aggregate. N/A N/A any N/A N/A isinstance sx AggregateExpression N/A sx N/A N/A ex walk N/A check_no_aggregate N/A N/A ex lineno N/A N/A N/A Raise an exception if the provided expression contains an aggregate. N/A N/A expression_contains_aggregate ex N/A N/A N/A NestedAggregateException lineno N/A check_no_nested_aggregate N/A N/A ex lineno N/A N/A N/A Raise an exception if the expression contains a nested aggregate. descend N/A N/A sx in_aggregate N/A N/A N/A is_aggregate N/A isinstance sx AggregateExpression N/A N/A is_aggregate in_aggregate N/A N/A N/A NestedAggregateException lineno N/A child N/A N/A sx get_children N/A N/A N/A descend child N/A is_aggregate in_aggregate N/A N/A N/A descend ex False N/A