[
https://issues.apache.org/jira/browse/BEAM-11611?focusedWorklogId=550870&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-550870
]
ASF GitHub Bot logged work on BEAM-11611:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/21 19:28
Start Date: 10/Feb/21 19:28
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #13889:
URL: https://github.com/apache/beam/pull/13889#discussion_r574013474
##########
File path: sdks/go/pkg/beam/transforms/stats/quantiles_test.go
##########
@@ -0,0 +1,291 @@
+// 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 stats
+
+import (
+ "reflect"
+ "testing"
+
+ "github.com/apache/beam/sdks/go/pkg/beam"
+ "github.com/apache/beam/sdks/go/pkg/beam/core/util/reflectx"
+ "github.com/apache/beam/sdks/go/pkg/beam/testing/passert"
+ "github.com/apache/beam/sdks/go/pkg/beam/testing/ptest"
+)
+
+func init() {
+ beam.RegisterFunction(weightedElementToKv)
+
+ // In practice, this runs faster than plain reflection.
Review comment:
In this case, I'd add a comment `// TODO(BEAM-9616): Remove once
collisions don't occur for starcgen over test code and an equivalent is
generated for us.`
To be clear, the code you've got is fine. The hook is being correctly used,
and my repo knows I wrote many of these things manually before getting the code
generator functional. Ideally manual uses of these don't need to exist, and
they're all generated. Go Generics, once they exists (in hopefully 1.18 next
year) will allow the code generator to be largely replaced with generic
implementations instead, and then everything can happen at compile time instead.
[BEAM-9616 ](https://issues.apache.org/jira/browse/BEAM-9616) is the grab
bag umbrella for various bugs and improvements that need to be done to starcgen
to make it more robust.
And it's not an "already runs" thing. Go generate statements are never
automatically called by the go build system, and never by package users, always
by package authors. The starcgen tool is so that Beam users can improve the
performance of their own code with their own go generate statements, which
they'd need to call as befits their development set up. See
https://blog.golang.org/generate for more information.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 550870)
Time Spent: 1.5h (was: 1h 20m)
> ApproximateQuantiles transform for Go SDK
> -----------------------------------------
>
> Key: BEAM-11611
> URL: https://issues.apache.org/jira/browse/BEAM-11611
> Project: Beam
> Issue Type: New Feature
> Components: sdk-go
> Reporter: John Edmonds
> Assignee: John Edmonds
> Priority: P3
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> The ApproximateQuantiles transform exists for the Java and Python SDKs. We
> should implement this transformation for the Go SDK.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)