You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by "jmalkin (via GitHub)" <gi...@apache.org> on 2023/07/24 22:21:07 UTC

[GitHub] [datasketches-cpp] jmalkin commented on a diff in pull request #387: test deserialize sketches from Java

jmalkin commented on code in PR #387:
URL: https://github.com/apache/datasketches-cpp/pull/387#discussion_r1272803463


##########
.github/workflows/serde_compat.yml:
##########
@@ -0,0 +1,27 @@
+name: Java SerDe Compatibility Test
+
+on:
+  push:
+    branches:
+      - master

Review Comment:
   do we want a manual trigger option for if we're trying to update serialization in a sketch, without needing to open a PR?



##########
cpc/test/cpc_sketch_deserialize_from_java_test.cpp:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <catch2/catch.hpp>
+#include <fstream>
+#include <cpc_sketch.hpp>
+
+namespace datasketches {
+
+static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";
+
+TEST_CASE("cpc sketch", "[serde_compat]") {
+  unsigned n_arr[] = {0, 100, 200, 2000, 20000};

Review Comment:
   maybe not currently feasible but it'd be good not to need to coordinate hard-coded arrays between language repos if possible



##########
cpc/test/cpc_sketch_deserialize_from_java_test.cpp:
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <catch2/catch.hpp>
+#include <fstream>
+#include <cpc_sketch.hpp>
+
+namespace datasketches {
+
+static std::string testBinaryInputPath = std::string(TEST_BINARY_INPUT_PATH) + "../../java/";

Review Comment:
   This needs more description since it should be clear how to run it locally.
   
   This works by running the java tests and just leaving files in the top level directory of that repo?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org