|
26 | 26 | <exec.mainClass>com.github.gbenroscience.parser.ng.parquet.ParserNgParquet</exec.mainClass> |
27 | 27 | <maven.compiler.release>22</maven.compiler.release> |
28 | 28 | <maven.compiler.source>22</maven.compiler.source> |
29 | | - <maven.compiler.target>22</maven.compiler.target> |
| 29 | + <maven.compiler.target>22</maven.compiler.target> |
30 | 30 | <!-- Keep in lock-step with parser-ng-arrow so both modules share one Arrow runtime. --> |
31 | 31 | <arrow.version>19.0.0</arrow.version> |
32 | 32 | <!-- Latest parquet-java at time of writing (Aug 2026). Re-verify before release. --> |
|
36 | 36 | <!-- JMH: keep core and the annotation processor in lock-step. --> |
37 | 37 | <jmh.version>1.37</jmh.version> |
38 | 38 |
|
| 39 | + <!-- |
| 40 | + Arrow allocation manager used by surefire. Defaults to Netty; the jdk24plus profile |
| 41 | + switches it to Unsafe because Arrow 19's Netty allocator fails on JDK 24+. |
| 42 | + --> |
| 43 | + <arrow.alloc>Netty</arrow.alloc> |
| 44 | + <!-- Extra JVM flags that only exist on newer JDKs. Empty by default; set in jdk24plus. --> |
| 45 | + <jdk.extra.args></jdk.extra.args> |
39 | 46 | </properties> |
40 | 47 |
|
41 | 48 | <dependencies> |
|
85 | 92 | <scope>provided</scope> |
86 | 93 | </dependency> |
87 | 94 |
|
88 | | -<!-- Test only: the SQL/Arrow modules are NEVER a compile dependency of this module. |
| 95 | + <!-- Test only: the SQL/Arrow modules are NEVER a compile dependency of this module. --> |
89 | 96 | <dependency> |
90 | 97 | <groupId>com.github.gbenroscience</groupId> |
91 | 98 | <artifactId>parser-ng-sql</artifactId> |
92 | 99 | <version>${project.version}</version> |
93 | 100 | <scope>test</scope> |
94 | | - </dependency>--> |
| 101 | + </dependency> |
95 | 102 | <dependency> |
96 | 103 | <groupId>org.junit.jupiter</groupId> |
97 | 104 | <artifactId>junit-jupiter</artifactId> |
|
108 | 115 | <version>3.13.0</version> |
109 | 116 | <configuration> |
110 | 117 | <release>${maven.compiler.release}</release> |
111 | | - <!-- FIX: Enable the vector API module for source compilation --> |
| 118 | + <!-- Enable the vector API module for source compilation --> |
112 | 119 | <compilerArgs> |
113 | 120 | <arg>--add-modules</arg> |
114 | 121 | <arg>jdk.incubator.vector</arg> |
|
140 | 147 | --add-opens=java.base/java.util=ALL-UNNAMED |
141 | 148 | --add-opens=java.base/java.lang=ALL-UNNAMED |
142 | 149 | -Dio.netty.tryReflectionSetAccessible=true |
143 | | - -Darrow.allocation.manager.type=Netty |
| 150 | + -Darrow.allocation.manager.type=${arrow.alloc} |
| 151 | + ${jdk.extra.args} |
144 | 152 | </argLine> |
145 | | - <!-- REMOVED: compilerArgs from surefire plugin (invalid tag here) --> |
146 | 153 | </configuration> |
147 | 154 | </plugin> |
148 | 155 | <plugin> |
|
167 | 174 | </build> |
168 | 175 |
|
169 | 176 | <profiles> |
170 | | - |
| 177 | + |
| 178 | + <!-- |
| 179 | + JDK 24+: Arrow 19's Netty allocator fails in NettyAllocationManager.<clinit> |
| 180 | + (EmptyByteBuf.memoryAddress -> UnsupportedOperationException), so every test that touches |
| 181 | + RootAllocator errors out. Use Arrow's Unsafe allocator instead. |
| 182 | + The --sun-misc-unsafe-memory-access flag only exists on newer JDKs, hence it lives here. |
| 183 | + --> |
| 184 | + <profile> |
| 185 | + <id>jdk24plus</id> |
| 186 | + <activation> |
| 187 | + <jdk>[24,)</jdk> |
| 188 | + </activation> |
| 189 | + <properties> |
| 190 | + <arrow.alloc>Unsafe</arrow.alloc> |
| 191 | + <jdk.extra.args>--sun-misc-unsafe-memory-access=allow</jdk.extra.args> |
| 192 | + </properties> |
| 193 | + <dependencies> |
| 194 | + <dependency> |
| 195 | + <groupId>org.apache.arrow</groupId> |
| 196 | + <artifactId>arrow-memory-unsafe</artifactId> |
| 197 | + <version>${arrow.version}</version> |
| 198 | + <scope>runtime</scope> |
| 199 | + </dependency> |
| 200 | + </dependencies> |
| 201 | + </profile> |
| 202 | + |
171 | 203 | <profile> |
172 | 204 | <id>jmh</id> |
173 | 205 | <dependencies> |
|
0 commit comments