Skip to main content
Version: Next

'subop' Dialect

A dialect around sub-operators that manipulate a tuplestream, but state is managed explicitly

Operations

subop.combine_tuple (::lingodb::compiler::dialect::subop::CombineTupleOp)

Combines stream with tuple

Syntax:

operation ::= `subop.combine_tuple` $stream `,` $right attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Operands:

OperandDescription
streamtuple stream type
righttuple type

Results:

ResultDescription
restuple stream type

subop.create (::lingodb::compiler::dialect::subop::GenericCreateOp)

Create new state

Syntax:

operation ::= `subop.create` type($res) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface), StateCreator

Effects: MemoryEffects::Effect{}

Results:

ResultDescription
resany type

subop.create_array (::lingodb::compiler::dialect::subop::CreateArrayOp)

Create new state

Syntax:

operation ::= `subop.create_array` $numElements `:` type($numElements) `->` type($res) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Operands:

OperandDescription
numElementssimple state with multiple members

Results:

ResultDescription
resfixed sized array

subop.create_continuous_view (::lingodb::compiler::dialect::subop::CreateContinuousView)

Syntax:

operation ::= `subop.create_continuous_view` $source `:` type($source)  `->` type($result) attr-dict

Interfaces: SubOperator

Operands:

OperandDescription
sourceany type

Results:

ResultDescription
resultcontinuous view type

subop.create_from (::lingodb::compiler::dialect::subop::CreateFrom)

Create new state from existing state

Syntax:

operation ::= `subop.create_from` $columns $state `:` type($state) `->` type($result) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
columns::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
stateState instance

Results:

ResultDescription
resultState instance

subop.create_hash_indexed_view (::lingodb::compiler::dialect::subop::CreateHashIndexedView)

Syntax:

operation ::= `subop.create_hash_indexed_view` $source `:` type($source) `hash` `(` $hash_member `)` `link` `(` $link_member `)` `->` type($result) attr-dict

Interfaces: SubOperator

Attributes:

AttributeMLIR TypeDescription
hash_member::mlir::StringAttrstring attribute
link_member::mlir::StringAttrstring attribute

Operands:

OperandDescription
sourcegrowing buffer type

Results:

ResultDescription
resultsorted view type

subop.create_heap (::lingodb::compiler::dialect::subop::CreateHeapOp)

Create new heap

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
sortBy::mlir::ArrayAttrarray attribute

Results:

ResultDescription
resheap type

subop.create_segment_tree_view (::lingodb::compiler::dialect::subop::CreateSegmentTreeView)

Interfaces: SubOperator

Attributes:

AttributeMLIR TypeDescription
relevant_members::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
sourcecontinuous view type

Results:

ResultDescription
resultsegment tree view type

subop.create_simple_state (::lingodb::compiler::dialect::subop::CreateSimpleStateOp)

Create new state

Syntax:

operation ::= `subop.create_simple_state` type($res) (`initial` `:` $initFn^)? attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Results:

ResultDescription
ressimple state with multiple members

subop.create_sorted_view (::lingodb::compiler::dialect::subop::CreateSortedViewOp)

Sort vector

Sort a records in a vector. The region yields the order of two arguments as in C++ std::sort.

Traits: IsolatedFromAbove

Interfaces: SubOperator

Attributes:

AttributeMLIR TypeDescription
sortBy::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
toSortgrowing buffer type

Results:

ResultDescription
resultsorted view type

subop.create_thread_local (::lingodb::compiler::dialect::subop::CreateThreadLocalOp)

Create new thread local

Syntax:

operation ::= `subop.create_thread_local` type($res) (`initial` `:` $initFn^)? attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Results:

ResultDescription
reswrapper around any State that makes it thread local

subop.entries_between (::lingodb::compiler::dialect::subop::EntriesBetweenOp)

Syntax:

operation ::= `subop.entries_between` $stream custom<CustRef>($left_ref) custom<CustRef>($right_ref)  custom<CustDef>($between) attr-dict

Interfaces: InferTypeOpInterface, SubOperator

Attributes:

AttributeMLIR TypeDescription
left_ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
right_ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
between::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

subop.execution_group (::lingodb::compiler::dialect::subop::ExecutionGroupOp)

