Repository navigation
Upgrade to MAT 1.17.0, Java 21, Eclipse 4.40 and Calcite 1.42.0 (1/4) - #121
Open
miguelnieto wants to merge 1 commit into
Open
miguelnieto wants to merge 1 commit into
miguelnieto wants to merge 1 commit into
Conversation
This was referenced Oct 17, 2026
miguelnieto
force-pushed
the
01_mat-1.17-java21-calcite-1.42
branch
2 times, most recently
from
October 17, 2026 01:21
e0ab6e5 to
9c14603
Compare
miguelnieto
force-pushed
the
01_mat-1.17-java21-calcite-1.42
branch
from
November 7, 2026 17:12
9c14603 to
d460a89
Compare
BREAKING: requires MAT 1.17.0+ and Java 21. org.eclipse.mat.api 1.17.0 declares Bundle-RequiredExecutionEnvironment: JavaSE-21, so the execution environment cannot go lower. Users on older MAT must stay on 1.6.x. Platform - Target platform moved from Eclipse 2022-12 to Eclipse 4.40, matching the Eclipse release MAT 1.17.0 builds against. - MAT bundles come from the MAT 1.17.0 update site rather than an Eclipse simultaneous release, so the MAT API version matches the MAT users run. Only the units this plugin needs are listed; the full org.eclipse.mat.feature.feature.group would drag in mat.chart and therefore BIRT and Rhino, which are unused. - Java 21: BREE, executionEnvironment, compiler source/target, CI matrix, README requirements. Calcite 1.36 -> 1.42.0 - Aligned Calcite/Guava versions between MatCalcitePlugin/pom.xml and MatCalciteTargetPlatform.target (Guava 33.7.2-jre in both, after Renovate updated the pom only). They had drifted apart (1.41.0 vs 1.36.0) because Renovate only updates poms, not Tycho target definitions. - Avatica 1.29.0 instead of the 1.28.0 Calcite 1.42.0 asks for: Avatica before 1.29.0 has CVE-2026-70410 (unsafe reflection in plugin instantiation, CVSS 8.8). Declared before calcite-core so Maven compiles against the Jackson 2.22.2 it brings, which the target ships. - Added httpclient5/httpcore5 (new Avatica 1.28 dependencies) and org.jooq:joou-java-6 to the target platform and to Import-Package. Without them: NoClassDefFoundError for org/apache/hc/core5/util/Timeout and org/joou/UInteger. - Excluded jakarta.transaction:jakarta.transaction-api from commons-dbcp2: it has an unsatisfiable Import-Package (javax.enterprise.context) and blocked geronimo-jta_1.1_spec from supplying javax.transaction. ORDER BY and joins on heap objects - Calcite 1.37+ sorts Map-typed values with Functions.compareMaps(), which calls entrySet(); HeapReference is a Map only for this['field'] and threw from entrySet(), so every ORDER BY over a heap object failed. entrySet() now returns one entry that orders like compareTo. - Calcite sorts merge-join inputs through entrySet() but merges them with compareTo, so both must give the same order, or matches are dropped (the class/class loader join counted 469 instead of 985). Both now order by address, which is also constant time: ordering by label rebuilt the label on every comparison (ORDER BY this on 4M objects: about 2 min vs 10 s). ORDER BY toString(this) gives label order. SQL functions - getHexAddress(x): the object address as 0x..., as MAT shows it. - getDominator(x) returned an error for objects dominated by the virtual root; it now returns null. Tests - testStackTraces tolerates MAT's own stack frame formatting, which changed in MAT commit 0c72944e ("Bug 581644"): "(Native Method)" became "(Object.java(Native Method))". - New: ORDER BY this in both directions, a merge join over a strict subset, the class/class loader join phrased three ways (985 each). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miguelnieto
added a commit
to miguelnieto/mat-calcite-plugin
that referenced
this pull request
Nov 7, 2026
The update site bundled versions with published CVEs, which security scanners flag: - httpclient5 5.5 -> 5.6.5: CVE-2026-71290 (CVSS 9.1, async client skips the TLS hostname check), CVE-2026-64607 - jackson-core 2.22.2 -> 2.22.4: CVE-2026-89407, CVE-2026-89425 (7.5) - commons-lang3 3.1 -> 3.21.0 (Calcite gets 3.1 through uzaygezen-core 0.2): CVE-2025-48924 - json-smart, accessors-smart 2.6.0 -> 2.6.1: CVE-2026-113602 Guava's CVE-2026-102554 (NVD 8.2) is already fixed by 33.7.2-jre, which main has since Renovate's update and vlsi#121 aligns in the target. httpcore5 in the target moves to 5.4.4 to match httpclient5 5.6.5; MAT provides httpcore5 at runtime. Pinned in both MatCalcitePlugin/pom.xml and the target definition; the target takes the highest version of each library, so the old versions no longer ship. Only jackson-core is reachable from the plugin (Calcite's JSON functions). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miguelnieto
force-pushed
the
01_mat-1.17-java21-calcite-1.42
branch
from
November 7, 2026 21:51
d460a89 to
6475d2a
Compare
Owner
|
@miguelnieto , thanks for pushing this forward. Will review soon. |
This was referenced Nov 8, 2026
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.
Summary
Moves the plugin to Eclipse MAT 1.17.0, Java 21, Eclipse 4.40 and Apache Calcite 1.42.0. It also fixes
ORDER BYand joins on heap objects, which Calcite 1.37+ broke.This is the first of three stacked PRs:
Each PR builds and passes its tests on its own.
Supersedes the calcite-core 1.42.0 bumps in #119 and #120. Those change only the pom; the Tycho target definition and the new Avatica runtime dependencies need changing too (see below).
org.eclipse.mat.api1.17.0 declaresBundle-RequiredExecutionEnvironment: JavaSE-21, so the plugin can't target lower. Users on older MAT stay on 1.6.x; the README says so.Changes
Platform
MatCalcitePlugin/pom.xmland the target definition. They had drifted apart (pom 1.41.0, target 1.36.0), because Renovate updates poms but not Tycho targets. So the plugin could compile against one Calcite and run against another. Guava is 33.7.2-jre in both: Renovate has since updated it in the pom onmain, but not in the target.Calcite 1.42 runtime
avatica-coreis declared beforecalcite-core, so Maven compiles against the Jackson 2.22.2 that Avatica 1.29.0 brings and the target platform ships. The plugin itself isn't exposed: it opens its Calcite connection with fixed properties, so no class names reach Avatica from SQL or other input.Import-Packagegainhttpclient5/httpcore5(new in Avatica 1.28) andjoou. Without them the plugin fails at runtime withNoClassDefFoundErrorfororg/apache/hc/core5/util/Timeoutandorg/joou/UInteger.jakarta.transaction-apiis excluded fromcommons-dbcp2. It has an unsatisfiableImport-Package(javax.enterprise.context), and it keptgeronimo-jta_1.1_specfrom supplyingjavax.transaction.ORDER BY and joins on heap objects
Calcite 1.37+ compares
Map-typed values withFunctions.compareMaps(), which walksentrySet().HeapReferenceimplementsMaponly for thethis['field']syntax, and itsentrySet()threw an exception. So everyORDER BYover a heap object failed withUnsupportedOperationException.entrySet()now returns a single entry that orders likecompareTo. Two details matter:entrySet()but merges them withcompareTo. When the two orders differed, the merge join dropped matches:java.lang.Class left join instanceof.java.lang.ClassLoadermatched 469 rows instead of 985.ORDER BY thisover 4M objects took about 2 minutes instead of 10 s.ORDER BY toString(this)still sorts by label.SQL functions
getHexAddress(x): the address as0x…, the form MAT shows.getDominator(x)failed with "Object -1 not found" for objects dominated by the virtual root; it now returns null.Tests
testStackTracesnow ignores the source file MAT adds to native frames. MAT 1.17 renders(Object.java(Native Method))where older versions rendered(Native Method). The plugin passes that text through unchanged.ORDER BY this, in both directions;Testing
./mvnw verifywith JDK 21: 51 tests pass, 1 skipped (testConcurrentHashMap, skipped as onmain).ORDER BY thisand joins on a 1.5 GB dump with 24M objects.Notes for reviewers
The build log prints a few
[ERROR] [verify-osgi-pom]lines. They don't fail the build, and they predate this PR:mainprints 10, this branch prints 3. The 3 left can't be fixed in the poms:javax.transaction.xa;partial=true, which nothing provides.They only concern Maven consumers that run the jars in a plain OSGi framework, not the p2 site. Removing the
verify-osgi-pomexecution would hide them; that's your call.🤖 Generated with Claude Code