Skip to content

Commit aaab4eb

Browse files
timsaucerclaude
andcommitted
docs: describe the composed-codec test in install order
The docstring for test_composed_codecs_with_query_planner said the extra codecs decline everything and encoding falls through to the provider codecs, which describes the reverse of what happens. The provider codecs are installed first and chain_encode walks in install order, so they claim their objects before the extra codecs are consulted; decoding dispatches by id and does not consult them at all. Say that, and say what the test asserts: the extra pair changes nothing, where replace semantics would have broken the round trip. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 810579e commit aaab4eb

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎examples/datafusion-ffi-query-planner-example/python/tests/_test_three_library_query_planner.py‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,15 @@ def test_query_planner_rejects_invalid_config(max_rows: str):
690690

691691
def test_composed_codecs_with_query_planner():
692692
"""A second pair of codecs installed on top of the provider codecs
693-
composes with them instead of replacing them. The extra codecs
694-
(default-backed exports from a fresh session) decline everything,
695-
so planner-driven encode/decode falls through to the provider
696-
codecs and the query still succeeds end to end."""
693+
composes with them instead of replacing them.
694+
695+
The provider codecs are installed first, so encoding consults them
696+
first and they claim this library's tables and plans before the
697+
extra codecs (default-backed exports from a fresh session) get a
698+
turn; decoding goes straight to whichever codec wrote the bytes.
699+
The extra pair therefore changes nothing observable here, which is
700+
the assertion: under replace semantics it would have discarded the
701+
provider codecs and the planner-driven round trip would fail."""
697702
ctx, logical_codec, physical_codec = configured_context(max_rows=2)
698703
other = SessionContext()
699704
ctx = ctx.with_logical_extension_codec(

0 commit comments

Comments
 (0)