Skip to content

Commit 3222ac4

Browse files
authored
Merge branch 'deephaven:main' into formatted-autocomplete-md
2 parents 77820e4 + 3827ba0 commit 3222ac4

File tree

432 files changed

+24574
-13120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+24574
-13120
lines changed

.github/CODEOWNERS

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
/TRIAGE.md @chipkent @rcaudy
2121
/licenses @chipkent @rcaudy
2222
/docker @devinrsmith @jcferretti @rcaudy
23-
/engine/function/ @chipkent @kosak @rcaudy
24-
/py @chipkent @jmao-denver @rcaudy
25-
/R @chipkent @alexpeters1208 @rcaudy
26-
*.proto @devinrsmith @nbauernfeind @niloc132 @rcaudy
27-
*.gwt.xml @niloc132 @rcaudy @nbauernfeind
23+
/engine/function/ @chipkent @kosak @rcaudy @cpwright
24+
/py @chipkent @jmao-denver @rcaudy @cpwright
25+
/R @chipkent @rcaudy @cpwright
26+
*.proto @devinrsmith @nbauernfeind @niloc132 @rcaudy @cpwright
27+
*.gwt.xml @niloc132 @rcaudy @nbauernfeind @cpwright

Integrations/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def runInDocker = { String name, String sourcePath, List<String> command, Closur
6363
from("${sourcePath}/../client") {
6464
include 'setup.py'
6565
include 'pydeephaven/**'
66+
include 'deephaven_core/**'
6667
include 'README.md'
6768
into 'python/client'
6869
}

Util/channel/src/main/java/io/deephaven/util/channel/SeekableChannelsProviderLoader.java

+22-14
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import org.jetbrains.annotations.NotNull;
77
import org.jetbrains.annotations.Nullable;
88

9-
import java.net.URI;
109
import java.util.ArrayList;
1110
import java.util.List;
1211
import java.util.ServiceLoader;
@@ -19,11 +18,22 @@ public final class SeekableChannelsProviderLoader {
1918

2019
private static volatile SeekableChannelsProviderLoader instance;
2120

21+
/**
22+
* Get a static a {@link SeekableChannelsProviderLoader} instance that is loading with
23+
* {@link SeekableChannelsProviderPlugin} provided via {@link ServiceLoader#load(Class)}.
24+
*
25+
* @return The {@link SeekableChannelsProviderLoader} instance.
26+
*/
2227
public static SeekableChannelsProviderLoader getInstance() {
23-
if (instance == null) {
24-
instance = new SeekableChannelsProviderLoader();
28+
SeekableChannelsProviderLoader localInstance;
29+
if ((localInstance = instance) == null) {
30+
synchronized (SeekableChannelsProviderLoader.class) {
31+
if ((localInstance = instance) == null) {
32+
instance = localInstance = new SeekableChannelsProviderLoader();
33+
}
34+
}
2535
}
26-
return instance;
36+
return localInstance;
2737
}
2838

2939
private final List<SeekableChannelsProviderPlugin> providers;
@@ -37,21 +47,19 @@ private SeekableChannelsProviderLoader() {
3747
}
3848

3949
/**
40-
* Create a new {@link SeekableChannelsProvider} compatible for reading from and writing to the given URI, using the
41-
* plugins loaded by the {@link ServiceLoader}. For example, for a "S3" URI, we will create a
42-
* {@link SeekableChannelsProvider} which can read files from S3.
50+
* Create a new {@link SeekableChannelsProvider} compatible for reading from and writing to the given URI scheme.
51+
* For example, for a "S3" URI, we will create a {@link SeekableChannelsProvider} which can read files from S3.
4352
*
44-
* @param uri The URI
53+
* @param uriScheme The URI scheme
4554
* @param specialInstructions An optional object to pass special instructions to the provider.
46-
* @return A {@link SeekableChannelsProvider} for the given URI.
55+
* @return A {@link SeekableChannelsProvider} for the given URI scheme.
4756
*/
48-
public SeekableChannelsProvider fromServiceLoader(@NotNull final URI uri,
49-
@Nullable final Object specialInstructions) {
57+
public SeekableChannelsProvider load(@NotNull final String uriScheme, @Nullable final Object specialInstructions) {
5058
for (final SeekableChannelsProviderPlugin plugin : providers) {
51-
if (plugin.isCompatible(uri, specialInstructions)) {
52-
return plugin.createProvider(uri, specialInstructions);
59+
if (plugin.isCompatible(uriScheme, specialInstructions)) {
60+
return plugin.createProvider(uriScheme, specialInstructions);
5361
}
5462
}
55-
throw new UnsupportedOperationException("No plugin found for uri: " + uri);
63+
throw new UnsupportedOperationException("No plugin found for uri scheme: " + uriScheme);
5664
}
5765
}

Util/channel/src/main/java/io/deephaven/util/channel/SeekableChannelsProviderPlugin.java

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,18 @@
66
import org.jetbrains.annotations.NotNull;
77
import org.jetbrains.annotations.Nullable;
88

9-
import java.net.URI;
10-
119
/**
1210
* A plugin interface for providing {@link SeekableChannelsProvider} implementations for different URI schemes, e.g. S3.
1311
* Check out {@link SeekableChannelsProviderLoader} for more details.
1412
*/
1513
public interface SeekableChannelsProviderPlugin {
1614
/**
17-
* Check if this plugin is compatible with the given URI and config object.
15+
* Check if this plugin is compatible with the given URI scheme and config object.
1816
*/
19-
boolean isCompatible(@NotNull URI uri, @Nullable Object config);
17+
boolean isCompatible(@NotNull String uriScheme, @Nullable Object config);
2018

2119
/**
22-
* Create a {@link SeekableChannelsProvider} for the given URI and config object.
20+
* Create a {@link SeekableChannelsProvider} for the given URI scheme and config object.
2321
*/
24-
SeekableChannelsProvider createProvider(@NotNull URI uri, @Nullable Object object);
22+
SeekableChannelsProvider createProvider(@NotNull String uriScheme, @Nullable Object object);
2523
}

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626
because('needed by plugin com.bmuschko.docker-remote-api')
2727
}
2828

29-
implementation('com.avast.gradle:gradle-docker-compose-plugin:0.17.10') {
29+
implementation('com.avast.gradle:gradle-docker-compose-plugin:0.17.11') {
3030
because('needed by plugin com.avast.gradle.docker-compose')
3131
}
3232

buildSrc/src/main/groovy/io.deephaven.java-open-nio.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ plugins {
22
id 'java'
33
}
44

5-
def runtimeVersion = Integer.parseInt((String)project.findProperty('runtimeVersion') ?: '11')
6-
def testRuntimeVersion = Integer.parseInt((String)project.findProperty('testRuntimeVersion') ?: '11')
5+
def runtimeVersion = Integer.parseInt((String)project.findProperty('runtimeVersion') ?: '21')
6+
def testRuntimeVersion = Integer.parseInt((String)project.findProperty('testRuntimeVersion') ?: '21')
77

88
// Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @5a42bbf4
99
// at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)

buildSrc/src/main/groovy/io.deephaven.java-toolchain-conventions.gradle

+38-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ plugins {
44
id 'java'
55
}
66

7-
def compilerVersion = Integer.parseInt((String)project.findProperty('compilerVersion') ?: '11')
7+
def compilerVersion = Integer.parseInt((String)project.findProperty('compilerVersion') ?: '21')
88
def compilerVendor = project.hasProperty('compilerVendor') ? JvmVendorSpec.matching((String)project.property('compilerVendor')): null
99

1010
def languageLevel = Integer.parseInt((String)project.findProperty('languageLevel') ?: '11')
11-
def runtimeVersion = Integer.parseInt((String)project.findProperty('runtimeVersion') ?: '11')
11+
def runtimeVersion = Integer.parseInt((String)project.findProperty('runtimeVersion') ?: '21')
1212
def runtimeVendor = project.hasProperty('runtimeVendor') ? JvmVendorSpec.matching((String)project.property('runtimeVendor')): null
1313

1414
def testLanguageLevel = Integer.parseInt((String)project.findProperty('testLanguageLevel') ?: '11')
15-
def testRuntimeVersion = Integer.parseInt((String)project.findProperty('testRuntimeVersion') ?: '11')
15+
def testRuntimeVersion = Integer.parseInt((String)project.findProperty('testRuntimeVersion') ?: '21')
1616
def testRuntimeVendor = project.hasProperty('testRuntimeVendor') ? JvmVendorSpec.matching((String)project.property('testRuntimeVendor')): null
1717

1818
if (languageLevel > compilerVersion) {
@@ -79,17 +79,50 @@ tasks.withType(JavaCompile).configureEach {
7979
options.incremental = true
8080
options.compilerArgs << '-parameters'
8181

82-
if (name == 'compileTestJava') {
82+
if (name == 'compileJava') {
83+
if (compilerVersion != languageLevel) {
84+
options.release.set languageLevel
85+
sourceCompatibility = languageLevel
86+
targetCompatibility = languageLevel
87+
}
88+
} else {
89+
// This assumes that any JavaCompile task _not_ named 'compileJava' wants to target the testLanguageLevel.
90+
// If this does not hold in the future, we can update this logic.
8391
if (compilerVersion != testLanguageLevel) {
8492
options.release.set testLanguageLevel
93+
sourceCompatibility = testLanguageLevel
94+
targetCompatibility = testLanguageLevel
8595
}
86-
} else {
96+
}
97+
}
98+
99+
tasks.withType(GroovyCompile).configureEach {
100+
javaLauncher.set groovyCompilerLauncher
101+
102+
options.fork = true
103+
options.forkOptions.memoryMaximumSize = '2G'
104+
options.encoding = 'UTF-8'
105+
options.incremental = true
106+
options.compilerArgs << '-parameters'
107+
108+
if (name == 'compileGroovy') {
87109
if (compilerVersion != languageLevel) {
88110
options.release.set languageLevel
111+
sourceCompatibility = languageLevel
112+
targetCompatibility = languageLevel
113+
}
114+
} else {
115+
// This assumes that any GroovyCompile task _not_ named 'compileGroovy' wants to target the testLanguageLevel.
116+
// If this does not hold in the future, we can update this logic.
117+
if (compilerVersion != testLanguageLevel) {
118+
options.release.set testLanguageLevel
119+
sourceCompatibility = testLanguageLevel
120+
targetCompatibility = testLanguageLevel
89121
}
90122
}
91123
}
92124

125+
93126
def createCompilerDirectives = tasks.register('createCompilerDirectives') {
94127
def compilerDirectivesFile = project.layout.buildDirectory.file('dh-compiler-directives.txt')
95128
def compilerDirectivesText = new JsonBuilder([{
@@ -199,10 +232,6 @@ tasks.withType(Test).configureEach {
199232
jvmArgs += compilerArgs(compilerDirectivesFile.singleFile.path) + ["-XX:VMOptionsFile=${vmOptionsFile.singleFile.path}"] + START_OPTS
200233
}
201234

202-
tasks.withType(GroovyCompile).configureEach {
203-
javaLauncher.set groovyCompilerLauncher
204-
}
205-
206235
JavaApplication application = extensions.findByType(JavaApplication)
207236
if (application) {
208237
application.applicationDistribution.into('etc') {

clock-impl/build.gradle

+21-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,33 @@ dependencies {
88
implementation project(':clock')
99
compileOnly libs.autoservice
1010
annotationProcessor libs.autoservice.compiler
11+
12+
testImplementation libs.assertj
13+
testImplementation platform(libs.junit.bom)
14+
testImplementation libs.junit.jupiter
15+
testRuntimeOnly libs.junit.platform.launcher
16+
}
17+
18+
test {
19+
useJUnitPlatform()
1120
}
1221

22+
// TODO(deephaven-core#6345): Improve build process for jars that depend on JVM internals
23+
// In the meantime, we can be relatively confident this JAR works for the multiple versions of java since we do nightly
24+
// tests with a range of testRuntimeVersions.
25+
1326
tasks.withType(JavaCompile).configureEach {
1427
options.compilerArgs += ['--add-exports', 'java.base/jdk.internal.misc=ALL-UNNAMED']
15-
// Explicitly set the source compatibility so gradle will invoke javac with `-source 11` instead of `--release`
16-
sourceCompatibility = 11
28+
// Explicitly unset release so gradle will invoke javac with `-source <languageLevel> -target <languageLevel>`
29+
// instead of `--release <languageLevel>`, which would otherwise produce
30+
// > error: exporting a package from system module java.base is not allowed with --release
31+
options.release.unset()
1732
}
1833

1934
tasks.withType(Javadoc).configureEach {
2035
options.addStringOption('-add-exports', 'java.base/jdk.internal.misc=ALL-UNNAMED')
2136
}
37+
38+
tasks.withType(Test).configureEach {
39+
jvmArgs += ['--add-exports', 'java.base/jdk.internal.misc=ALL-UNNAMED']
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
//
2+
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
3+
//
4+
package io.deephaven.base.clock;
5+
6+
import org.junit.jupiter.api.BeforeEach;
7+
import org.junit.jupiter.api.Test;
8+
9+
import java.time.Instant;
10+
11+
import static org.assertj.core.api.Assertions.assertThat;
12+
13+
class SystemClockJdkInternalMiscVmTest {
14+
15+
private SystemClockJdkInternalMiscVm SUT;
16+
17+
@BeforeEach
18+
void setUp() {
19+
SUT = new SystemClockJdkInternalMiscVm();
20+
}
21+
22+
@Test
23+
void currentTimeMillis() {
24+
assertThat(SUT.currentTimeMillis()).isPositive();
25+
}
26+
27+
@Test
28+
void currentTimeMicros() {
29+
assertThat(SUT.currentTimeMicros()).isPositive();
30+
}
31+
32+
@Test
33+
void currentTimeNanos() {
34+
assertThat(SUT.currentTimeNanos()).isPositive();
35+
}
36+
37+
@Test
38+
void instantMillis() {
39+
assertThat(SUT.instantMillis()).isAfter(Instant.EPOCH);
40+
}
41+
42+
@Test
43+
void instantNanos() {
44+
assertThat(SUT.instantNanos()).isAfter(Instant.EPOCH);
45+
}
46+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending
3+
//
4+
package io.deephaven.base.clock;
5+
6+
import org.junit.jupiter.api.Test;
7+
8+
import java.lang.reflect.InvocationTargetException;
9+
10+
import static org.assertj.core.api.Assertions.assertThat;
11+
12+
class SystemClockTest {
13+
@Test
14+
void of() throws ClassNotFoundException, InvocationTargetException, NoSuchMethodException,
15+
InstantiationException, IllegalAccessException {
16+
assertThat(SystemClock.of()).isExactlyInstanceOf(SystemClockJdkInternalMiscVm.class);
17+
}
18+
19+
@Test
20+
void serviceLoader() {
21+
assertThat(SystemClock.serviceLoader()).get().isExactlyInstanceOf(SystemClockJdkInternalMiscVm.class);
22+
}
23+
}

cpp-client/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import io.deephaven.tools.docker.DiffTask
2-
31
plugins {
42
id 'com.bmuschko.docker-remote-api'
53
id 'io.deephaven.project.register'

cpp-client/deephaven/dhclient/CMakeLists.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ set(PROTO_SRC_DIR
1717
"${CMAKE_CURRENT_SOURCE_DIR}/../../../proto/proto-backplane-grpc/src/main/proto")
1818
set(PROTO_GEN_DIR
1919
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}/proto")
20-
set(PROTO_OUT_DIR "${PROTO_GEN_DIR}/deephaven/proto")
20+
set(PROTO_OUT_DIR "${PROTO_GEN_DIR}/deephaven_core/proto")
2121

2222
set(PROTO_FILES
23-
"${PROTO_SRC_DIR}/deephaven/proto/application.proto"
24-
"${PROTO_SRC_DIR}/deephaven/proto/config.proto"
25-
"${PROTO_SRC_DIR}/deephaven/proto/console.proto"
26-
"${PROTO_SRC_DIR}/deephaven/proto/hierarchicaltable.proto"
27-
"${PROTO_SRC_DIR}/deephaven/proto/inputtable.proto"
28-
"${PROTO_SRC_DIR}/deephaven/proto/object.proto"
29-
"${PROTO_SRC_DIR}/deephaven/proto/partitionedtable.proto"
30-
"${PROTO_SRC_DIR}/deephaven/proto/session.proto"
31-
"${PROTO_SRC_DIR}/deephaven/proto/storage.proto"
32-
"${PROTO_SRC_DIR}/deephaven/proto/table.proto"
33-
"${PROTO_SRC_DIR}/deephaven/proto/ticket.proto"
23+
"${PROTO_SRC_DIR}/deephaven_core/proto/application.proto"
24+
"${PROTO_SRC_DIR}/deephaven_core/proto/config.proto"
25+
"${PROTO_SRC_DIR}/deephaven_core/proto/console.proto"
26+
"${PROTO_SRC_DIR}/deephaven_core/proto/hierarchicaltable.proto"
27+
"${PROTO_SRC_DIR}/deephaven_core/proto/inputtable.proto"
28+
"${PROTO_SRC_DIR}/deephaven_core/proto/object.proto"
29+
"${PROTO_SRC_DIR}/deephaven_core/proto/partitionedtable.proto"
30+
"${PROTO_SRC_DIR}/deephaven_core/proto/session.proto"
31+
"${PROTO_SRC_DIR}/deephaven_core/proto/storage.proto"
32+
"${PROTO_SRC_DIR}/deephaven_core/proto/table.proto"
33+
"${PROTO_SRC_DIR}/deephaven_core/proto/ticket.proto"
3434
)
3535

3636
foreach(PROTO_FILE ${PROTO_FILES})

cpp-client/deephaven/dhclient/include/private/deephaven/client/impl/aggregate_impl.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#pragma once
55

66
#include <memory>
7-
#include "deephaven/proto/session.pb.h"
8-
#include "deephaven/proto/session.grpc.pb.h"
9-
#include "deephaven/proto/table.pb.h"
10-
#include "deephaven/proto/table.grpc.pb.h"
7+
#include "deephaven_core/proto/session.pb.h"
8+
#include "deephaven_core/proto/session.grpc.pb.h"
9+
#include "deephaven_core/proto/table.pb.h"
10+
#include "deephaven_core/proto/table.grpc.pb.h"
1111

1212
namespace deephaven::client::impl {
1313
class AggregateImpl {

cpp-client/deephaven/dhclient/include/private/deephaven/client/impl/table_handle_impl.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include "deephaven/dhcore/clienttable/schema.h"
1515
#include "deephaven/dhcore/ticking/ticking.h"
1616
#include "deephaven/dhcore/types.h"
17-
#include "deephaven/proto/session.pb.h"
18-
#include "deephaven/proto/session.grpc.pb.h"
19-
#include "deephaven/proto/table.pb.h"
20-
#include "deephaven/proto/table.grpc.pb.h"
17+
#include "deephaven_core/proto/session.pb.h"
18+
#include "deephaven_core/proto/session.grpc.pb.h"
19+
#include "deephaven_core/proto/table.pb.h"
20+
#include "deephaven_core/proto/table.grpc.pb.h"
2121

2222
namespace deephaven::client {
2323
class SortPair;

0 commit comments

Comments
 (0)