Execution group

Syntax:

operation ::= `subop.execution_group` ($inputs^ `:` type($inputs))? custom<CustRegion>($sub_ops)  (`->` type($results)^ )? attr-dict-with-keyword

Traits: IsolatedFromAbove

Operands:

OperandDescription
inputsvariadic of any type

Results:

ResultDescription
resultsvariadic of any type

subop.execution_group_return (::lingodb::compiler::dialect::subop::ExecutionGroupReturnOp)

Execution group return

Syntax:

operation ::= `subop.execution_group_return` ($inputs^ `:` type($inputs))? attr-dict-with-keyword

Traits: Terminator

Operands:

OperandDescription
inputsvariadic of any type

subop.execution_step (::lingodb::compiler::dialect::subop::ExecutionStepOp)

Execution step

Syntax:

operation ::= `subop.execution_step` ($inputs^ `:` type($inputs))? $is_thread_local custom<CustRegion>($sub_ops)  (`->` type($results)^ )? attr-dict-with-keyword

Traits: IsolatedFromAbove

Interfaces: StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
is_thread_local::mlir::ArrayAttr1-bit boolean array attribute

Operands:

OperandDescription
inputsvariadic of any type

Results:

ResultDescription
resultsvariadic of any type

subop.execution_step_return (::lingodb::compiler::dialect::subop::ExecutionStepReturnOp)

Execution step return

Syntax:

operation ::= `subop.execution_step_return` ($inputs^ `:` type($inputs))? attr-dict-with-keyword

Traits: Terminator

Operands:

OperandDescription
inputsvariadic of any type

subop.filter (::lingodb::compiler::dialect::subop::FilterOp)

Filter stream of tuples according to one or more boolean columns (all 1 => keep tuple, otherwise discard)

Syntax:

operation ::= `subop.filter` $stream $filterSemantic custom<CustRefArr>($conditions)  attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ColumnFoldable, ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
filterSemantic::lingodb::compiler::dialect::subop::FilterSemanticAttr
allowed 64-bit signless integer cases: 0, 1
  • all_true: Enum case: all_true (all_true)
conditions::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

subop.gather (::lingodb::compiler::dialect::subop::GatherOp)

Scatter

Syntax:

operation ::= `subop.gather` $stream custom<CustRef>($ref) custom<StateColumnMapping>($mapping)  attr-dict

Interfaces: InferTypeOpInterface, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
mapping::mlir::DictionaryAttrdictionary of named attribute values

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

subop.generate (::lingodb::compiler::dialect::subop::GenerateOp)

Generate tuples using imperative code

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
generated_columns::mlir::ArrayAttrarray attribute

Results:

ResultDescription
restuple stream type
streamsvariadic of tuple stream type

subop.generate_emit (::lingodb::compiler::dialect::subop::GenerateEmitOp)

Set result

Syntax:

operation ::= `subop.generate_emit` ($values^ `:` type($values))?  attr-dict

Operands:

OperandDescription
valuesvariadic of any type

subop.get_begin_ref (::lingodb::compiler::dialect::subop::GetBeginReferenceOp)

Syntax:

operation ::= `subop.get_begin_ref` $stream $state `:` type($state) custom<CustDef>($ref)   attr-dict

Interfaces: InferTypeOpInterface, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type
stateany type

Results:

ResultDescription
restuple stream type

subop.get_end_ref (::lingodb::compiler::dialect::subop::GetEndReferenceOp)

Syntax:

operation ::= `subop.get_end_ref` $stream $state `:` type($state) custom<CustDef>($ref)   attr-dict

Interfaces: InferTypeOpInterface, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type
stateany type

Results:

ResultDescription
restuple stream type

subop.get_external (::lingodb::compiler::dialect::subop::GetExternalOp)

Get externally defined object

Syntax:

operation ::= `subop.get_external` $descr `:` type($res) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
descr::mlir::StringAttrstring attribute

Results:

ResultDescription
resany type

subop.in_flight (::lingodb::compiler::dialect::subop::InFlightOp)

Operation symbolizes 'in flight' tuple stream -> values => columns

Syntax:

