Repository navigation
Conversation
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.
Which issue does this PR close?
Closes #1727.
Rationale for this change
Neither
datafusion-ffi-examplenordatafusion-ffi-query-planner-examplehad a standalone script that users could run; they only delivered pytest assertions. Meanwhile, the documentation explicitly promises "a complete example" and a "user example." This PR provides standalone runnable scripts for both crates, ensuring they behave like real examples. It follows theexamples/tpchprecedent: the script is the primary artifact, and asubprocesspytest driver keeps it honest.What changes are included in this PR?
examples/datafusion-ffi-example/run_demo.py: Adds a standalone script that walks the conformance matrix in numbered sections (table provider, functions, catalog provider, config extension, and codec round-trip). Includes a strict import guard that instructs users to runmaturin developif the extension is not built.examples/datafusion-ffi-query-planner-example/run_demo.py: Adds a standalone script that demonstrates and prints the logical plan, physical plan, the effect ofSET ffi_query_planner.max_rows, and planner nesting. Includes the same import guard.python/tests/_test_run_demo.py(in both crates): Adds driver tests that execute the demo scripts natively viasubprocess.run([sys.executable, script])and assert on their output anchor lines to guarantee they continue running standalone.README.md(in both crates): Adds a concise three-line header explaining what the directory is, linking to the protocol guide, and showing exactly how to run the demo.Are there any user-facing changes?
Yes, this adds fully standalone, runnable Python examples that users can execute directly to learn the FFI bindings without dealing with the internal test suite.