Add Arrow-based argument specification serialization#11
Merged
Conversation
Implement serialization/deserialization of function argument specifications using Apache Arrow schemas. This enables functions to describe their argument signatures (types, positions, special markers) in a format that can be transmitted over IPC and understood by DuckDB for function registration. Key features: - Single Arrow schema format with positional args first, named args after - Metadata markers for special types (TableInput, AnyArrow, varargs) - Exact Arrow type preservation through schema serialization - Extract specs from function classes with Arg descriptors New public API: - ArgumentSpec: Dataclass for argument specifications - argument_specs_to_schema(): Convert specs to Arrow schema - schema_to_argument_specs(): Convert schema back to specs - extract_argument_specs(): Extract from function class 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
Changes
vgi/argument_spec.py- Core module withArgumentSpecdataclass and serialization functionstests/test_argument_spec.py- Comprehensive tests (43 passing test cases)docs/argument-serialization.md- LLM-friendly documentationvgi/__init__.py- Export new public APINew Public API
Design
Uses a single Arrow schema where:
{b"vgi_arg": b"named"}metadatavgi_type=table,vgi_type=any,vgi_varargs=trueTest plan
🤖 Generated with Claude Code