Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into fix-non-determinist…
Browse files Browse the repository at this point in the history
…ic-parquet-read
  • Loading branch information
devinrsmith committed Nov 6, 2023
2 parents 95fe9a1 + ab5ea92 commit 7196669
Show file tree
Hide file tree
Showing 143 changed files with 5,377 additions and 775 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
with:
ref: main
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Get web versions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public interface ExceptionHandler {
*/
private volatile ReferenceQueue<?> referenceQueue;

/**
* The cleaner thread from the most recent initialization, guarded by the lock on {@code this}.
*/
private Thread cleanerThread;

/**
* Construct a new {@link CleanupReferenceProcessor}.
*
Expand Down Expand Up @@ -75,7 +80,7 @@ public <RT> ReferenceQueue<RT> getReferenceQueue() {
synchronized (this) {
if ((localQueue = referenceQueue) == null) {
referenceQueue = localQueue = new ReferenceQueue<>();
final Thread cleanerThread = new Thread(new DrainQueue(localQueue),
cleanerThread = new Thread(new DrainQueue(localQueue),
"CleanupReferenceProcessor-" + name + "-drainingThread");
cleanerThread.setDaemon(true);
cleanerThread.start();
Expand All @@ -88,11 +93,15 @@ public <RT> ReferenceQueue<RT> getReferenceQueue() {

/**
* Reset this instance so that the next call to {@link #getReferenceQueue()} will re-initialize it and provide a new
* queue. Results in eventual termination of the daemon thread that may have been draining the existing queue.
* queue. Results in the prompt termination of the daemon thread that may have been draining the existing queue.
*/
@TestUseOnly
public final synchronized void resetForUnitTests() {
referenceQueue = null;
if (cleanerThread != null) {
cleanerThread.interrupt();
cleanerThread = null;
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,9 @@ public void onCallStartedMessageStream(AuthContext authContext) {}

public void onMessageReceivedMessageStream(AuthContext authContext, StreamRequest request) {}

public void onMessageReceivedOpenMessageStream(AuthContext authContext,
StreamRequest request) {}
public void onMessageReceivedOpenMessageStream(AuthContext authContext, StreamRequest request) {}

public void onMessageReceivedNextMessageStream(AuthContext authContext,
StreamRequest request) {}
public void onMessageReceivedNextMessageStream(AuthContext authContext, StreamRequest request) {}
}

class DenyAll implements ObjectServiceAuthWiring {
Expand All @@ -112,13 +110,11 @@ public void onMessageReceivedMessageStream(AuthContext authContext, StreamReques
ServiceAuthWiring.operationNotAllowed();
}

public void onMessageReceivedOpenMessageStream(AuthContext authContext,
StreamRequest request) {
public void onMessageReceivedOpenMessageStream(AuthContext authContext, StreamRequest request) {
ServiceAuthWiring.operationNotAllowed();
}

public void onMessageReceivedNextMessageStream(AuthContext authContext,
StreamRequest request) {
public void onMessageReceivedNextMessageStream(AuthContext authContext, StreamRequest request) {
ServiceAuthWiring.operationNotAllowed();
}
}
Expand All @@ -144,15 +140,13 @@ public void onMessageReceivedMessageStream(AuthContext authContext, StreamReques
}
}

public void onMessageReceivedOpenMessageStream(AuthContext authContext,
StreamRequest request) {
public void onMessageReceivedOpenMessageStream(AuthContext authContext, StreamRequest request) {
if (delegate != null) {
delegate.onMessageReceivedOpenMessageStream(authContext, request);
}
}

public void onMessageReceivedNextMessageStream(AuthContext authContext,
StreamRequest request) {
public void onMessageReceivedNextMessageStream(AuthContext authContext, StreamRequest request) {
if (delegate != null) {
delegate.onMessageReceivedNextMessageStream(authContext, request);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io.deephaven.proto.backplane.grpc.AjRajTablesRequest;
import io.deephaven.proto.backplane.grpc.ApplyPreviewColumnsRequest;
import io.deephaven.proto.backplane.grpc.AsOfJoinTablesRequest;
import io.deephaven.proto.backplane.grpc.ColumnStatisticsRequest;
import io.deephaven.proto.backplane.grpc.ComboAggregateRequest;
import io.deephaven.proto.backplane.grpc.CreateInputTableRequest;
import io.deephaven.proto.backplane.grpc.CrossJoinTablesRequest;
Expand Down Expand Up @@ -514,6 +515,17 @@ void checkPermissionSeekRow(AuthContext authContext, SeekRowRequest request,
void checkPermissionMetaTable(AuthContext authContext, MetaTableRequest request,
List<Table> sourceTables);

/**
* Authorize a request to ComputeColumnStatistics.
*
* @param authContext the authentication context of the request
* @param request the request to authorize
* @param sourceTables the operation's source tables
* @throws io.grpc.StatusRuntimeException if the user is not authorized to invoke ComputeColumnStatistics
*/
void checkPermissionComputeColumnStatistics(AuthContext authContext,
ColumnStatisticsRequest request, List<Table> sourceTables);

/**
* A default implementation that funnels all requests to invoke {@code checkPermission}.
*/
Expand Down Expand Up @@ -729,6 +741,11 @@ public void checkPermissionMetaTable(AuthContext authContext, MetaTableRequest r
List<Table> sourceTables) {
checkPermission(authContext, sourceTables);
}

public void checkPermissionComputeColumnStatistics(AuthContext authContext,
ColumnStatisticsRequest request, List<Table> sourceTables) {
checkPermission(authContext, sourceTables);
}
}

/**
Expand Down Expand Up @@ -1045,5 +1062,12 @@ public void checkPermissionMetaTable(AuthContext authContext, MetaTableRequest r
delegate.checkPermissionMetaTable(authContext, request, sourceTables);
}
}

public void checkPermissionComputeColumnStatistics(AuthContext authContext,
ColumnStatisticsRequest request, List<Table> sourceTables) {
if (delegate != null) {
delegate.checkPermissionComputeColumnStatistics(authContext, request, sourceTables);
}
}
}
}
4 changes: 2 additions & 2 deletions cpp-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on them anymore so we do notguarantee they are current for those platforms.
Get the `build-dependencies.sh` script from Deephaven's base images repository
at the correct version.
You can download it directly from the link
https://github.com/deephaven/deephaven-base-images/raw/fcef110f22e69849cbcac00b09128809a1d0786b/cpp-client/build-dependencies.sh
https://github.com/deephaven/deephaven-base-images/raw/23c18c77e4a2431ef7403dd3c96336bd3ecf77d3/cpp-client/build-dependencies.sh
(this script is also used from our automated tools, to generate a docker image to
support tests runs; that's why it lives in a separate repo).
The script downloads, builds and installs the dependent libraries
Expand All @@ -64,7 +64,7 @@ on them anymore so we do notguarantee they are current for those platforms.
# If the directory already exists from a previous attempt, ensure is clean/empty
mkdir -p $DHCPP
cd $DHCPP
wget https://github.com/deephaven/deephaven-base-images/raw/fcef110f22e69849cbcac00b09128809a1d0786b/cpp-client/build-dependencies.sh
wget https://github.com/deephaven/deephaven-base-images/raw/23c18c77e4a2431ef7403dd3c96336bd3ecf77d3/cpp-client/build-dependencies.sh
chmod +x ./build-dependencies.sh
# Maybe edit build-dependencies.sh to reflect choices of build tools and build target, if you
# want anything different than defaults; defaults are tested to work,
Expand Down
5 changes: 2 additions & 3 deletions cpp-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ def buildCppClientImage = Docker.registerDockerTask(project, 'cppClient') {
runCommand("""mkdir -p \\
/out \\
${prefix}/bin/dhcpp \\
${prefix}/log \\
${prefix}/src/deephaven/{dhcore,dhclient,examples,tests}
${prefix}/log
""")
copyFile('deephaven/CMakeLists.txt', "${prefix}/src/deephaven/")
copyFile('deephaven/dhcore/', "${prefix}/src/deephaven/dhcore/")
Expand All @@ -106,7 +105,7 @@ def buildCppClientImage = Docker.registerDockerTask(project, 'cppClient') {
-DCMAKE_BUILD_TYPE=Release \\
-DBUILD_SHARED_LIBS=ON \\
.. ; \\
make -j${NCPUS} install 2>&1 | gzip > ${PREFIX}/log/make-install.log.gz; \\
VERBOSE=1 make -j${NCPUS} install 2>&1 | gzip > ${PREFIX}/log/make-install.log.gz; \\
cp -f ${PREFIX}/src/deephaven/build/tests/tests ${PREFIX}/bin/dhcpp/tests; \\
cd ..; \\
rm -fr ${PREFIX}/src/deephaven/build
Expand Down
2 changes: 1 addition & 1 deletion cpp-client/deephaven/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install(DIRECTORY dhcore/include/public/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

install(TARGETS dhclient dhcore
install(TARGETS dhclient dhcore_static dhcore
EXPORT deephavenConfig
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#pragma once

#include <string>
#include <string_view>
#include <arrow/type.h>
#include <arrow/util/string_view.h>
#include "deephaven/dhcore/types.h"

namespace deephaven::client::arrowutil {
Expand All @@ -22,7 +22,7 @@ class ArrowValueConverter {
/**
* The "Convert" function for string_view is std::string
*/
static void Convert(arrow::util::string_view sv, std::string *dest) {
static void Convert(std::string_view sv, std::string *dest) {
dest->clear();
dest->append(sv.data(), sv.size());
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7196669

Please sign in to comment.