operation ::= `subop.in_flight` $values `:` type($values) `=` `>` custom<CustDefArr>($columns) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
columns::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
valuesvariadic of any type

Results:

ResultDescription
restuple stream type

subop.in_flight_tuple (::lingodb::compiler::dialect::subop::InFlightTupleOp)

Operation symbolizes 'in flight' tuple -> values => columns

Syntax:

operation ::= `subop.in_flight_tuple` $values `:` type($values) `=` `>` custom<CustDefArr>($columns) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
columns::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
valuesvariadic of any type

Results:

ResultDescription
restuple type

subop.insert (::lingodb::compiler::dialect::subop::InsertOp)

Performs a lookup in a state and annotates the result as attribute

Interfaces: ColumnFoldable, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
mapping::mlir::DictionaryAttrdictionary of named attribute values

Operands:

OperandDescription
streamtuple stream type
stateLookupAbleState instance

subop.lock (::lingodb::compiler::dialect::subop::LockOp)

Merge thread_local

Syntax:

operation ::= `subop.lock` $stream `lock` `(` $ref `)` $nested attr-dict

Interfaces: InferTypeOpInterface, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnRefAttr

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

subop.lookup (::lingodb::compiler::dialect::subop::LookupOp)

Performs a lookup in a state and annotates the result as attribute

Interfaces: InferTypeOpInterface, ReferenceProducer, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
keys::mlir::ArrayAttrarray attribute
ref::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type
stateany type

Results:

ResultDescription
restuple stream type

subop.lookup_or_insert (::lingodb::compiler::dialect::subop::LookupOrInsertOp)

Performs a lookup in a state and annotates the result as attribute

Interfaces: InferTypeOpInterface, ReferenceProducer, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
keys::mlir::ArrayAttrarray attribute
ref::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type
stateany type

Results:

ResultDescription
restuple stream type

subop.loop (::lingodb::compiler::dialect::subop::LoopOp)

Loop

Interfaces: ContainsNestedSubOps, SubOperator

Operands:

OperandDescription
argsvariadic of any type

Results:

ResultDescription
resvariadic of any type

subop.loop_continue (::lingodb::compiler::dialect::subop::LoopContinueOp)

Syntax:

operation ::= `subop.loop_continue` `(` $cond_state `:` type($cond_state) `[` $cond_member `]` `)` ($values^ `:` type($values))?  attr-dict

Traits: Terminator

Attributes:

AttributeMLIR TypeDescription
cond_member::mlir::StringAttrstring attribute

Operands:

OperandDescription
cond_stateany type
valuesvariadic of any type

subop.map (::lingodb::compiler::dialect::subop::MapOp)

Map operation

Syntax:

operation ::= `subop.map` $stream `computes` `:` custom<CustDefArr>($computed_cols) `input` `:` custom<CustRefArr>($input_cols) custom<CustRegion>($fn) attr-dict-with-keyword

Traits: AlwaysSpeculatableImplTrait

Interfaces: ColumnFoldable, ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
computed_cols::mlir::ArrayAttrarray attribute
input_cols::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
resulttuple stream type

subop.materialize (::lingodb::compiler::dialect::subop::MaterializeOp)

Materialize state (sequentially)

Syntax:

operation ::= `subop.materialize` $stream custom<ColumnStateMapping>($mapping) `,` $state `:` type($state)  attr-dict

Interfaces: ColumnFoldable, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
mapping::mlir::DictionaryAttrdictionary of named attribute values

Operands:

OperandDescription
streamtuple stream type
stateany type

subop.merge (::lingodb::compiler::dialect::subop::MergeOp)

Merge thread_local

Syntax:

operation ::= `subop.merge` $threadLocal `:` type($threadLocal) `->` type($res) (`combine` `:` $combineFn^)? (`eq` `:` $eqFn^)? attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Operands:

OperandDescription
threadLocalwrapper around any State that makes it thread local

Results:

ResultDescription
resany type

subop.nested_execution_group (::lingodb::compiler::dialect::subop::NestedExecutionGroupOp)

Nested execution group

Syntax:

operation ::= `subop.nested_execution_group` ($inputs^ `:` type($inputs))? custom<CustRegion>($sub_ops)  (`->` type($results)^ )? attr-dict-with-keyword

