Implement RFC 025 typed sketch logical values#55
Merged
Conversation
19 tasks
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 025 typed sketch logical values with the first concrete HyperLogLog family. Sketch state is modeled as typed InQL metadata instead of strings or binary payloads, with registry policy metadata, Substrait function options, and a DataFusion adapter capability diagnostic.
This branch is updated onto current
origin/mainafter PR #58 and uses the same Incan rc47 CI baseline from the merged typed-scalar work. The RFC025 public helper surface now also follows the post-#58 typed value-or-column conventions:hll_sketch(...)accepts primitive values or scalar expressions,hll_deserialize(...)accepts string payload values or scalar expressions, andsketch_value(...)accepts scalar values or expressions before attaching sketch metadata.Type of change
docs/rfcs/*)Area(s)
Key details
SketchLogicalType,SketchExpr,hll_type(...),sketch_col(...),sketch_value(...),hll_sketch(...),hll_merge(...),hll_estimate(...),hll_serialize(...), andhll_deserialize(...); RFC 025 is marked implemented.ScalarValueOrColumnfor source sketch values andStrValueOrColumnfor serialized sketch payloads.IfThen/case_when, so plans declare only functions they actually use instead of pulling typed-sketch helpers into unrelated scalar plans.Testing / verification
make ci(ormake fmt-check,make build,make test)Manual verification notes:
Using
INCAN=/Users/danny/Development/encero/tmp/incan-750-primitive-type-tokens/target/debug/incan(0.3.0-rc47):make fmtmake fmt-checkmake test-stylemake registry-metadata(204 helpers)make buildmake test(230 passed)git diff --checkgit diff --cached --checkincan test tests/test_sketch_functions.incn(9 passed)incan test tests/test_function_registry.incn(20 passed)incan test tests/test_substrait_plan.incn(53 passed)incan test tests/test_session_aggregates.incn(8 passed)incan test tests/test_session_projection.incn(17 passed)Docs impact
If docs updated:
docs/rfcs/025_typed_sketch_logical_values.md,docs/language/reference/functions/sketches.md,docs/language/reference/functions/approximate.md,docs/language/reference/functions/index.md,docs/language/reference/builders/aggregates.md,docs/release_notes/v0_1.mdChecklist
Closes #51