Skip to content

Mark outer-join columns optional and add optimized matrix/table access handlers#286

Merged
cmontella merged 6 commits intov0.3-betafrom
codex/update-table-columns-to-optional-types-bim5gs
Apr 14, 2026
Merged

Mark outer-join columns optional and add optimized matrix/table access handlers#286
cmontella merged 6 commits intov0.3-betafrom
codex/update-table-columns-to-optional-types-bim5gs

Conversation

@cmontella
Copy link
Copy Markdown
Member

Motivation

  • Make table outer-join semantics preserve sparsity by marking columns that may be absent as optional types for downstream consumers.
  • Add direct/runtime/compile support for accessing scalar values out of MatrixValue and optional table columns to simplify and optimize access paths.

Description

  • Update TableJoinFxn::build_joined_table to mark output column ValueKind as Option(...) for columns coming from the non-preserved side of outer joins and add helper make_optional_kind.
  • Add a fast-path MatrixAccessScalarValueF implementation with solve, out, to_string and a compiler implementation and use it in the MatrixAccessScalar compiler when the LHS is a Value::MatrixValue and the index is a Value::Index.
  • Add a special-case in impl_access_column_table_fxn to return a swizzle when the requested table column is an Option value to enable direct optional-column access.
  • Add interpreter tests exercising full-outer-join behavior and optional column access, and update existing access code to incorporate the new behaviors.

Testing

  • Ran the interpreter test suite with the new tests under tests/interpreter.rs including interpret_table_full_outer_join_marks_sparse_columns_optional and the optional-column access cases, and they passed.
  • Ran the table join related tests such as interpret_table_full_outer_join_symbol/interpret_table_full_outer_join_word and the left/right/inner join tests, and they passed.
  • Ran relevant matrix access and reshape interpreter tests referenced in tests/interpreter.rs and they passed.

Codex Task

@cmontella cmontella merged commit 8e1c79a into v0.3-beta Apr 14, 2026
2 checks passed
@cmontella cmontella deleted the codex/update-table-columns-to-optional-types-bim5gs branch April 14, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant