MINOR: Bump com.diffplug.spotless:spotless-maven-plugin from 3.8.0 to 3.10.3 (#1299)

Bumps
[com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless)
from 3.8.0 to 3.10.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/diffplug/spotless/releases">com.diffplug.spotless:spotless-maven-plugin's
releases</a>.</em></p>
<blockquote>
<h2>Maven Plugin v3.10.3</h2>
<h3>Changes</h3>
<ul>
<li>Generate formatter defaults from version catalog. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3045">#3045</a>)</li>
<li>Bump default <code>gson</code> version <code>2.13.2</code> -&gt;
<code>2.14.0</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3045">#3045</a>)</li>
<li>Bump default <code>zjsonpatch</code> version <code>0.4.14</code>
-&gt; <code>0.4.16</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3045">#3045</a>)</li>
<li>Bump default <code>jackson-dataformat-yaml</code> version
<code>2.14.1</code> -&gt; <code>2.20.1</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3045">#3045</a>)</li>
<li>Bump default <code>ktfmt</code> version <code>0.63</code> -&gt;
<code>0.64</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/2988">2988</a>)</li>
<li>Bump default <code>cleanthat</code> version <code>2.25</code> -&gt;
<code>2.26</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/2882">#2882</a>)</li>
<li>Bump default <code>jackson</code> version <code>2.20.1</code> -&gt;
<code>2.22.2</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/2819">#2819</a>)</li>
<li>Bump default <code>javaparser</code> version <code>3.27.1</code>
-&gt; <code>3.28.2</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3065">#3065</a>)</li>
<li>Bump default <code>palantir-java-format</code> version
<code>2.80.0</code> -&gt; <code>2.98.0</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3068">#3068</a>)</li>
<li>Bump default <code>scalafmt</code> version <code>3.8.1</code> -&gt;
<code>3.11.5</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/2173">#2173</a>)</li>
<li>Bump default <code>google-java-format</code> version
<code>1.30.0</code> -&gt; <code>1.36.1</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3075">#3075</a>)</li>
<li>Bump default <code>gherkin-utils</code> version <code>10.0.0</code>
-&gt; <code>12.0.2</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/2979">#2979</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix release signing by using Gradle's required eight-digit signing
subkey ID. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3105">#3105</a>)</li>
<li>Fix race when creating the npm install cache directory. ((<a
href="https://redirect.github.com/diffplug/spotless/pull/3096">#3096</a>)</li>
<li>GrEclipse no longer emits expected OSGi and nested-jar warnings
during initialization. (<a
href="https://redirect.github.com/diffplug/spotless/issues/2445">#2445</a>)</li>
<li><code>typescript</code> <code>prettier()</code> no longer emits a
warning when its parser is already set to <code>typescript</code>. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3098">#3098</a>)</li>
<li><code>&lt;versionCatalog&gt;</code> preserves standalone comments at
section boundaries and the end of the file. (<a
href="https://redirect.github.com/diffplug/spotless/issues/3048">#3048</a>)</li>
<li><code>&lt;versionCatalog&gt;</code> preserves entries when comments
contain unmatched brackets, preserves commas inside quoted strings, and
keeps significant line boundaries in multiline entries. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3042">#3042</a>)</li>
<li><code>&lt;versionCatalog&gt;</code> now reports unfinished entries
as lints at their starting line. These fail formatting by default, so
upgrading may expose catalog errors that previously caused silent data
loss. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3042">#3042</a>)</li>
<li>Eclipse JDT formatter step no longer fails with
<code>NoClassDefFoundError</code> or <code>NoSuchMethodError</code> when
lombok is active as a JVM agent (e.g. <code>-javaagent:lombok.jar</code>
in Eclipse/VS Code/Cursor). (<a
href="https://redirect.github.com/diffplug/spotless/issues/2795">#2795</a>)</li>
</ul>
<h2>Maven Plugin v3.10.2</h2>
<h3>Fixed</h3>
<ul>
<li><code>&lt;shortenFullyQualifiedTypes&gt;</code> now shortens
fully-qualified types used in expression contexts (such as static method
calls, static fields, and enum constants) while avoiding imports that
would change how existing unqualified type references resolve. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3039">#3039</a>)</li>
<li>Eclipse JDT formatter step no longer fails with
<code>NoClassDefFoundError</code> when lombok is active as a JVM agent
(e.g. <code>-javaagent:lombok.jar</code> in Eclipse/VS Code/Cursor). (<a
href="https://redirect.github.com/diffplug/spotless/issues/2795">#2795</a>)</li>
</ul>
<h2>Maven Plugin v3.10.1</h2>
<h3>Fixed</h3>
<ul>
<li><code>&lt;prettier&gt;</code> and other npm-based steps no longer
fail to start on npm 12 (<code>EUNKNOWNCONFIG</code> from
<code>--scripts-prepend-node-path</code>). (<a
href="https://redirect.github.com/diffplug/spotless/issues/3024">#3024</a>)</li>
</ul>
<h2>Maven Plugin v3.10.0</h2>
<h3>Added</h3>
<ul>
<li>New <code>&lt;shortenFullyQualifiedTypes&gt;</code> step for Java,
which replaces fully-qualified type names with their simple names and
adds the imports they need. Best combined with
<code>&lt;importOrder&gt;</code> and
<code>&lt;removeUnusedImports&gt;</code>. (<a
href="https://redirect.github.com/diffplug/spotless/issues/2945">#2945</a>)</li>
<li>Add embedded lockfiles to Eclipse JDT for every supported version
(<code>4.9</code> through <code>4.40</code>), so <code>eclipse()</code>
resolves from Maven Central instead of querying a P2 update site.
Versions without an embedded lockfile still fall back to P2
provisioning. (<a
href="https://redirect.github.com/diffplug/spotless/issues/1996">#1996</a>)</li>
<li>Add support to apply alternate license header within same format (<a
href="https://redirect.github.com/diffplug/spotless/issues/872">#872</a>)</li>
<li>Add support to skip license header application based on source file
content pattern (<a
href="https://redirect.github.com/diffplug/spotless/issues/650">#650</a>).</li>
</ul>
<h3>Fixed</h3>
<ul>
<li><code>removeUnusedImports</code> no longer fails on Java
<code>import module</code> declarations. (<a
href="https://redirect.github.com/diffplug/spotless/issues/2890">#2890</a>)</li>
<li>Concurrent P2 provisioning no longer races Solstice's on-disk cache
(affects Eclipse-based formatters under parallel builds). (<a
href="https://redirect.github.com/diffplug/spotless/issues/3004">#3004</a>)</li>
</ul>
<h3>Changes</h3>
<ul>
<li>Default <code>google-java-format</code> remains <code>1.28.0</code>
on JVM 17; bumps to <code>1.30.0</code> on JVM 21+; require at least
<code>1.30.0</code> on JVM 25+ for <code>import module</code>
support.</li>
<li>Bump default <code>eclipse</code> version to latest
<code>4.39</code> -&gt; <code>4.40</code>. (<a
href="https://redirect.github.com/diffplug/spotless/issues/1996">#1996</a>)</li>
<li>Document Maven skip properties <code>spotless.skip</code>,
<code>spotless.check.skip</code>, and <code>spotless.apply.skip</code>.
Goal-specific skips now live on their own mojos so they no longer leak
across goals. (<a
href="https://redirect.github.com/diffplug/spotless/pull/3009">#3009</a>)</li>
<li>Bump default <code>adocfmt</code> version <code>0.2.0</code> -&gt;
<code>0.3.1</code>, which adds table formatting support
(<code>&lt;formatTables&gt;</code>, <code>&lt;tableLayout&gt;</code>,
<code>&lt;tableMaxLineWidth&gt;</code>,
<code>&lt;tableBlankLines&gt;</code>).</li>
</ul>
<h2>Maven Plugin v3.9.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/diffplug/spotless/commit/61e2016ee3ac82fb565b587e04408ae45dc5b709"><code>61e2016</code></a>
Published maven/3.10.3</li>
<li><a
href="https://github.com/diffplug/spotless/commit/49e0b074905b6360848f9ab9c54e6f015911e301"><code>49e0b07</code></a>
Published lib/4.10.3</li>
<li><a
href="https://github.com/diffplug/spotless/commit/b7a77486c6e6aad738b68ffce4075949680362d5"><code>b7a7748</code></a>
Fix release signing key ID format (<a
href="https://redirect.github.com/diffplug/spotless/issues/3105">#3105</a>)</li>
<li><a
href="https://github.com/diffplug/spotless/commit/be8005aae5d5e17c6a2819b2c54df5268c5cf4c5"><code>be8005a</code></a>
Document release signing correction (<a
href="https://redirect.github.com/diffplug/spotless/issues/3105">#3105</a>)</li>
<li><a
href="https://github.com/diffplug/spotless/commit/073fe6199960d95f733dad9b4d9311c3148d4914"><code>073fe61</code></a>
Use short signing subkey ID for release publishing</li>
<li><a
href="https://github.com/diffplug/spotless/commit/8ac44c7aa8c08ca9b00e86d4dd59d589e7da8f09"><code>8ac44c7</code></a>
Fix race when creating the npm install cache directory (<a
href="https://redirect.github.com/diffplug/spotless/issues/3096">#3096</a>)</li>
<li><a
href="https://github.com/diffplug/spotless/commit/3f2d95561185486350c02471dab99a28585e7b45"><code>3f2d955</code></a>
Update dependency org.slf4j:slf4j-api to v2.0.20 (<a
href="https://redirect.github.com/diffplug/spotless/issues/3100">#3100</a>)</li>
<li><a
href="https://github.com/diffplug/spotless/commit/0c70ca8904be526d40923f47b0fd8e9cfecfd33a"><code>0c70ca8</code></a>
Merge branch 'main' into fix/npm-cache-directory-race</li>
<li><a
href="https://github.com/diffplug/spotless/commit/bbf44a47b7cbdd2c4f55880f9767f79f36c9b6ee"><code>bbf44a4</code></a>
Fix GrEclipse initialization warnings (<a
href="https://redirect.github.com/diffplug/spotless/issues/3097">#3097</a>)</li>
<li><a
href="https://github.com/diffplug/spotless/commit/b6bdcd0469e3c609f7d7017a4a462ed6ed7a31c9"><code>b6bdcd0</code></a>
Update dependency org.slf4j:slf4j-api to v2.0.20</li>
<li>Additional commits viewable in <a
href="https://github.com/diffplug/spotless/compare/maven/3.8.0...maven/3.10.3">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2 files changed
tree: bcd235f1de25d3fe8a682109544292aa8d947d0f
  1. .github/
  2. .mvn/
  3. adapter/
  4. algorithm/
  5. arrow-format/
  6. arrow-variant/
  7. bom/
  8. c/
  9. ci/
  10. compression/
  11. dataset/
  12. dev/
  13. docs/
  14. flight/
  15. format/
  16. gandiva/
  17. memory/
  18. performance/
  19. tools/
  20. vector/
  21. .asf.yaml
  22. .cmake-format.py
  23. .editorconfig
  24. .env
  25. .gitattributes
  26. .gitignore
  27. .gitmodules
  28. .pre-commit-config.yaml
  29. api-changes.md
  30. Brewfile
  31. CMakeLists.txt
  32. CODE_OF_CONDUCT.md
  33. compose.yaml
  34. CONTRIBUTING.md
  35. LICENSE.txt
  36. NOTICE.txt
  37. pom.xml
  38. README.md
README.md

Arrow Java

Getting Started

The following guides explain the fundamental data structures used in the Java implementation of Apache Arrow.

  • ValueVector is an abstraction that is used to store a sequence of values having the same type in an individual column.
  • VectorSchemaRoot is a container that can hold multiple vectors based on a schema.
  • The Reading/Writing IPC formats guide explains how to stream record batches as well as serializing record batches to files.

Generated javadoc documentation is available here.

Building from source

Refer to Building Apache Arrow for documentation of environment setup and build instructions.

Flatbuffers dependency

Arrow uses Google's Flatbuffers to transport metadata. The java version of the library requires the generated flatbuffer classes can only be used with the same version that generated them. Arrow packages a version of the arrow-vector module that shades flatbuffers and arrow-format into a single JAR. Using the classifier “shade-format-flatbuffers” in your pom.xml will make use of this JAR, you can then exclude/resolve the original dependency to a version of your choosing.

Updating the flatbuffers generated code

  1. Verify that your version of flatc matches the declared dependency:
$ flatc --version
flatc version 25.1.24

$ grep "dep.fbs.version" pom.xml
    <dep.fbs.version>25.1.24</dep.fbs.version>
  1. Generate the flatbuffer java files by performing the following:
cd $ARROW_HOME

# remove the existing files
rm -rf format/src

# regenerate from the .fbs files
flatc --java -o format/src/main/java arrow-format/*.fbs

# prepend license header
mvn spotless:apply -pl :arrow-format

Performance Tuning

There are several system/environmental variables that users can configure. These trade off safety (they turn off checking) for speed. Typically they are only used in production settings after the code has been thoroughly tested without using them.

  • Bounds Checking for memory accesses: Bounds checking is on by default. You can disable it by setting either the system property(arrow.enable_unsafe_memory_access) or the environmental variable (ARROW_ENABLE_UNSAFE_MEMORY_ACCESS) to true. When both the system property and the environmental variable are set, the system property takes precedence.

  • null checking for gets: ValueVector get methods (not getObject) methods by default verify the slot is not null. You can disable it by setting either the system property(arrow.enable_null_check_for_get) or the environmental variable (ARROW_ENABLE_NULL_CHECK_FOR_GET) to false. When both the system property and the environmental variable are set, the system property takes precedence.

Java Properties

  • -Dio.netty.tryReflectionSetAccessible=true should be set. This fixes java.lang.UnsupportedOperationException: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available. thrown by Netty.
  • To support duplicate fields in a StructVector enable -Darrow.struct.conflict.policy=CONFLICT_APPEND. Duplicate fields are ignored (CONFLICT_REPLACE) by default and overwritten. To support different policies for conflicting or duplicate fields set this JVM flag or use the correct static constructor methods for StructVectors.

Java Code Style Guide

Arrow Java follows the Google Java Style Guide with the following differences:

  • Imports are grouped, from top to bottom, in this order: static imports, standard Java, org.*, com.*
  • Line length can be up to 120 characters
  • Operators for line wrapping are at end-of-line
  • Naming rules for methods, parameters, etc. have been relaxed
  • Disabled NoFinalizer, OverloadMethodsDeclarationOrder, and VariableDeclarationUsageDistance due to the existing code base. These rules should be followed when possible.

Refer to checkstyle.xml for rule specifics.

Test Logging Configuration

When running tests, Arrow Java uses the Logback logger with SLF4J. By default, it uses the logback.xml present in the corresponding module's src/test/resources directory, which has the default log level set to INFO. Arrow Java can be built with an alternate logback configuration file using the following command run in the project root directory:

mvn -Dlogback.configurationFile=file:<path-of-logback-file>

See Logback Configuration for more details.

Integration Tests

Integration tests which require more time or more memory can be run by activating the integration-tests profile. This activates the Maven Failsafe plugin and any class prefixed with IT will be run during the testing phase. The integration tests currently require a larger amount of memory (>4GB) and time to complete. To activate the profile:

mvn -Pintegration-tests <rest of mvn arguments>