Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/unit-test-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
2 changes: 1 addition & 1 deletion cpp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ public int getDataTypeSize() {
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:
Expand Down Expand Up @@ -544,7 +544,7 @@ public boolean isNumeric() {
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,18 @@ protected int readNext(ByteBuffer in) {
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);
Expand All @@ -132,8 +132,8 @@ protected int readNext(ByteBuffer in) {
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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ protected int readNext(ByteBuffer in) {
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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,28 @@ protected long readNext(ByteBuffer in) {
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);
storedValue = storedValue ^ value;
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);
Expand All @@ -131,8 +131,8 @@ protected long readNext(ByteBuffer in) {
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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ protected long readNext(ByteBuffer in) {
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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected BiFunction<Long, Long, Boolean> constructTruncatedEqualsFunction(
switch (field) {
case YEAR:
return (timestamp1, timestamp2) -> true;
// base YEAR
// base YEAR
case QUARTER:
case MONTH:
case WEEK:
Expand All @@ -200,7 +200,7 @@ protected BiFunction<Long, Long, Boolean> constructTruncatedEqualsFunction(
.withMonth(1)
.withDayOfMonth(1)
.truncatedTo(ChronoUnit.DAYS));
// base MONTH
// base MONTH
case DAY:
case DAY_OF_MONTH:
return (timestamp1, timestamp2) ->
Expand All @@ -211,7 +211,7 @@ protected BiFunction<Long, Long, Boolean> constructTruncatedEqualsFunction(
convertToZonedDateTime(timestamp2, zoneId)
.withDayOfMonth(1)
.truncatedTo(ChronoUnit.DAYS));
// base WEEK
// base WEEK
case DAY_OF_WEEK:
case DOW:
return (timestamp1, timestamp2) ->
Expand All @@ -222,40 +222,40 @@ protected BiFunction<Long, Long, Boolean> constructTruncatedEqualsFunction(
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,50 +114,50 @@ private static long innerHash(byte[] key, int offset, int length, long seed) {
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;
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 -->
Expand Down
Loading