Traits: IsolatedFromAbove

Operands:

OperandDescription
inputsvariadic of any type

Results:

ResultDescription
resultsvariadic of any type

subop.nested_execution_group_return (::lingodb::compiler::dialect::subop::NestedExecutionGroupReturnOp)

Nested execution group return

Syntax:

operation ::= `subop.nested_execution_group_return` ($inputs^ `:` type($inputs))? attr-dict-with-keyword

Traits: Terminator

Operands:

OperandDescription
inputsvariadic of any type

subop.nested_map (::lingodb::compiler::dialect::subop::NestedMapOp)

Compute nested map

Example:

%stream2 = subop.nested_map %stream [@x::@a, @y::@b] (%a, %b){
%stream3 = subop.scan %some_table ...
%stream4 = subop.filter ... {
... %a
... %b
tuples.return %pred
}
tuples.return %stream5
}

Semantics of the produced stream: each tuple is combined with the tuples returned by the nested_map If no tuple is returned -> the original tuple is ommited (-> "inner-join semantic")

Interfaces: ContainsNestedSubOps, InferTypeOpInterface, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
parameters::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

subop.offset_ref_by (::lingodb::compiler::dialect::subop::OffsetReferenceBy)

Syntax:

operation ::= `subop.offset_ref_by` $stream custom<CustRef>($ref) custom<CustRef>($idx) custom<CustDef>($newRef) attr-dict

Interfaces: InferTypeOpInterface, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
idx::lingodb::compiler::dialect::tuples::ColumnRefAttr
newRef::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

subop.reduce (::lingodb::compiler::dialect::subop::ReduceOp)

Reduce

  %5 = subop.reduce %2 %0 [@studenten::@semester] with ["ctr","sum"] ([%v1], [%curr_ctr, %curr_sum]){
%c1 = db.constant %c1
%updated_ctr = db.add %curr_ctr, %c1
tuples.return %updated_ctr, %updated_sum
} eq: (){} combine: (){} initial: (){}

Interfaces: StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
columns::mlir::ArrayAttrarray attribute
members::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
streamtuple stream type

subop.rename (::lingodb::compiler::dialect::subop::RenamingOp)

Rename columns

Syntax:

operation ::= `subop.rename` $stream `renamed` `:` custom<CustDefArr>($columns) attr-dict-with-keyword

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
columns::mlir::ArrayAttrarray attribute

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
resulttuple stream type

subop.scan (::lingodb::compiler::dialect::subop::ScanOp)

Scan state (sequentially)

Syntax:

operation ::= `subop.scan` $state `:` type($state) custom<StateColumnMapping>($mapping) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), StateUsingSubOperator, SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
mapping::mlir::DictionaryAttrdictionary of named attribute values

Operands:

OperandDescription
stateany type

Results:

ResultDescription
restuple stream type

subop.scan_list (::lingodb::compiler::dialect::subop::ScanListOp)

Scan state (sequentially)

Syntax:

operation ::= `subop.scan_list` $list `:` type($list) custom<CustDef>($elem) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), ReferenceProducer, StateUsingSubOperator, SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
elem::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
listany type

Results:

ResultDescription
restuple stream type

subop.scan_refs (::lingodb::compiler::dialect::subop::ScanRefsOp)

Scan state (sequentially) and emits references to its elements

Syntax:

operation ::= `subop.scan_refs` $state `:` type($state) custom<CustDef>($ref) attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), ReferenceProducer, StateUsingSubOperator, SubOperator

Effects: MemoryEffects::Effect{}

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
stateany type

Results:

ResultDescription
restuple stream type

subop.scatter (::lingodb::compiler::dialect::subop::ScatterOp)

Scatter

Syntax:

operation ::= `subop.scatter` $stream custom<CustRef>($ref) custom<ColumnStateMapping>($mapping)  attr-dict

Interfaces: StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
mapping::mlir::DictionaryAttrdictionary of named attribute values

Operands:

OperandDescription
streamtuple stream type

subop.set_result (::lingodb::compiler::dialect::subop::SetResultOp)

Set result

Syntax:

