Conversation
…t types _pybind_value_signature keyed list params on the first element only, while C++ prepares the max logical type over ALL elements. Calls whose first row was narrow reused a stale narrower plan, silently dropping rows or truncating values (300 bound as 44, Refs #57). Aggregate element signatures across the whole list (max int width, merged struct fields), mirroring C++ tryGetMaxLogicalType; homogeneous int lists still key as INT64 like pyHomogeneousListType.
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.
Fixes #57.
Problem:
Connection.execute(query, params)silently dropped rows / truncated values when a list-of-struct param needed a wider int type than the first call's. The Python-side cache key (_pybind_value_signature) inspected only the first list element, while C++ prepares the max logical type over ALL elements — so a narrow first call's plan was reused for wider later calls (300 bound as 44).Fix: aggregate element signatures across the whole list (max int width, merged struct fields, merged nested lists/maps), mirroring C++
tryGetMaxLogicalType. Homogeneous int lists still key as INT64 likepyHomogeneousListType. Scalar int widths outside lists are still segregated (unchanged).Tests: new regression test
test_pybind_implicit_prepare_segregates_struct_list_by_int_width(fails on old code, passes on new); fulltest_pybind_implicit_prepare_cache+ threading suites pass (11 passed). End-to-end repro from the issue verified fixed against a built overlay; one pre-existing quirk noted:RETURN r.dalongside MATCH projects the first row's value even with fresh query text (C++ binding behavior, out of scope).Draft PR — stopping before ready-for-review per loop instructions.