Fengzdadi commented on code in PR #94:
URL: https://github.com/apache/datasketches-go/pull/94#discussion_r2684763073


##########
sampling/compatibility_test.go:
##########
@@ -0,0 +1,287 @@
+/*
+ * 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.
+ */
+
+package sampling
+
+import (
+       "fmt"
+       "os"
+       "path/filepath"
+       "testing"
+
+       "github.com/apache/datasketches-go/internal"
+       "github.com/stretchr/testify/assert"
+)
+
+// TestGenerateGoBinariesForCompatibilityTesting generates serialization test 
data.
+// This test is skipped unless DSKETCH_TEST_GENERATE_GO environment variable 
is set.
+// Run with: DSKETCH_TEST_GENERATE_GO=1 go test -v -run TestGenerateGoBinaries
+func TestGenerateGoBinariesForCompatibilityTesting(t *testing.T) {

Review Comment:
   Hi @proost,
   
   I notice Java PR #714 generates 36 files covering both 
`ReservoirLongsSketch` and `ReservoirItemsSketch<Long/Double/String>`.
   
   However, as @jmalkin mentioned in 
https://github.com/apache/datasketches-go/issues/90#issuecomment-3707563495:
   
   > "There's no need for the longs sketch if there's a generic version. It was 
just done in java to ensure everything was working correctly prior to making a 
generic sampling sketch."
   
   Since Go only has the generic `ReservoirItemsSketch[T]` , should I generate 
only the **27 files** for the generic types (Long, Double, String × 9 each), 
without the separate `ReservoirLongsSketch` files?
   
   In other words:
   - ✅ `reservoir_items_long_*_go.sk` (9 files)
   - ✅ `reservoir_items_double_*_go.sk` (9 files)
   - ✅ `reservoir_items_string_*_go.sk` (9 files)
   - ❌ `reservoir_longs_*_go.sk` (not needed, same as items_long)
   
   Please confirm, and I'll update the test data generation accordingly.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to