Restructure the repository into a multi-module Maven build so a new
examples/ module can depend on the library and stay in sync with the
API automatically.
* pom.xml becomes the parent (datafusion-java-parent, packaging=pom)
with dependencyManagement for shared versions.
* core/ holds the existing library; src/ moves to core/src/.
* examples/ is a new module (datafusion-java-examples) depending on
datafusion-java via ${project.version}. It wires exec-maven-plugin
so each example can be launched with the right java.library.path
and --add-opens flags.
* native/, proto/, Makefile, and mvnw stay at the repo root.
* Surefire's java.library.path uses ${maven.multiModuleProjectDirectory}
so the path resolves correctly under the reactor.
Three runnable examples:
* SqlQueryExample: registerCsv + SQL aggregation.
* DataFrameExample: readCsv -> filter / select / rename / distinct ->
writeParquet -> readParquet round-trip.
* ProtoPlanExample: build a LogicalPlanNode via the generated protobuf
classes and execute it through SessionContext.fromProto.
Which issue does this PR close?
Rationale for this change
The repository lacks runnable end-to-end examples. Code snippets in the docs are easy to drift out of sync with the API: there is no build step that fails when a public method is renamed or removed.
Adding an examples/ Maven module that depends on the library lets the reactor compile every example on each build, so they cannot fall behind the API. Doing this requires the repo to be a multi-module Maven project; while we're there, the parent POM gets shared dependencyManagement and plugin versions so child modules stay terse.
What changes are included in this PR?
Multi-module restructure:
Three runnable examples under examples/src/main/java/org/apache/datafusion/examples/:
Each example creates its own throwaway data in a temp dir and cleans up, so no external fixtures (TPC-H, etc.) are required.
Docs: docs/source/contributor-guide/development.md is updated with the new repo layout and a "Running an example" section that documents the ./mvnw install -DskipTests + exec:exec flow.
Are these changes tested?
Are there any user-facing changes?