Awesome06 opened a new pull request, #1790: URL: https://github.com/apache/datafusion-python/pull/1790
# Which issue does this PR close? Closes #1727. # Rationale for this change Neither `datafusion-ffi-example` nor `datafusion-ffi-query-planner-example` had 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 the `examples/tpch` precedent: the script is the primary artifact, and a `subprocess` pytest 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 run `maturin develop` if 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 of `SET 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 via `subprocess.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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
