[
https://issues.apache.org/jira/browse/BEAM-12548?focusedWorklogId=620618&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-620618
]
ASF GitHub Bot logged work on BEAM-12548:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Jul/21 17:30
Start Date: 08/Jul/21 17:30
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #15141:
URL: https://github.com/apache/beam/pull/15141#discussion_r666388890
##########
File path: sdks/go/pkg/beam/testing/passert/passert_test.go
##########
@@ -0,0 +1,126 @@
+// 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 passert
+
+import (
+ "strings"
+ "testing"
+
+ "github.com/apache/beam/sdks/go/pkg/beam"
+ "github.com/apache/beam/sdks/go/pkg/beam/testing/ptest"
+)
+
+func TestTrue_string(t *testing.T) {
+ p, s := beam.NewPipelineWithRoot()
+ col := beam.Create(s, "a", "a", "a")
+ pred := func(input string) bool {
Review comment:
While DoFns and PCollections should definitely have variables attached,
since the predicate here is small, and it's the final parameter of the True
call, it can be defined inline without hurting readability.
Same comment for the cases below.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 620618)
Time Spent: 4h 10m (was: 4h)
> [Go SDK] PAssert improvements
> -----------------------------
>
> Key: BEAM-12548
> URL: https://issues.apache.org/jira/browse/BEAM-12548
> Project: Beam
> Issue Type: Improvement
> Components: sdk-go
> Reporter: Robert Burke
> Assignee: Jack McCluskey
> Priority: P2
> Time Spent: 4h 10m
> Remaining Estimate: 0h
>
> The Go SDK Passert package could be more helpful.
> It could haveĀ GoDoc examples for correct and less clear use of each of the
> functions (like both the variadic and PCollection approaches forĀ
> passert.Equals).
> There could be better/more sophisticated handling for floating point values,
> eg with thresholds.
> There could be special/magic handling for synthetic KV types that could then
> be used for handling Equals against KV PCollections.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)