You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by "proost (via GitHub)" <gi...@apache.org> on 2025/11/15 12:59:15 UTC
[PR] feat: add union operation of theta sketches [datasketches-go]
proost opened a new pull request, #64:
URL: https://github.com/apache/datasketches-go/pull/64
Adding Union operation of theta sketches.
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "proost (via GitHub)" <gi...@apache.org>.
proost commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2537104913
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
But adding prefix is project or community rule, I will follow it.
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2538196842
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
Lets go with go convention here - thanks
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "proost (via GitHub)" <gi...@apache.org>.
proost commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2537104913
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
But adding prefix is project or community rule, I will follow it. Do you want still change it?
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2536788022
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
Do you mind naming this ThetaUnion (Union is too generic and this get confusing on the call site when mixing different sketch type)
(I probably missed other case like that, I ll do a pass to qualify those exported types)
Thans
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
Do you mind naming this ThetaUnion (Union is too generic and this get confusing on the call site when mixing different sketch type)
(I probably missed other case like that, I ll do a pass to qualify those exported types)
Thanks
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "proost (via GitHub)" <gi...@apache.org>.
proost commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2537099803
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
> Some context here, the name colision thing is a larger problem - for the Go repo it's going to be easier to address now than later
Yes, I agree that. But In go, always use package as accessor. And even if package name is same, user can change package name using alias when import.
refs:
https://go.dev/wiki/CodeReviewComments#package-names
https://go.dev/blog/package-names#naming-package-contents
https://go.dev/doc/effective_go#package-names
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2536797368
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
Some context here, the name colision thing is a larger problem - for the Go repo it's going to be easier to address now than later
https://lists.apache.org/thread/4c78gsls7xjrn0b4cosvppywh2clwz6x
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg merged PR #64:
URL: https://github.com/apache/datasketches-go/pull/64
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "proost (via GitHub)" <gi...@apache.org>.
proost commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2537099803
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
> Some context here, the name colision thing is a larger problem - for the Go repo it's going to be easier to address now than later
Yes, I agree that. But In go, always use package as accessor. And even if packages are conflicted, user can change package name using alias when import.
refs:
https://go.dev/wiki/CodeReviewComments#package-names
https://go.dev/blog/package-names#naming-package-contents
https://go.dev/doc/effective_go#package-names
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] feat: add union operation of theta sketches [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on code in PR #64:
URL: https://github.com/apache/datasketches-go/pull/64#discussion_r2538196842
##########
theta/union.go:
##########
@@ -0,0 +1,221 @@
+/*
+ * 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 theta
+
+import (
+ "errors"
+ "fmt"
+ "slices"
+
+ "github.com/apache/datasketches-go/internal"
+)
+
+// Union computes the union of Theta sketches.
+type Union struct {
Review Comment:
Lets go with Go convention here - thanks
--
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: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org