This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git


The following commit(s) were added to refs/heads/develop by this push:
     new 943a7261 Support JDK-25 (#649)
943a7261 is described below

commit 943a7261f9a362196b9066048bb5ff1f400bc3aa
Author: Haonan <[email protected]>
AuthorDate: Fri Nov 28 12:43:44 2025 +0800

    Support JDK-25 (#649)
---
 .github/workflows/unit-test-java.yml               |  2 +-
 cpp/pom.xml                                        |  2 +-
 .../java/org/apache/tsfile/enums/TSDataType.java   |  4 ++--
 .../tsfile/encoding/decoder/IntChimpDecoder.java   | 16 ++++++-------
 .../tsfile/encoding/decoder/IntGorillaDecoder.java |  4 ++--
 .../tsfile/encoding/decoder/LongChimpDecoder.java  | 22 ++++++++---------
 .../encoding/decoder/LongGorillaDecoder.java       |  4 ++--
 .../operator/ExtractTimeFilterOperators.java       | 18 +++++++-------
 .../org/apache/tsfile/utils/Murmur128Hash.java     | 28 +++++++++++-----------
 pom.xml                                            |  8 +++----
 10 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/.github/workflows/unit-test-java.yml 
b/.github/workflows/unit-test-java.yml
index bacbbd46..ca900b74 100644
--- a/.github/workflows/unit-test-java.yml
+++ b/.github/workflows/unit-test-java.yml
@@ -44,7 +44,7 @@ jobs:
       fail-fast: false
       max-parallel: 15
       matrix:
-        java: [ 8, 17, 21 ]
+        java: [ 8, 17, 25 ]
         os: [ ubuntu-latest, macos-latest, windows-latest ]
     runs-on: ${{ matrix.os }}
 
diff --git a/cpp/pom.xml b/cpp/pom.xml
index fa6b0070..ddc3e5e5 100644
--- a/cpp/pom.xml
+++ b/cpp/pom.xml
@@ -233,7 +233,7 @@
                     <plugin>
                         <groupId>com.diffplug.spotless</groupId>
                         <artifactId>spotless-maven-plugin</artifactId>
-                        <version>${spotless.version}</version>
+                        <version>2.44.3</version>
                         <configuration>
                             <cpp>
                                 <includes>
diff --git a/java/common/src/main/java/org/apache/tsfile/enums/TSDataType.java 
b/java/common/src/main/java/org/apache/tsfile/enums/TSDataType.java
index 4fb01f86..2a670379 100644
--- a/java/common/src/main/java/org/apache/tsfile/enums/TSDataType.java
+++ b/java/common/src/main/java/org/apache/tsfile/enums/TSDataType.java
@@ -507,7 +507,7 @@ public enum TSDataType {
       case FLOAT:
       case DATE:
         return 4;
-        // For text: return the size of reference here
+      // For text: return the size of reference here
       case TEXT:
       case INT64:
       case DOUBLE:
@@ -544,7 +544,7 @@ public enum TSDataType {
       case FLOAT:
       case DOUBLE:
         return true;
-        // For text: return the size of reference here
+      // For text: return the size of reference here
       case BLOB:
       case TIMESTAMP:
       case DATE:
diff --git 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntChimpDecoder.java
 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntChimpDecoder.java
index 1b1947cd..9be52263 100644
--- 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntChimpDecoder.java
+++ 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntChimpDecoder.java
@@ -102,18 +102,18 @@ public class IntChimpDecoder extends GorillaDecoderV2 {
         current = (current + 1) % PREVIOUS_VALUES;
         storedValues[current] = storedValue;
         return storedValue;
-        // case 10: use the previous leading zeros and
-        // and just read the meaningful XORed value.
+      // case 10: use the previous leading zeros and
+      // and just read the meaningful XORed value.
       case 2:
         value = (int) readLong(VALUE_BITS_LENGTH_32BIT - storedLeadingZeros, 
in);
         storedValue = storedValue ^ value;
         current = (current + 1) % PREVIOUS_VALUES;
         storedValues[current] = storedValue;
         return storedValue;
-        // case 01:  read the index of the previous value, the length of
-        // the number of leading zeros in the next 3 bits, then read
-        // the length of the meaningful XORed value in the next 5
-        // bits. Finally read the meaningful bits of the XORed value.
+      // case 01:  read the index of the previous value, the length of
+      // the number of leading zeros in the next 3 bits, then read
+      // the length of the meaningful XORed value in the next 5
+      // bits. Finally read the meaningful bits of the XORed value.
       case 1:
         int fill = CASE_ONE_METADATA_LENGTH;
         int temp = (int) readLong(fill, in);
@@ -132,8 +132,8 @@ public class IntChimpDecoder extends GorillaDecoderV2 {
         current = (current + 1) % PREVIOUS_VALUES;
         storedValues[current] = storedValue;
         return storedValue;
-        // case 00: the values are identical, just read
-        // the index of the previous value
+      // case 00: the values are identical, just read
+      // the index of the previous value
       default:
         int previousIndex = (int) readLong(PREVIOUS_VALUES_LOG2, in);
         storedValue = storedValues[previousIndex];
diff --git 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntGorillaDecoder.java
 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntGorillaDecoder.java
index fd3aede6..a3366bed 100644
--- 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntGorillaDecoder.java
+++ 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/IntGorillaDecoder.java
@@ -76,13 +76,13 @@ public class IntGorillaDecoder extends GorillaDecoderV2 {
         byte significantBits = (byte) 
readLong(MEANINGFUL_XOR_BITS_LENGTH_32BIT, in);
         significantBits++;
         storedTrailingZeros = VALUE_BITS_LENGTH_32BIT - significantBits - 
storedLeadingZeros;
-        // missing break is intentional, we want to overflow to next one
+      // missing break is intentional, we want to overflow to next one
       case 2: // case '10': use stored leading and trailing zeros
         int xor =
             (int) readLong(VALUE_BITS_LENGTH_32BIT - storedLeadingZeros - 
storedTrailingZeros, in);
         xor <<= storedTrailingZeros;
         storedValue ^= xor;
-        // missing break is intentional, we want to overflow to next one
+      // missing break is intentional, we want to overflow to next one
       default: // case '0': use stored value
         return storedValue;
     }
diff --git 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongChimpDecoder.java
 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongChimpDecoder.java
index 23712bae..df11b40b 100644
--- 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongChimpDecoder.java
+++ 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongChimpDecoder.java
@@ -92,9 +92,9 @@ public class LongChimpDecoder extends GorillaDecoderV2 {
     byte controlBits = readNextNBits(2, in);
     long value;
     switch (controlBits) {
-        // case 11: read the length of the number of leading
-        // zeros in the next 3 bits, then read the
-        // meaningful bits of the XORed value.
+      // case 11: read the length of the number of leading
+      // zeros in the next 3 bits, then read the
+      // meaningful bits of the XORed value.
       case 3:
         storedLeadingZeros = LEADING_REPRESENTATION[(int) readLong(3, in)];
         value = readLong(VALUE_BITS_LENGTH_64BIT - storedLeadingZeros, in);
@@ -102,18 +102,18 @@ public class LongChimpDecoder extends GorillaDecoderV2 {
         current = (current + 1) % PREVIOUS_VALUES;
         storedValues[current] = storedValue;
         return storedValue;
-        // case 10: use the previous leading zeros and
-        // and just read the meaningful XORed value.
+      // case 10: use the previous leading zeros and
+      // and just read the meaningful XORed value.
       case 2:
         value = readLong(VALUE_BITS_LENGTH_64BIT - storedLeadingZeros, in);
         storedValue = storedValue ^ value;
         current = (current + 1) % PREVIOUS_VALUES;
         storedValues[current] = storedValue;
         return storedValue;
-        // case 01:  read the index of the previous value, the length of
-        // the number of leading zeros in the next 3 bits, then read
-        // the length of the meaningful XORed value in the next 6
-        // bits. Finally read the meaningful bits of the XORed value.
+      // case 01:  read the index of the previous value, the length of
+      // the number of leading zeros in the next 3 bits, then read
+      // the length of the meaningful XORed value in the next 6
+      // bits. Finally read the meaningful bits of the XORed value.
       case 1:
         int fill = CASE_ONE_METADATA_LENGTH;
         int temp = (int) readLong(fill, in);
@@ -131,8 +131,8 @@ public class LongChimpDecoder extends GorillaDecoderV2 {
         current = (current + 1) % PREVIOUS_VALUES;
         storedValues[current] = storedValue;
         return storedValue;
-        // case 00: the values are identical, just read
-        // the index of the previous value
+      // case 00: the values are identical, just read
+      // the index of the previous value
       default:
         int previousIndex = (int) readLong(PREVIOUS_VALUES_LOG2, in);
         storedValue = storedValues[previousIndex];
diff --git 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongGorillaDecoder.java
 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongGorillaDecoder.java
index 3610dd11..24b81bca 100644
--- 
a/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongGorillaDecoder.java
+++ 
b/java/tsfile/src/main/java/org/apache/tsfile/encoding/decoder/LongGorillaDecoder.java
@@ -76,12 +76,12 @@ public class LongGorillaDecoder extends GorillaDecoderV2 {
         byte significantBits = (byte) 
readLong(MEANINGFUL_XOR_BITS_LENGTH_64BIT, in);
         significantBits++;
         storedTrailingZeros = VALUE_BITS_LENGTH_64BIT - significantBits - 
storedLeadingZeros;
-        // missing break is intentional, we want to overflow to next one
+      // missing break is intentional, we want to overflow to next one
       case 2: // case '10': use stored leading and trailing zeros
         long xor = readLong(VALUE_BITS_LENGTH_64BIT - storedLeadingZeros - 
storedTrailingZeros, in);
         xor <<= storedTrailingZeros;
         storedValue ^= xor;
-        // missing break is intentional, we want to overflow to next one
+      // missing break is intentional, we want to overflow to next one
       default: // case '0': use stored value
         return storedValue;
     }
diff --git 
a/java/tsfile/src/main/java/org/apache/tsfile/read/filter/operator/ExtractTimeFilterOperators.java
 
b/java/tsfile/src/main/java/org/apache/tsfile/read/filter/operator/ExtractTimeFilterOperators.java
index 3c93af5a..087da75e 100644
--- 
a/java/tsfile/src/main/java/org/apache/tsfile/read/filter/operator/ExtractTimeFilterOperators.java
+++ 
b/java/tsfile/src/main/java/org/apache/tsfile/read/filter/operator/ExtractTimeFilterOperators.java
@@ -184,7 +184,7 @@ public final class ExtractTimeFilterOperators {
       switch (field) {
         case YEAR:
           return (timestamp1, timestamp2) -> true;
-          // base YEAR
+        // base YEAR
         case QUARTER:
         case MONTH:
         case WEEK:
@@ -200,7 +200,7 @@ public final class ExtractTimeFilterOperators {
                           .withMonth(1)
                           .withDayOfMonth(1)
                           .truncatedTo(ChronoUnit.DAYS));
-          // base MONTH
+        // base MONTH
         case DAY:
         case DAY_OF_MONTH:
           return (timestamp1, timestamp2) ->
@@ -211,7 +211,7 @@ public final class ExtractTimeFilterOperators {
                       convertToZonedDateTime(timestamp2, zoneId)
                           .withDayOfMonth(1)
                           .truncatedTo(ChronoUnit.DAYS));
-          // base WEEK
+        // base WEEK
         case DAY_OF_WEEK:
         case DOW:
           return (timestamp1, timestamp2) ->
@@ -222,40 +222,40 @@ public final class ExtractTimeFilterOperators {
                       convertToZonedDateTime(timestamp2, zoneId)
                           .with(DayOfWeek.MONDAY)
                           .truncatedTo(ChronoUnit.DAYS));
-          // base DAY
+        // base DAY
         case HOUR:
           return (timestamp1, timestamp2) ->
               convertToZonedDateTime(timestamp1, zoneId)
                   .truncatedTo(ChronoUnit.DAYS)
                   .equals(convertToZonedDateTime(timestamp2, 
zoneId).truncatedTo(ChronoUnit.DAYS));
-          // base HOUR
+        // base HOUR
         case MINUTE:
           return (timestamp1, timestamp2) ->
               convertToZonedDateTime(timestamp1, zoneId)
                   .truncatedTo(ChronoUnit.HOURS)
                   .equals(convertToZonedDateTime(timestamp2, 
zoneId).truncatedTo(ChronoUnit.HOURS));
-          // base MINUTE
+        // base MINUTE
         case SECOND:
           return (timestamp1, timestamp2) ->
               convertToZonedDateTime(timestamp1, zoneId)
                   .truncatedTo(ChronoUnit.MINUTES)
                   .equals(
                       convertToZonedDateTime(timestamp2, 
zoneId).truncatedTo(ChronoUnit.MINUTES));
-          // base SECOND
+        // base SECOND
         case MS:
           return (timestamp1, timestamp2) ->
               convertToZonedDateTime(timestamp1, zoneId)
                   .truncatedTo(ChronoUnit.SECONDS)
                   .equals(
                       convertToZonedDateTime(timestamp2, 
zoneId).truncatedTo(ChronoUnit.SECONDS));
-          // base MS
+        // base MS
         case US:
           return (timestamp1, timestamp2) ->
               convertToZonedDateTime(timestamp1, zoneId)
                   .truncatedTo(ChronoUnit.MILLIS)
                   .equals(
                       convertToZonedDateTime(timestamp2, 
zoneId).truncatedTo(ChronoUnit.MILLIS));
-          // base US
+        // base US
         case NS:
           return (timestamp1, timestamp2) ->
               convertToZonedDateTime(timestamp1, zoneId)
diff --git 
a/java/tsfile/src/main/java/org/apache/tsfile/utils/Murmur128Hash.java 
b/java/tsfile/src/main/java/org/apache/tsfile/utils/Murmur128Hash.java
index dfb4b430..284d5e8b 100644
--- a/java/tsfile/src/main/java/org/apache/tsfile/utils/Murmur128Hash.java
+++ b/java/tsfile/src/main/java/org/apache/tsfile/utils/Murmur128Hash.java
@@ -114,50 +114,50 @@ public class Murmur128Hash {
     switch (length & 15) {
       case 15:
         k2 ^= ((long) key[offset + 14]) << 48;
-        // fallthrough
+      // fallthrough
       case 14:
         k2 ^= ((long) key[offset + 13]) << 40;
-        // fallthrough
+      // fallthrough
       case 13:
         k2 ^= ((long) key[offset + 12]) << 32;
-        // fallthrough
+      // fallthrough
       case 12:
         k2 ^= ((long) key[offset + 11]) << 24;
-        // fallthrough
+      // fallthrough
       case 11:
         k2 ^= ((long) key[offset + 10]) << 16;
-        // fallthrough
+      // fallthrough
       case 10:
         k2 ^= ((long) key[offset + 9]) << 8;
-        // fallthrough
+      // fallthrough
       case 9:
         k2 ^= key[offset + 8];
         k2 *= c2;
         k2 = rotl64(k2, 33);
         k2 *= c1;
         h2 ^= k2;
-        // fallthrough
+      // fallthrough
       case 8:
         k1 ^= ((long) key[offset + 7]) << 56;
-        // fallthrough
+      // fallthrough
       case 7:
         k1 ^= ((long) key[offset + 6]) << 48;
-        // fallthrough
+      // fallthrough
       case 6:
         k1 ^= ((long) key[offset + 5]) << 40;
-        // fallthrough
+      // fallthrough
       case 5:
         k1 ^= ((long) key[offset + 4]) << 32;
-        // fallthrough
+      // fallthrough
       case 4:
         k1 ^= ((long) key[offset + 3]) << 24;
-        // fallthrough
+      // fallthrough
       case 3:
         k1 ^= ((long) key[offset + 2]) << 16;
-        // fallthrough
+      // fallthrough
       case 2:
         k1 ^= ((long) key[offset + 1]) << 8;
-        // fallthrough
+      // fallthrough
       case 1:
         k1 ^= (key[offset]);
         k1 *= c1;
diff --git a/pom.xml b/pom.xml
index 51fbe314..0111cea0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
         <spotless.skip>false</spotless.skip>
         <cmake.version>3.30.2-b1</cmake.version>
         <spotless.version>2.44.3</spotless.version>
-        <google.java.format.version>1.22.0</google.java.format.version>
+        <google.java.format.version>1.28.0</google.java.format.version>
         <clang.format.version>17.0.6</clang.format.version>
         
<drill.freemarker.maven.plugin.version>1.21.1</drill.freemarker.maven.plugin.version>
         <groovy.version>4.0.22</groovy.version>
@@ -620,11 +620,11 @@
                       ]]></argLine>
             </properties>
         </profile>
-        <!-- Current version of spotless cannot support JDK11 below -->
+        <!-- Current version of spotless cannot support JDK17 below -->
         <profile>
-            <id>.java-11-below</id>
+            <id>.java-17-below</id>
             <activation>
-                <jdk>(,11]</jdk>
+                <jdk>(,17)</jdk>
             </activation>
             <properties>
                 <!-- This was the last version to support Java 8, Just for run 
-->

Reply via email to