feature - implement RFC 026 variant values (#52)#56
Merged
Conversation
…rfc026-variant-values
…rfc026-variant-values
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
This PR implements RFC 026 semi-structured variant logical values as the third remaining RFC013 slice. It adds typed
VariantExpr/VariantLogicalTypemetadata, variant parse/path/inspection helpers, registry policy metadata, Substrait extension anchors/options, public docs, and a DataFusion backend capability diagnostic for variant execution until that adapter has a native variant runtime.The PR is now based on current
mainafter RFC025 / PR #55 merged. The variant helper surface reflects the typedValueOrColumnAPI style from the preceding scalar work: parse helpers acceptStrValueOrColumn,variant_getaccepts literal or dynamic string paths throughStrValueOrColumn,variant_valueacceptsScalarValueOrColumn,typeof(...)returnsStringColumnExpr, and variant predicates such asis_array(...)returnBoolColumnExpr.Type of change
docs/rfcs/*)Area(s)
Select the primary areas touched (labels sync from checked lines when the triage workflow runs):
Key details
parse_variant_json,try_parse_variant_json,variant_get,typeof, and variant predicates such asis_object/is_null_valuewithout treating payloads as ordinary JSON strings.parse_variant_json(...)andtry_parse_variant_json(...)takeStrValueOrColumn;variant_get(...)takes a typed variant plus a literal or dynamicStrValueOrColumnpath;variant_value(...)takesScalarValueOrColumn;typeof(...)returnsStringColumnExpr; variant kind predicates returnBoolColumnExpr.VariantKind.Anyis a runtime-discovered kind and is compatible with concrete variant kinds when encodings match. DataFusion rejection is kept in the backend adapter as a capability diagnostic, not encoded as normal Substrait state.Testing / verification
make ci(ormake fmt-check,make build,make test)Manual verification notes:
make fmt INCAN=/Users/danny/Development/encero/incan/target/debug/incan/Users/danny/Development/encero/incan/target/debug/incan test tests/test_variant_functions.incn— 5 passed/Users/danny/Development/encero/incan/target/debug/incan test tests/test_function_registry.incn— 21 passed/Users/danny/Development/encero/incan/target/debug/incan test tests/test_substrait_plan.incn— 54 passed/Users/danny/Development/encero/incan/target/debug/incan test tests/test_session_projection.incn— 18 passedmake fmt-check INCAN=/Users/danny/Development/encero/incan/target/debug/incanmake test-style INCAN=/Users/danny/Development/encero/incan/target/debug/incanmake registry-metadata INCAN=/Users/danny/Development/encero/incan/target/debug/incan— 216 helpersmake build INCAN=/Users/danny/Development/encero/incan/target/debug/incanmake test INCAN=/Users/danny/Development/encero/incan/target/debug/incan— 238 passedmake smoke-consumer INCAN=/Users/danny/Development/encero/incan/target/debug/incan— sandboxed run failed on crates.io DNS; rerun with network escalation passedgit diff --checkDocs impact
If docs updated:
docs/language/reference/functions/variants.md,docs/language/reference/functions/index.md,docs/language/reference/functions/format.md,docs/rfcs/026_semi_structured_variant_values.md,docs/rfcs/README.md,docs/release_notes/v0_1.mdChecklist
Closes #52