)]}'
{
  "commit": "60d5342831ea3c20c4a3f166743af833421c169c",
  "tree": "7ca13e02cd8eb71c7fd5789a57dccb84a6294c57",
  "parents": [
    "be10e162fa2735b9970ffbeb378c4cb0cc61d064"
  ],
  "author": {
    "name": "Andy Grove",
    "email": "agrove@apache.org",
    "time": "Wed May 13 15:52:05 2026 -0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed May 13 15:52:05 2026 -0600"
  },
  "message": "build: add examples module on a multi-module Maven build (#32)\n\n## Which issue does this PR close?\n\n- Closes #.\n\n## Rationale for this change\n\nThe repository lacks runnable end-to-end examples. Code snippets in the\ndocs are easy to drift out of sync with the API: there is no build step\nthat fails when a public method is renamed or removed.\n\nAdding an `examples/` Maven module that depends on the library lets the\nreactor compile every example on each build, so they cannot fall behind\nthe API. Doing this requires the repo to be a multi-module Maven\nproject; while we\u0027re there, the parent POM gets shared\n`dependencyManagement` and plugin versions so child modules stay terse.\n\n## What changes are included in this PR?\n\n**Multi-module restructure:**\n\n- Root `pom.xml` becomes the parent (`datafusion-java-parent`,\n`packaging\u003dpom`) with `dependencyManagement` for arrow, protobuf, junit,\nand the library itself.\n- `core/` is a new directory holding the existing library\n(`datafusion-java`). `src/` moves to `core/src/`.\n- `examples/` is a new module (`datafusion-java-examples`) depending on\nthe library via `${project.version}`. It wires `exec-maven-plugin` so\neach example launches with the right `java.library.path` and\n`--add-opens` flags.\n- `native/`, `proto/`, `Makefile`, and `mvnw` stay at the repo root\nunchanged.\n- Surefire\u0027s `java.library.path` now uses\n`${maven.multiModuleProjectDirectory}` so it resolves under the reactor\nregardless of which module Maven is invoked from.\n- `apache-rat-plugin` runs only at the root\n(`\u003cinherited\u003efalse\u003c/inherited\u003e`); the rat exclude list is unchanged.\n\n**Three runnable examples** under\n`examples/src/main/java/org/apache/datafusion/examples/`:\n\n- `SqlQueryExample` — `registerCsv` + a SQL `GROUP BY` aggregation.\n- `DataFrameExample` — `readCsv` → `filter` / `select` /\n`withColumnRenamed` / `distinct` → `writeParquet(singleFileOutput)` →\n`readParquet` round-trip.\n- `ProtoPlanExample` — build a `LogicalPlanNode` directly via the\ngenerated protobuf classes and execute it through\n`SessionContext.fromProto`.\n\nEach example creates its own throwaway data in a temp dir and cleans up,\nso no external fixtures (TPC-H, etc.) are required.\n\n**Docs:** `docs/source/contributor-guide/development.md` is updated with\nthe new repo layout and a \"Running an example\" section that documents\nthe `./mvnw install -DskipTests` + `exec:exec` flow.\n\n## Are these changes tested?\n\n- The full JVM test suite (`./mvnw test`) still passes against the\nrelocated `core/src/test/` sources — 61 tests run, 0 failures (12\nskipped, same skip pattern as `main` when TPC-H data is absent).\n- Each example was executed end-to-end via `./mvnw -pl\n:datafusion-java-examples exec:exec` and produces expected output:\n  - `SqlQueryExample` prints `HIGH 3 215 / MEDIUM 1 60 / LOW 1 25`.\n- `DataFrameExample` prints a 3-row deduped table and `Round-tripped row\ncount: 3`.\n  - `ProtoPlanExample` prints `42  7`.\n- `spotless:check` and the reactor build are clean across all three\nmodules.\n\n## Are there any user-facing changes?\n\n- The published library artifact\n(`org.apache.datafusion:datafusion-java`) is unchanged — same `groupId`,\n`artifactId`, `version`, and package contents.\n- The repo layout changes: source paths move from `src/main/java/...` to\n`core/src/main/java/...`. IDE projects pointing at the old location need\nto re-import.\n- New `datafusion-java-examples` artifact exists but is marked\n`maven.install.skip\u003dtrue` / `maven.deploy.skip\u003dtrue` and is not intended\nfor distribution.",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "27c4276ca1eb4bfc195504ccac069b63c1753667",
      "new_mode": 33188,
      "new_path": "core/pom.xml"
    },
    {
      "type": "rename",
      "old_id": "f44182073e7adec087ede58c894c983e94186ce3",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/CsvReadOptions.java",
      "new_id": "f44182073e7adec087ede58c894c983e94186ce3",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/CsvReadOptions.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "dceb497f4dee6602e0f37326521ef7262ade4dcc",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/DataFrame.java",
      "new_id": "dceb497f4dee6602e0f37326521ef7262ade4dcc",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/DataFrame.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "2c74341e55335f62f4a9f2d371f84c0121775b5a",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/NativeLibraryLoader.java",
      "new_id": "2c74341e55335f62f4a9f2d371f84c0121775b5a",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/NativeLibraryLoader.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "6b477383bf85bd3106d6069518f7b9f5d76cab21",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/ParquetReadOptions.java",
      "new_id": "6b477383bf85bd3106d6069518f7b9f5d76cab21",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/ParquetReadOptions.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "1aa0d8577e86512938dcf103e05b8fd72519ef1a",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/ParquetWriteOptions.java",
      "new_id": "1aa0d8577e86512938dcf103e05b8fd72519ef1a",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/ParquetWriteOptions.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "3cea058b76f97fc62d50c1352056724c4cb9d50e",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/SessionContext.java",
      "new_id": "3cea058b76f97fc62d50c1352056724c4cb9d50e",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/SessionContext.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "beabb5f48ad119076ea6151cc36ca41ab2848522",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/SessionContextBuilder.java",
      "new_id": "beabb5f48ad119076ea6151cc36ca41ab2848522",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/SessionContextBuilder.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "96d0d767204377799008027f55c7769ea616d854",
      "old_mode": 33188,
      "old_path": "src/main/java/org/apache/datafusion/proto/SchemaConverter.java",
      "new_id": "96d0d767204377799008027f55c7769ea616d854",
      "new_mode": 33188,
      "new_path": "core/src/main/java/org/apache/datafusion/proto/SchemaConverter.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "72f8e2038e73e16056e6e5a20f9d16f57eeb0eed",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/CsvReadOptionsTest.java",
      "new_id": "72f8e2038e73e16056e6e5a20f9d16f57eeb0eed",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/CsvReadOptionsTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "cb5c9efd10046a7473601ee4184694ffd047935e",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/DataFrameTransformationsTest.java",
      "new_id": "cb5c9efd10046a7473601ee4184694ffd047935e",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/DataFrameTransformationsTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "5be934e89c29fef6dcb48bfeeca4833deb9a20a9",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/DataFrameWriteParquetTest.java",
      "new_id": "5be934e89c29fef6dcb48bfeeca4833deb9a20a9",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/DataFrameWriteParquetTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "634a95360828bdf756eb26c85cd64800ffa99bf2",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/ParquetReadOptionsTest.java",
      "new_id": "634a95360828bdf756eb26c85cd64800ffa99bf2",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/ParquetReadOptionsTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "bf671ced39aab976bcc653c53d7e23baa62f361a",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/ParquetWriteOptionsTest.java",
      "new_id": "bf671ced39aab976bcc653c53d7e23baa62f361a",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/ParquetWriteOptionsTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "ed6cff2cfe3cb9ee78c649ab088b6781e6327c7d",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/SessionContextBuilderTest.java",
      "new_id": "ed6cff2cfe3cb9ee78c649ab088b6781e6327c7d",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/SessionContextBuilderTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "47862d4b266227d80a35910bb38282c000840b9e",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/SessionContextCsvTest.java",
      "new_id": "47862d4b266227d80a35910bb38282c000840b9e",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/SessionContextCsvTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "9b793272afb5530012699186fd394b47d49f3e25",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/SessionContextParquetOptionsTest.java",
      "new_id": "9b793272afb5530012699186fd394b47d49f3e25",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/SessionContextParquetOptionsTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "446554638749c40ff129a942439263b838453c23",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/SessionContextTest.java",
      "new_id": "446554638749c40ff129a942439263b838453c23",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/SessionContextTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "9d99763d987fd59615e07700e175833e4ab25ac8",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/proto/ProtoGenerationTest.java",
      "new_id": "9d99763d987fd59615e07700e175833e4ab25ac8",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/proto/ProtoGenerationTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "dd4cd23cdff6032abfb1961fb419c5ca012c3bbd",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/proto/SchemaConverterTest.java",
      "new_id": "dd4cd23cdff6032abfb1961fb419c5ca012c3bbd",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/proto/SchemaConverterTest.java",
      "score": 100
    },
    {
      "type": "rename",
      "old_id": "7bb65e6d0bc918da210c7af185f7824a21646ebd",
      "old_mode": 33188,
      "old_path": "src/test/java/org/apache/datafusion/proto/SessionContextProtoTest.java",
      "new_id": "7bb65e6d0bc918da210c7af185f7824a21646ebd",
      "new_mode": 33188,
      "new_path": "core/src/test/java/org/apache/datafusion/proto/SessionContextProtoTest.java",
      "score": 100
    },
    {
      "type": "modify",
      "old_id": "bda4046dcec3add323d3f0893e2afae090d389cc",
      "old_mode": 33261,
      "old_path": "docs/build.sh",
      "new_id": "8d773746b70772cf7a4ab9b0c6b8d9cd48ad35f4",
      "new_mode": 33261,
      "new_path": "docs/build.sh"
    },
    {
      "type": "modify",
      "old_id": "0b42a2e122bf362e1453c6e92aa26f1fc70753a8",
      "old_mode": 33188,
      "old_path": "docs/source/contributor-guide/development.md",
      "new_id": "8139ac7a999eba11bf42590cc6b74176780a08d3",
      "new_mode": 33188,
      "new_path": "docs/source/contributor-guide/development.md"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "885e0d43e8fa5d338c4f9f7b5448de7c8ceb16e2",
      "new_mode": 33188,
      "new_path": "examples/pom.xml"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "26abcd86c25582bdfae9d065f77124da63a949c7",
      "new_mode": 33188,
      "new_path": "examples/src/main/java/org/apache/datafusion/examples/DataFrameExample.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "09374a0783c8e31fb58dc64aac52b91acef81016",
      "new_mode": 33188,
      "new_path": "examples/src/main/java/org/apache/datafusion/examples/ProtoPlanExample.java"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ada531869e97f6432d99d28b5593ba122b97b716",
      "new_mode": 33188,
      "new_path": "examples/src/main/java/org/apache/datafusion/examples/SqlQueryExample.java"
    },
    {
      "type": "modify",
      "old_id": "d0f612d9aba29b86eb4eee6a23b3a5817393fde7",
      "old_mode": 33188,
      "old_path": "pom.xml",
      "new_id": "ab4bc93f730bb282b0b1476957081dbb195c830d",
      "new_mode": 33188,
      "new_path": "pom.xml"
    }
  ]
}
