Skip to content
Open
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
8 changes: 5 additions & 3 deletions .github/workflows/serde_compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ jobs:
uses: actions/checkout@v5
with:
repository: apache/datasketches-java
path: java
path: datasketches-java
- name: Setup Java
uses: actions/setup-java@v5
with:
java-version: '25'
distribution: 'temurin'
- name: Run Java
run: cd java && mvn test -P generate-java-files
run: cd datasketches-java && mvn test -P generate-java-files
- name: Copy files
run: cp java/serialization_test_data/java_generated_files/*.sk java
run: |
mkdir -p serialization_test_data/java_generated_files
cp datasketches-java/serialization_test_data/java_generated_files/*.sk serialization_test_data/java_generated_files
- name: Run cmake
run: cd build && cmake .. -DSERDE_COMPAT=true
- name: Build C++ unit tests
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ _*/
!__init__.py

docs
java
# Cross-language test data: sketch snapshots and the datasketches-java checkout used to generate them
serialization_test_data/
datasketches-java/
*.sk
4 changes: 2 additions & 2 deletions cpc/test/cpc_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("cpc sketch", "[serde_compat]") {
const unsigned n_arr[] = {0, 100, 200, 2000, 20000};
Expand Down
4 changes: 2 additions & 2 deletions fi/test/frequent_items_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("frequent longs", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions filters/test/bloom_filter_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("bloom_filter", "[serde_compat]") {
const uint64_t n_arr[] = {0, 10000, 2000000, 30000000};
Expand Down
4 changes: 2 additions & 2 deletions hll/test/hll_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("hll4 sketch", "[serde_compat]") {
const unsigned n_arr[] = {0, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions kll/test/kll_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("kll float", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("quantiles double", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions req/test/req_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("req float", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions sampling/test/var_opt_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("var opt sketch long", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions sampling/test/var_opt_union_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("var opt union double", "[serde_compat]") {
const double EPS = 1e-13;
Expand Down
4 changes: 2 additions & 2 deletions tdigest/test/tdigest_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("tdigest double", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions theta/test/theta_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("theta sketch", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions tuple/test/aod_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("aod sketch one value", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
4 changes: 2 additions & 2 deletions tuple/test/tuple_sketch_deserialize_from_java_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
namespace datasketches {

// assume the binary sketches for this test have been generated by datasketches-java code
// in the subdirectory called "java" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
// in the subdirectory "serialization_test_data/java_generated_files" in the root directory of this project
static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../serialization_test_data/java_generated_files/";

TEST_CASE("tuple sketch int", "[serde_compat]") {
const unsigned n_arr[] = {0, 1, 10, 100, 1000, 10000, 100000, 1000000};
Expand Down
Loading