operation ::= `subop.set_result` $result_id $state `:` type($state)  attr-dict

Attributes:

AttributeMLIR TypeDescription
result_id::mlir::IntegerAttr32-bit signless integer attribute

Operands:

OperandDescription
stateany type

subop.set_tracked_count (::lingodb::compiler::dialect::subop::SetTrackedCountOp)

Set tracked count

Interfaces: StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
resultId::mlir::IntegerAttr32-bit signless integer attribute
readState::mlir::StringAttrstring attribute

Operands:

OperandDescription
tupleCountsimple state with multiple members

subop.simple_state_get_scalar (::lingodb::compiler::dialect::subop::SimpleStateGetScalar)

Get scalar value of simple state

Syntax:

operation ::= `subop.simple_state_get_scalar` $member $state `:` type($state) `->` type($res) attr-dict

Interfaces: SubOperator

Attributes:

AttributeMLIR TypeDescription
member::mlir::StringAttrstring attribute

Operands:

OperandDescription
statesimple state with multiple members

Results:

ResultDescription
resany type

subop.union (::lingodb::compiler::dialect::subop::UnionOp)

Union of two stream

Syntax:

operation ::= `subop.union` $streams attr-dict

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface), SubOperator

Effects: MemoryEffects::Effect{}

Operands:

OperandDescription
streamsvariadic of tuple stream type

Results:

ResultDescription
restuple stream type

subop.unwrap_optional_ref (::lingodb::compiler::dialect::subop::UnwrapOptionalRefOp)

Syntax:

operation ::= `subop.unwrap_optional_ref` $stream custom<CustRef>($optional_ref) custom<CustDef>($ref) attr-dict

Interfaces: InferTypeOpInterface, StateUsingSubOperator, SubOperator

Attributes:

AttributeMLIR TypeDescription
optional_ref::lingodb::compiler::dialect::tuples::ColumnRefAttr
ref::lingodb::compiler::dialect::tuples::ColumnDefAttr

Operands:

OperandDescription
streamtuple stream type

Results:

ResultDescription
restuple stream type

Attributes

StateMembersAttr

Syntax:

#subop.state_members<
mlir::ArrayAttr, # names
mlir::ArrayAttr # types
>

Parameters:

ParameterC++ typeDescription
namesmlir::ArrayAttr
typesmlir::ArrayAttr

Types

ArrayType

fixed sized array

Syntax:

!subop.array<
StateMembersAttr # members
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr

BufferType

growing buffer type

Syntax:

!subop.buffer<
StateMembersAttr # members
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr

ContinuousEntryRefType

reference to entry of some state

Syntax:

!subop.continous_entry_ref<
State # state
>

Parameters:

ParameterC++ typeDescription
stateState

ContinuousViewType

continuous view type

Syntax:

!subop.continuous_view<
State # based_on
>

Parameters:

ParameterC++ typeDescription
based_onState

EntryType

entry of some state

Syntax:

!subop.entry<
mlir::Type # t
>

Parameters:

ParameterC++ typeDescription
tmlir::Type

ListType

list type

Syntax:

!subop.list<
StateEntryReference # t
>

Parameters:

ParameterC++ typeDescription
tStateEntryReference

ExternalHashIndexType

external hash index: key -> [values]

Syntax:

!subop.externalhashindex<
StateMembersAttr, # keyMembers
StateMembersAttr # valueMembers
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr

ExternalHashIndexEntryRefType

reference to entry of some state

Syntax:

!subop.external_hash_index_entry_ref<
ExternalHashIndexType # external_hash_index
>

Parameters:

ParameterC++ typeDescription
external_hash_indexExternalHashIndexType

EntryRefType

reference to entry of some state

Syntax:

!subop.entry_ref<
State # state
>

Parameters:

ParameterC++ typeDescription
stateState

LookupEntryRefType

reference to entry of some state

Syntax:

!subop.lookup_entry_ref<
LookupAbleState # state
>

Parameters:

ParameterC++ typeDescription
stateLookupAbleState

HashIndexedViewType

sorted view type

Syntax:

!subop.hash_indexed_view<
StateMembersAttr, # keyMembers
StateMembersAttr, # valueMembers
bool # compareHashForLookup
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr
compareHashForLookupbool

