feature - implement RFC 020 nested scalar functions#46
Merged
Conversation
This was referenced May 25, 2026
76cdb21 to
3a03dd1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements RFC 020 nested data functions as scalar, registry-backed InQL helpers for arrays, maps, and named structs. The branch keeps relation-cardinality-changing generator behavior reserved for RFC 021 while adding concrete Substrait mappings and DataFusion-backed execution coverage for nested scalar projections.
Type of change
docs/rfcs/*)Area(s)
Key details
array(...),cardinality(...),array_contains(...),arrays_overlap(...),element_at(...),array_flatten(...),map_from_arrays(...),map_extract(...),map_contains_key(...),map_keys(...),map_values(...),map_entries(...), andnamed_struct(...).src/functions/nested/helper family using declaration-side registry metadata, stable Substrait function anchors, concrete extension mappings where supported, and a documentedmap_contains_key(...)rewrite over existing scalar applications.registered_application(...)directly instead of routing through a one-line wrapper.make registry-metadatato follow@register_function(...)decorator metadata, derive canonical names from checked callable metadata by default, and honor explicitcanonical_nameoverrides. This prevents the guardrail from passing with zero helpers.element_at(...)adapter behavior instead of pretending a strict/try split exists yet.Merge Order
#44 and #45 are merged. This PR targets
maindirectly and can be reviewed as the RFC 020 follow-up.Testing / verification
Post-#45 retarget verification:
make fmt INCAN=/Users/danny/Development/encero/incan/target/debug/incanincan test tests/test_nested_data_functions.incn(3 passed)incan test tests/test_function_registry.incn(13 passed)incan test tests/test_substrait_plan.incn(21 passed)incan test tests/test_session_projection.incn(10 passed)make fmt-check INCAN=/Users/danny/Development/encero/incan/target/debug/incanmake test-stylemake registry-metadata INCAN=/Users/danny/Development/encero/incan/target/debug/incan(78 helpers)make build INCAN=/Users/danny/Development/encero/incan/target/debug/incanmake test INCAN=/Users/danny/Development/encero/incan/target/debug/incan(127 passed)make smoke-consumer INCAN=/Users/danny/Development/encero/incan/target/debug/incanmake pre-commit INCAN=/Users/danny/Development/encero/incan/target/debug/incan(127 passed)After source-quality cleanup:
incan test tests/test_nested_data_functions.incn(3 passed)incan test tests/test_function_registry.incn(13 passed)make pre-commit INCAN=/Users/danny/Development/encero/incan/target/debug/incan(127 passed)make smoke-consumer INCAN=/Users/danny/Development/encero/incan/target/debug/incanDocs impact
If docs updated:
docs/language/reference/functions/nested.md,docs/language/reference/functions/index.md,docs/release_notes/v0_1.md,docs/rfcs/020_nested_data_functions.mdChecklist
Closes #37