Class: Kumi::Core::Analyzer::Plans::Scope

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumi/core/analyzer/plans.rb

Overview

Scope plan: defines the dimensional execution context for a declaration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope: [], lifts: [], join_hint: nil, arg_shapes: {}) ⇒ Scope

Returns a new instance of Scope.



11
12
13
14
# File 'lib/kumi/core/analyzer/plans.rb', line 11

def initialize(scope: [], lifts: [], join_hint: nil, arg_shapes: {})
  super
  freeze
end

Instance Attribute Details

#arg_shapesObject

Returns the value of attribute arg_shapes

Returns:

  • (Object)

    the current value of arg_shapes



10
11
12
# File 'lib/kumi/core/analyzer/plans.rb', line 10

def arg_shapes
  @arg_shapes
end

#join_hintObject

Returns the value of attribute join_hint

Returns:

  • (Object)

    the current value of join_hint



10
11
12
# File 'lib/kumi/core/analyzer/plans.rb', line 10

def join_hint
  @join_hint
end

#liftsObject

Returns the value of attribute lifts

Returns:

  • (Object)

    the current value of lifts



10
11
12
# File 'lib/kumi/core/analyzer/plans.rb', line 10

def lifts
  @lifts
end

#scopeObject

Returns the value of attribute scope

Returns:

  • (Object)

    the current value of scope



10
11
12
# File 'lib/kumi/core/analyzer/plans.rb', line 10

def scope
  @scope
end

Instance Method Details

#depthObject



16
17
18
# File 'lib/kumi/core/analyzer/plans.rb', line 16

def depth
  scope.size
end

#scalar?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/kumi/core/analyzer/plans.rb', line 20

def scalar?
  scope.empty?
end