HashMapEntryRefType

reference to entry of some state

Syntax:

!subop.hash_map_entry_ref<
HashMapType # hash_map
>

Parameters:

ParameterC++ typeDescription
hash_mapHashMapType

HashMultiMapEntryRefType

reference to entry of some state

Syntax:

!subop.hash_multimap_entry_ref<
HashMultiMapType # hash_multimap
>

Parameters:

ParameterC++ typeDescription
hash_multimapHashMultiMapType

HashMultiMapType

simple state with multiple members

Syntax:

!subop.hashmultimap<
StateMembersAttr, # keyMembers
StateMembersAttr # valueMembers
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr

HashMapType

simple state with multiple members

Syntax:

!subop.hashmap<
StateMembersAttr, # keyMembers
StateMembersAttr, # valueMembers
bool # withLock
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr
withLockbool

HeapType

heap type

Syntax:

!subop.heap<
StateMembersAttr, # members
uint32_t # max_elements
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr
max_elementsuint32_t

LocalTableType

local table

Syntax:

!subop.local_table<
StateMembersAttr, # members
mlir::ArrayAttr # columnNames
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr
columnNamesmlir::ArrayAttr

MapType

simple state with multiple members

Syntax:

!subop.map<
StateMembersAttr, # keyMembers
StateMembersAttr, # valueMembers
bool # withLock
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr
withLockbool

MapEntryRefType

reference to entry of some state

Syntax:

!subop.map_entry_ref<
MapType # map
>

Parameters:

ParameterC++ typeDescription
mapMapType

MultiMapType

multi map: key -> [values]

Syntax:

!subop.multimap<
StateMembersAttr, # keyMembers
StateMembersAttr # valueMembers
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr

MultiMapEntryRefType

reference to entry of some state

Syntax:

!subop.multi_map_entry_ref<
MultiMapType # multi_map
>

Parameters:

ParameterC++ typeDescription
multi_mapMultiMapType

OptionalType

optional type

Syntax:

!subop.optional<
StateEntryReference # t
>

Parameters:

ParameterC++ typeDescription
tStateEntryReference

PreAggrHTEntryRefType

reference to entry of some state

Syntax:

!subop.optimistic_ht_entry_ref<
PreAggrHtType # hash_map
>

Parameters:

ParameterC++ typeDescription
hash_mapPreAggrHtType

PreAggrHtType

Syntax:

!subop.optimistic_ht<
StateMembersAttr, # keyMembers
StateMembersAttr, # valueMembers
bool # withLock
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr
withLockbool

PreAggrHtFragmentType

Syntax:

!subop.optimistic_ht_fragment<
StateMembersAttr, # keyMembers
StateMembersAttr, # valueMembers
bool # withLock
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr
withLockbool

ResultTableType

reference to table

Syntax:

!subop.result_table<
StateMembersAttr # members
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr

SegmentTreeViewType

segment tree view type

Syntax:

!subop.segment_tree_view<
StateMembersAttr, # keyMembers
StateMembersAttr # valueMembers
>

Parameters:

ParameterC++ typeDescription
keyMembersStateMembersAttr
valueMembersStateMembersAttr

SimpleStateType

simple state with multiple members

Syntax:

!subop.simple_state<
StateMembersAttr # members
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr

SortedViewType

sorted view type

Syntax:

!subop.sorted_view<
State # based_on
>

Parameters:

ParameterC++ typeDescription
based_onState

TableType

external table

Syntax:

!subop.table<
StateMembersAttr # members
>

Parameters:

ParameterC++ typeDescription
membersStateMembersAttr

TableEntryRefType

reference to entry of table

Syntax:

!subop.table_entry_ref<
StateMembersAttr # tableColumns
>

Parameters:

ParameterC++ typeDescription
tableColumnsStateMembersAttr

ThreadLocalType

wrapper around any State that makes it thread local

Syntax:

!subop.thread_local<
State # wrapped
>

Parameters:

ParameterC++ typeDescription
wrappedState

Enums

FilterSemantic

allowed 64-bit signless integer cases: 0, 1

Cases:

SymbolValueString
all_true0all_true
none_true1none_true