You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/02/07 18:50:24 UTC
[GitHub] [beam] zhoufek opened a new pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
zhoufek opened a new pull request #16762:
URL: https://github.com/apache/beam/pull/16762
This gets a basic schema representation started to the SBE extension. It focuses on IR, since it's easier to work with and is in the most immediate need.
It's technically possible to generate a Beam schema and `PayloadSerializer` from this, but I'm saving that for a future PR. Otherwise, this works with very simple schemas.
This doesn't translate directly to a Beam schema, since using an IR doesn't support encoding (i.e. there's an `OtfDecoder` but no `OtfEncoder`, which is understandable). If we ever get a request to do SBE encoding from an IR, we'll need to implement it ourselves, so this is set up to easily start tracking additional info if it ever comes to that.
The decision was also made to let users set how to handle unsigned types, which is a deviation from the original plan, but I don't think it was ever firmly established if forcing a higher bit count was acceptable.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
- [x] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
`ValidatesRunner` compliance status (on master branch)
--------------------------------------------------------
<table>
<thead>
<tr>
<th>Lang</th>
<th>ULR</th>
<th>Dataflow</th>
<th>Flink</th>
<th>Samza</th>
<th>Spark</th>
<th>Twister2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Go</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon">
</a>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Samza/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
</tr>
<tr>
<td>Java</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_ULR/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_ULR/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon?subject=V1">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Streaming/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Streaming/lastCompletedBuild/badge/icon?subject=V1+Streaming">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/badge/icon?subject=V1+Java+11">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2/lastCompletedBuild/badge/icon?subject=V2">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2_Streaming/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2_Streaming/lastCompletedBuild/badge/icon?subject=V2+Streaming">
</a><br>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon?subject=Java+8">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/badge/icon?subject=Java+11">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon?subject=Portable">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon?subject=Portable+Streaming">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Samza/lastCompletedBuild/badge/icon?subject=Portable">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/badge/icon?subject=Portable">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/badge/icon?subject=Structured+Streaming">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Twister2/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Twister2/lastCompletedBuild/badge/icon">
</a>
</td>
</tr>
<tr>
<td>Python</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon?subject=V1">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Py_VR_Dataflow_V2/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Py_VR_Dataflow_V2/lastCompletedBuild/badge/icon?subject=V2">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon?subject=ValCont">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Python_PVR_Flink_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Python_PVR_Flink_Cron/lastCompletedBuild/badge/icon?subject=Portable">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Samza/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
</tr>
<tr>
<td>XLang</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Direct/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Direct/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_PythonUsingJava_Dataflow/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_PythonUsingJava_Dataflow/lastCompletedBuild/badge/icon">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_PythonUsingJavaSQL_Dataflow/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_PythonUsingJavaSQL_Dataflow/lastCompletedBuild/badge/icon">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_JavaUsingPython_Dataflow/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_JavaUsingPython_Dataflow/lastCompletedBuild/badge/icon">
</a><br>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Samza/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Samza/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
</tr>
</tbody>
</table>
Examples testing status on various runners
--------------------------------------------------------
<table>
<thead>
<tr>
<th>Lang</th>
<th>ULR</th>
<th>Dataflow</th>
<th>Flink</th>
<th>Samza</th>
<th>Spark</th>
<th>Twister2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Go</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
<tr>
<td>Java</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Java_Examples_Dataflow_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Java_Examples_Dataflow_Cron/lastCompletedBuild/badge/icon?subject=V1">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Java_Examples_Dataflow_Java11_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Java_Examples_Dataflow_Java11_Cron/lastCompletedBuild/badge/icon?subject=V1+Java11">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java_Examples_Dataflow_V2/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java_Examples_Dataflow_V2/lastCompletedBuild/badge/icon?subject=V2">
</a><br>
</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
<tr>
<td>Python</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
<tr>
<td>XLang</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
</tbody>
</table>
Post-Commit SDK/Transform Integration Tests Status (on master branch)
------------------------------------------------------------------------------------------------
<table>
<thead>
<tr>
<th>Go</th>
<th>Java</th>
<th>Python</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/badge/icon?subject=3.6">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/badge/icon?subject=3.7">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PostCommit_Python38/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PostCommit_Python38/lastCompletedBuild/badge/icon?subject=3.8">
</a>
</td>
</tr>
</tbody>
</table>
Pre-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
<table>
<thead>
<tr>
<th>---</th>
<th>Java</th>
<th>Python</th>
<th>Go</th>
<th>Website</th>
<th>Whitespace</th>
<th>Typescript</th>
</tr>
</thead>
<tbody>
<tr>
<td>Non-portable</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/badge/icon">
</a><br>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/badge/icon?subject=Tests">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/badge/icon?subject=Lint">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_PythonDocker_Cron/badge/icon?subject=Docker">
</a><br>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_PythonDocs_Cron/badge/icon?subject=Docs">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Whitespace_Cron/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Typescript_Cron/lastCompletedBuild/badge/icon">
</a>
</td>
</tr>
<tr>
<td>Portable</td>
<td>---</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/badge/icon">
</a>
</td>
<td>
<a href="https://ci-beam.apache.org/job/beam_PreCommit_GoPortable_Cron/lastCompletedBuild/">
<img alt="Build Status" src="https://ci-beam.apache.org/job/beam_PreCommit_GoPortable_Cron/lastCompletedBuild/badge/icon">
</a>
</td>
<td>---</td>
<td>---</td>
<td>---</td>
</tr>
</tbody>
</table>
See [.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md) for trigger phrase, status and link of all Jenkins jobs.
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r810324040
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
+
+ /**
+ * Returns options for using the same bit size for all unsigned types.
+ *
+ * <p>This means that if an unsigned value from SBE comes in with a value outside the signed
+ * range, then the negative equivalent (in terms of bits) will be used.
+ */
+ public static UnsignedOptions usingSameBitSize() {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(false)
+ .setUseMoreBitsForUint16(false)
+ .setUseMoreBitsForUint32(false)
+ .setUseStringForUint64(false)
+ .build();
+ }
+
+ /**
+ * Returns options for using a higher bit count for unsigned types.
+ *
+ * <p>This means that if an unsigned value is encountered, it will always use the higher bit
+ * count, even if that higher bit count is unnecessary. However, this means that if it is
+ * necessary, then the proper value will be returned rather than the negative equivalent (in
+ * terms of bits).
+ *
+ * <p>The {@code includeUint64} controls the behavior of 64-bit values, since no properly
+ * higher-bit-numeric type exists. If true, then this will be converted into a string that must
+ * be parsed if intended to be used as a number. Otherwise, it will still be a 64-bit type and
+ * may return negative values.
+ */
+ public static UnsignedOptions usingHigherBitSize(boolean includeUint64) {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(true)
+ .setUseMoreBitsForUint16(true)
+ .setUseMoreBitsForUint32(true)
+ .setUseStringForUint64(includeUint64)
+ .build();
+ }
+
+ public static Builder builder() {
+ return new AutoValue_SbeSchema_UnsignedOptions.Builder();
+ }
+
+ /** Builder for {@link UnsignedOptions}. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+
+ public abstract Builder setUseMoreBitsForUint8(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint16(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint32(Boolean value);
+
+ public abstract Builder setUseStringForUint64(Boolean value);
+
+ public abstract UnsignedOptions build();
+ }
+ }
+
+ /**
+ * Options for configuring schema generation from an {@link Ir}.
+ *
+ * <p>The default options make the following assumptions:
+ *
+ * <ul>
+ * <p>There is only message in the XML schema. In order to override this, either {@link
+ * IrOptions#messageId()} or {@link IrOptions#messageName()} must be set, but not both.
+ * </ul>
+ */
+ @AutoValue
+ public abstract static class IrOptions implements Serializable {
Review comment:
At least for the initial option, I don't think that would work. An IR could contain many messages, but a `Schema` would be for a single one. These initial options of id and name are needed to generate the `Schema` object in case there's more than one message in the IR.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/transforms/stats/quantiles.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3F1YW50aWxlcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/coderx/float.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L2Zsb2F0Lmdv) | | |
| [...pkg/beam/core/runtime/xlangx/expansionx/process.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L2V4cGFuc2lvbngvcHJvY2Vzcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/tree.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3RyZWUuZ28=) | | |
| [...ks/go/pkg/beam/runners/dataflow/dataflowlib/job.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL2pvYi5nbw==) | | |
| [sdks/go/pkg/beam/windowing.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS93aW5kb3dpbmcuZ28=) | | |
| [sdks/go/pkg/beam/io/datastoreio/datastore.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhc3RvcmVpby9kYXRhc3RvcmUuZ28=) | | |
| [sdks/go/pkg/beam/util/harnessopts/cache.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsL2hhcm5lc3NvcHRzL2NhY2hlLmdv) | | |
| [sdks/go/pkg/beam/runners/direct/buffer.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9idWZmZXIuZ28=) | | |
| [sdks/go/pkg/beam/transforms/filter/filter.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9maWx0ZXIuc2hpbXMuZ28=) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1059188333
Looks like the Java precommit errors are unrelated based on this line:
> Task :runners:direct-java:needsRunnerTests FAILED
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../pkg/beam/runners/universal/extworker/extworker.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3VuaXZlcnNhbC9leHR3b3JrZXIvZXh0d29ya2VyLmdv) | | |
| [sdks/go/pkg/beam/transforms/filter/filter.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9maWx0ZXIuc2hpbXMuZ28=) | | |
| [.../go/pkg/beam/runners/dataflow/dataflowlib/fixup.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL2ZpeHVwLmdv) | | |
| [sdks/go/pkg/beam/beam.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9iZWFtLnNoaW1zLmdv) | | |
| [sdks/go/pkg/beam/io/textio/sdf.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby90ZXh0aW8vc2RmLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/fn.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbi5nbw==) | | |
| [sdks/go/pkg/beam/testing/passert/equals.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvZXF1YWxzLmdv) | | |
| [sdks/go/pkg/beam/forward.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9mb3J3YXJkLmdv) | | |
| [sdks/go/pkg/beam/core/graph/xlang.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL3hsYW5nLmdv) | | |
| [sdks/go/pkg/beam/internal/errors/errors.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbnRlcm5hbC9lcnJvcnMvZXJyb3JzLmdv) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb2Rlci5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/payload.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L3BheWxvYWQuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/internal/errors/errors.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbnRlcm5hbC9lcnJvcnMvZXJyb3JzLmdv) | | |
| [sdks/go/pkg/beam/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsLmdv) | | |
| [sdks/go/pkg/beam/testing/passert/floats.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvZmxvYXRzLmdv) | | |
| [sdks/go/pkg/beam/core/util/reflectx/calls.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvY2FsbHMuZ28=) | | |
| [sdks/go/pkg/beam/core/funcx/output.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L291dHB1dC5nbw==) | | |
| [...pkg/beam/core/runtime/xlangx/expansionx/process.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L2V4cGFuc2lvbngvcHJvY2Vzcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZGVyLmdv) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../go/pkg/beam/core/graph/coder/testutil/testutil.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Rlc3R1dGlsL3Rlc3R1dGlsLmdv) | | |
| [sdks/go/pkg/beam/transforms/top/top.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3RvcC90b3AuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/io/datastoreio/datastore.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhc3RvcmVpby9kYXRhc3RvcmUuZ28=) | | |
| [sdks/go/pkg/beam/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/testing/passert/hash.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvaGFzaC5nbw==) | | |
| [sdks/go/pkg/beam/transforms/filter/filter.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9maWx0ZXIuZ28=) | | |
| [sdks/go/pkg/beam/testing/teststream/teststream.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Rlc3RzdHJlYW0vdGVzdHN0cmVhbS5nbw==) | | |
| [sdks/go/pkg/beam/testing/passert/passert.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvcGFzc2VydC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031898516
R: @TheNeuralBit
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../go/pkg/beam/core/graph/coder/testutil/testutil.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Rlc3R1dGlsL3Rlc3R1dGlsLmdv) | | |
| [sdks/go/pkg/beam/transforms/top/top.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3RvcC90b3AuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/io/datastoreio/datastore.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhc3RvcmVpby9kYXRhc3RvcmUuZ28=) | | |
| [sdks/go/pkg/beam/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/testing/passert/hash.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvaGFzaC5nbw==) | | |
| [sdks/go/pkg/beam/transforms/filter/filter.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9maWx0ZXIuZ28=) | | |
| [sdks/go/pkg/beam/testing/teststream/teststream.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Rlc3RzdHJlYW0vdGVzdHN0cmVhbS5nbw==) | | |
| [sdks/go/pkg/beam/testing/passert/passert.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvcGFzc2VydC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/transforms/top/top.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3RvcC90b3Auc2hpbXMuZ28=) | | |
| [sdks/go/pkg/beam/core/util/reflectx/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvdXRpbC5nbw==) | | |
| [sdks/go/pkg/beam/core/typex/class.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3R5cGV4L2NsYXNzLmdv) | | |
| [sdks/go/pkg/beam/runners/direct/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/core/metrics/store.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL21ldHJpY3Mvc3RvcmUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/coderx/float.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L2Zsb2F0Lmdv) | | |
| [sdks/go/pkg/beam/io/synthetic/step.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9zeW50aGV0aWMvc3RlcC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L3JlZ2lzdHJ5Lmdv) | | |
| [sdks/go/pkg/beam/core/util/protox/base64.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcHJvdG94L2Jhc2U2NC5nbw==) | | |
| [sdks/go/pkg/beam/core/util/hooks/hooks.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvaG9va3MvaG9va3MuZ28=) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r833283787
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/IrFieldGenerator.java
##########
@@ -0,0 +1,146 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static java.util.stream.Collectors.collectingAndThen;
+import static java.util.stream.Collectors.toList;
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
+
+import java.util.Iterator;
+import java.util.List;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.extensions.sbe.SbeSchema.IrOptions;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import uk.co.real_logic.sbe.ir.Encoding.Presence;
+import uk.co.real_logic.sbe.ir.Ir;
+import uk.co.real_logic.sbe.ir.Token;
+
+/** Utility for generating {@link SbeField}s from an {@link Ir}. */
+@Experimental(Kind.SCHEMAS)
+public final class IrFieldGenerator {
Review comment:
I just forgot to remove the `public` that IntelliJ added. Same goes for the other classes mentioned.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1076537699
`codecov/project/go` is still running 1.5 hours later. I'll go ahead and merge though. That check is not relevant for this PR.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/transforms/stats/quantiles.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3F1YW50aWxlcy5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/mean.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21lYW4uZ28=) | | |
| [sdks/go/pkg/beam/io/filesystem/memfs/memory.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL21lbWZzL21lbW9yeS5nbw==) | | |
| [sdks/go/pkg/beam/core/util/reflectx/structs.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvc3RydWN0cy5nbw==) | | |
| [sdks/go/pkg/beam/testing/passert/equals.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvZXF1YWxzLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/emit.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9lbWl0Lmdv) | | |
| [sdks/go/pkg/beam/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/io/filesystem/filesystem.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2ZpbGVzeXN0ZW0uZ28=) | | |
| [sdks/go/pkg/beam/runners/direct/buffer.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9idWZmZXIuZ28=) | | |
| [sdks/go/pkg/beam/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJkby5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r832429448
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,169 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
Review comment:
nit: `{@link IrOptions}` is already directing users here
```suggestion
* required.
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r833282640
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/PrimitiveSbeField.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import com.google.auto.value.AutoValue;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.extensions.sbe.UnsignedOptions.Behavior;
+import org.apache.beam.sdk.schemas.Schema.Field;
+import org.apache.beam.sdk.schemas.Schema.FieldType;
+import uk.co.real_logic.sbe.PrimitiveType;
+
+/** Represents a primitive SBE field. */
+@Experimental(Kind.SCHEMAS)
+@AutoValue
+public abstract class PrimitiveSbeField implements SbeField {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public abstract String name();
+
+ @Override
+ public abstract Boolean isRequired();
+
+ public abstract PrimitiveType type();
+
+ @Override
+ public Field asBeamField(SbeFieldOptions options) {
+ FieldType type = beamType(options);
+ return isRequired() ? Field.of(name(), type) : Field.nullable(name(), type);
+ }
+
+ private FieldType beamType(SbeFieldOptions options) {
+ switch (type()) {
+ case CHAR:
+ // TODO(BEAM-12697): Support char types
+ throw new UnsupportedOperationException("char type not supported yet");
Review comment:
Done.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/harness/datamgr.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9kYXRhbWdyLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZGVyLmdv) | | |
| [sdks/go/pkg/beam/util/harnessopts/cache.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsL2hhcm5lc3NvcHRzL2NhY2hlLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/varint.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3ZhcmludC5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/sum\_switch.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3N1bV9zd2l0Y2guZ28=) | | |
| [sdks/go/pkg/beam/runners/direct/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9jb2Rlci5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy91dGlsLmdv) | | |
| [sdks/go/pkg/beam/core/metrics/store.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL21ldHJpY3Mvc3RvcmUuZ28=) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r810282399
##########
File path: buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -656,6 +657,7 @@ class BeamModulePlugin implements Plugin<Project> {
proto_google_cloud_spanner_v1 : "com.google.api.grpc:proto-google-cloud-spanner-v1", // google_cloud_platform_libraries_bom sets version
proto_google_cloud_spanner_admin_database_v1: "com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1", // google_cloud_platform_libraries_bom sets version
proto_google_common_protos : "com.google.api.grpc:proto-google-common-protos", // google_cloud_platform_libraries_bom sets version
+ sbe_tool : "uk.co.real-logic:sbe-tool:$sbe_tool_version",
Review comment:
Does the real logic SBE implementation have an acceptable licesnse?
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
Review comment:
nit: wouldn't this be more straightforward?
```suggestion
* {@code byte[]} output from the {@link PayloadSerializer} will be from a JSON
```
I'm a little confused by this statement in general, how would a user create a `PayloadSerializerProvider` that produces JSON? Are you suggesting they would take a Schema generated from SBE and pass it to the `JsonPayloadSerializerProvider`?
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
Review comment:
+1 on making this configurable!
I'd prefer enumerated types over booleans here though. Booleans are restricted to two options and can't be expanded without a major refactor, but if these were enums you could easily add another option in the future (e.g. maybe map to BigDecimal or floating point). I'd suggest having an option for each bit width with the same enumerated settings like "COERCE_TO_UNSINGED", "HIGHER _BITWDITH_SIGNED", "STRING". HIGHER_BITWIDTH_SIGNED could raise for Uint64.
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
+
+ /**
+ * Returns options for using the same bit size for all unsigned types.
+ *
+ * <p>This means that if an unsigned value from SBE comes in with a value outside the signed
+ * range, then the negative equivalent (in terms of bits) will be used.
+ */
+ public static UnsignedOptions usingSameBitSize() {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(false)
+ .setUseMoreBitsForUint16(false)
+ .setUseMoreBitsForUint32(false)
+ .setUseStringForUint64(false)
+ .build();
+ }
+
+ /**
+ * Returns options for using a higher bit count for unsigned types.
+ *
+ * <p>This means that if an unsigned value is encountered, it will always use the higher bit
+ * count, even if that higher bit count is unnecessary. However, this means that if it is
+ * necessary, then the proper value will be returned rather than the negative equivalent (in
+ * terms of bits).
+ *
+ * <p>The {@code includeUint64} controls the behavior of 64-bit values, since no properly
+ * higher-bit-numeric type exists. If true, then this will be converted into a string that must
+ * be parsed if intended to be used as a number. Otherwise, it will still be a 64-bit type and
+ * may return negative values.
+ */
+ public static UnsignedOptions usingHigherBitSize(boolean includeUint64) {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(true)
+ .setUseMoreBitsForUint16(true)
+ .setUseMoreBitsForUint32(true)
+ .setUseStringForUint64(includeUint64)
+ .build();
+ }
+
+ public static Builder builder() {
+ return new AutoValue_SbeSchema_UnsignedOptions.Builder();
+ }
+
+ /** Builder for {@link UnsignedOptions}. */
Review comment:
I think it would be more straightforward, and acceptable, if this were just a schema level option. Also, it's odd as it is, since it's defined here in SbeSchema, but only used in the SbeFieldOptions
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
+
+ /**
+ * Returns options for using the same bit size for all unsigned types.
+ *
+ * <p>This means that if an unsigned value from SBE comes in with a value outside the signed
+ * range, then the negative equivalent (in terms of bits) will be used.
+ */
+ public static UnsignedOptions usingSameBitSize() {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(false)
+ .setUseMoreBitsForUint16(false)
+ .setUseMoreBitsForUint32(false)
+ .setUseStringForUint64(false)
+ .build();
+ }
+
+ /**
+ * Returns options for using a higher bit count for unsigned types.
+ *
+ * <p>This means that if an unsigned value is encountered, it will always use the higher bit
+ * count, even if that higher bit count is unnecessary. However, this means that if it is
+ * necessary, then the proper value will be returned rather than the negative equivalent (in
+ * terms of bits).
+ *
+ * <p>The {@code includeUint64} controls the behavior of 64-bit values, since no properly
+ * higher-bit-numeric type exists. If true, then this will be converted into a string that must
+ * be parsed if intended to be used as a number. Otherwise, it will still be a 64-bit type and
+ * may return negative values.
+ */
+ public static UnsignedOptions usingHigherBitSize(boolean includeUint64) {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(true)
+ .setUseMoreBitsForUint16(true)
+ .setUseMoreBitsForUint32(true)
+ .setUseStringForUint64(includeUint64)
+ .build();
+ }
+
+ public static Builder builder() {
+ return new AutoValue_SbeSchema_UnsignedOptions.Builder();
+ }
+
+ /** Builder for {@link UnsignedOptions}. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+
+ public abstract Builder setUseMoreBitsForUint8(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint16(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint32(Boolean value);
+
+ public abstract Builder setUseStringForUint64(Boolean value);
+
+ public abstract UnsignedOptions build();
+ }
+ }
+
+ /**
+ * Options for configuring schema generation from an {@link Ir}.
+ *
+ * <p>The default options make the following assumptions:
+ *
+ * <ul>
+ * <p>There is only message in the XML schema. In order to override this, either {@link
+ * IrOptions#messageId()} or {@link IrOptions#messageName()} must be set, but not both.
+ * </ul>
+ */
+ @AutoValue
+ public abstract static class IrOptions implements Serializable {
Review comment:
I'm not sure if this is your intention or not but these could be mapped to/from table params in the PayloadSerializerProvider: https://github.com/apache/beam/blob/30b440faa78f66fefd9b64be743d11021c998e82/sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/io/payloads/PayloadSerializerProvider.java#L36
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeFieldUtils.java
##########
@@ -0,0 +1,78 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import org.apache.beam.sdk.extensions.sbe.SbeSchema.UnsignedOptions;
+import org.apache.beam.sdk.schemas.Schema.FieldType;
+import uk.co.real_logic.sbe.PrimitiveType;
+
+/** Utilities for working with SBE fields. */
+final class SbeFieldUtils {
+ private SbeFieldUtils() {}
+
+ /**
+ * Converts a SBE {@link PrimitiveType} to a Beam {@link FieldType}.
+ *
+ * <p>"Signed" in this case simply means that it isn't one of the unsigned types (uint8, uint16,
+ * uint32, uint64). This includes the char type.
+ *
+ * @param sbePrimitive the signed {@link PrimitiveType}
+ * @return the Beam equivalent of the SBE type
+ */
+ static FieldType signedSbePrimitiveToBeamPrimitive(PrimitiveType sbePrimitive) {
Review comment:
I'd prefer if these were just private helpers (or even inlined) in `PrimitiveSbeField`. It looks like they're only called there and in tests. The tests could just verify the higher-level public API instead.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/metricsx/metricsx.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvbWV0cmljc3gvbWV0cmljc3guZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/types.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvdHlwZXMuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L3JlZ2lzdHJ5Lmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/multiplex.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9tdWx0aXBsZXguZ28=) | | |
| [sdks/go/pkg/beam/io/datastoreio/datastore.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhc3RvcmVpby9kYXRhc3RvcmUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/fn\_arity.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbl9hcml0eS5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/harness/datamgr.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9kYXRhbWdyLmdv) | | |
| [sdks/go/pkg/beam/runners/direct/buffer.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9idWZmZXIuZ28=) | | |
| [sdks/go/pkg/beam/schema.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9zY2hlbWEuZ28=) | | |
| [sdks/go/pkg/beam/runners/dataflow/dataflow.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93Lmdv) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/xlangx/namespace.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L25hbWVzcGFjZS5nbw==) | | |
| [sdks/go/pkg/beam/beam.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9iZWFtLnNoaW1zLmdv) | | |
| [sdks/go/pkg/beam/transforms/top/top.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3RvcC90b3AuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/types.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvdHlwZXMuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/data.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9kYXRhLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3JlZ2lzdHJ5Lmdv) | | |
| [sdks/go/pkg/beam/io/filesystem/memfs/memory.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL21lbWZzL21lbW9yeS5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/map.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL21hcC5nbw==) | | |
| [sdks/go/pkg/beam/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/max.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21heC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1075402975
Run Java PreCommit
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r832433209
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,169 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
Review comment:
```suggestion
* Represents an SBE schema that can be translated to a Beam {@link Schema}.
```
This doesn't actually have any support for creating a `PayloadSerializerProvider`, let's not mention that in the docs until the support is added.
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/PrimitiveSbeField.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import com.google.auto.value.AutoValue;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.extensions.sbe.UnsignedOptions.Behavior;
+import org.apache.beam.sdk.schemas.Schema.Field;
+import org.apache.beam.sdk.schemas.Schema.FieldType;
+import uk.co.real_logic.sbe.PrimitiveType;
+
+/** Represents a primitive SBE field. */
+@Experimental(Kind.SCHEMAS)
+@AutoValue
+public abstract class PrimitiveSbeField implements SbeField {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public abstract String name();
+
+ @Override
+ public abstract Boolean isRequired();
+
+ public abstract PrimitiveType type();
+
+ @Override
+ public Field asBeamField(SbeFieldOptions options) {
+ FieldType type = beamType(options);
+ return isRequired() ? Field.of(name(), type) : Field.nullable(name(), type);
+ }
+
+ private FieldType beamType(SbeFieldOptions options) {
+ switch (type()) {
+ case CHAR:
+ // TODO(BEAM-12697): Support char types
+ throw new UnsupportedOperationException("char type not supported yet");
Review comment:
nit: could be good to reference the jira in the error message so users have somewhere to report they've run into this.
```suggestion
// TODO(BEAM-12697): Support char types
throw new UnsupportedOperationException("char type not supported yet (BEAM-12697)");
```
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/IrFieldGenerator.java
##########
@@ -0,0 +1,146 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static java.util.stream.Collectors.collectingAndThen;
+import static java.util.stream.Collectors.toList;
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
+
+import java.util.Iterator;
+import java.util.List;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.extensions.sbe.SbeSchema.IrOptions;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import uk.co.real_logic.sbe.ir.Encoding.Presence;
+import uk.co.real_logic.sbe.ir.Ir;
+import uk.co.real_logic.sbe.ir.Token;
+
+/** Utility for generating {@link SbeField}s from an {@link Ir}. */
+@Experimental(Kind.SCHEMAS)
+public final class IrFieldGenerator {
Review comment:
Should this be package-private? It looks like we don't expect users to interact with it directly
```suggestion
final class IrFieldGenerator {
```
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r814016571
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
+
+ /**
+ * Returns options for using the same bit size for all unsigned types.
+ *
+ * <p>This means that if an unsigned value from SBE comes in with a value outside the signed
+ * range, then the negative equivalent (in terms of bits) will be used.
+ */
+ public static UnsignedOptions usingSameBitSize() {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(false)
+ .setUseMoreBitsForUint16(false)
+ .setUseMoreBitsForUint32(false)
+ .setUseStringForUint64(false)
+ .build();
+ }
+
+ /**
+ * Returns options for using a higher bit count for unsigned types.
+ *
+ * <p>This means that if an unsigned value is encountered, it will always use the higher bit
+ * count, even if that higher bit count is unnecessary. However, this means that if it is
+ * necessary, then the proper value will be returned rather than the negative equivalent (in
+ * terms of bits).
+ *
+ * <p>The {@code includeUint64} controls the behavior of 64-bit values, since no properly
+ * higher-bit-numeric type exists. If true, then this will be converted into a string that must
+ * be parsed if intended to be used as a number. Otherwise, it will still be a 64-bit type and
+ * may return negative values.
+ */
+ public static UnsignedOptions usingHigherBitSize(boolean includeUint64) {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(true)
+ .setUseMoreBitsForUint16(true)
+ .setUseMoreBitsForUint32(true)
+ .setUseStringForUint64(includeUint64)
+ .build();
+ }
+
+ public static Builder builder() {
+ return new AutoValue_SbeSchema_UnsignedOptions.Builder();
+ }
+
+ /** Builder for {@link UnsignedOptions}. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+
+ public abstract Builder setUseMoreBitsForUint8(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint16(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint32(Boolean value);
+
+ public abstract Builder setUseStringForUint64(Boolean value);
+
+ public abstract UnsignedOptions build();
+ }
+ }
+
+ /**
+ * Options for configuring schema generation from an {@link Ir}.
+ *
+ * <p>The default options make the following assumptions:
+ *
+ * <ul>
+ * <p>There is only message in the XML schema. In order to override this, either {@link
+ * IrOptions#messageId()} or {@link IrOptions#messageName()} must be set, but not both.
+ * </ul>
+ */
+ @AutoValue
+ public abstract static class IrOptions implements Serializable {
Review comment:
> Yes so the IrOptions are critical for getting a single message to map the single schema to, right?
Well, I thought it did, but looking over at the [OTF example](https://github.com/real-logic/simple-binary-encoding/blob/master/sbe-samples/src/main/java/uk/co/real_logic/sbe/examples/OtfExample.java), the solution is actually to wait until after decoding the message header to select the relevant message tokens. So in the deserialization PTransform, we would select the right schema dynamically.
The problem there is that it won't be compatible with the `PayloadSerializerProvider` interface, but we can probably get around that by letting a user select a particular schema themselves if they know beforehand that a particular source will only provide messages of a single type. Otherwise, it would select the schema dynamically.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
> :exclamation: Current head 49ecc54 differs from pull request most recent head 1a385d4. Consider uploading reports for the commit 1a385d4 to get more accurate results
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/option.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9vcHRpb24uZ28=) | | |
| [...beam/core/runtime/harness/statecache/statecache.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9zdGF0ZWNhY2hlL3N0YXRlY2FjaGUuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/sum.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3N1bS5nbw==) | | |
| [sdks/go/pkg/beam/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsLmdv) | | |
| [sdks/go/pkg/beam/core/funcx/fn.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L2ZuLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/datasource.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9kYXRhc291cmNlLmdv) | | |
| [sdks/go/pkg/beam/io/textio/textio.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby90ZXh0aW8vdGV4dGlvLmdv) | | |
| [sdks/go/pkg/beam/core/funcx/sideinput.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L3NpZGVpbnB1dC5nbw==) | | |
| [sdks/go/pkg/beam/runners/vet/vet.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ZldC92ZXQuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/varint.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3ZhcmludC5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/pcollection.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wY29sbGVjdGlvbi5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/status.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9zdGF0dXMuZ28=) | | |
| [sdks/go/pkg/beam/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJkby5nbw==) | | |
| [sdks/go/pkg/beam/core/metrics/sampler.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL21ldHJpY3Mvc2FtcGxlci5nbw==) | | |
| [sdks/go/pkg/beam/transforms/filter/filter.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9maWx0ZXIuZ28=) | | |
| [sdks/go/pkg/beam/transforms/filter/distinct.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9kaXN0aW5jdC5nbw==) | | |
| [...kg/beam/core/runtime/graphx/schema/logicaltypes.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NjaGVtYS9sb2dpY2FsdHlwZXMuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/serialize.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NlcmlhbGl6ZS5nbw==) | | |
| [sdks/go/pkg/beam/util/shimx/generate.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsL3NoaW14L2dlbmVyYXRlLmdv) | | |
| [sdks/go/pkg/beam/core/util/protox/protox.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcHJvdG94L3Byb3RveC5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/io/synthetic/source.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9zeW50aGV0aWMvc291cmNlLmdv) | | |
| [sdks/go/pkg/beam/io/filesystem/filesystem.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2ZpbGVzeXN0ZW0uZ28=) | | |
| [sdks/go/pkg/beam/internal/errors/errors.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbnRlcm5hbC9lcnJvcnMvZXJyb3JzLmdv) | | |
| [sdks/go/pkg/beam/transforms/stats/mean.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21lYW4uZ28=) | | |
| [sdks/go/pkg/beam/io/filesystem/gcs/gcs.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2djcy9nY3MuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/expand.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L2V4cGFuZC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/reshuffle.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9yZXNodWZmbGUuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/int.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2ludC5nbw==) | | |
| [sdks/go/pkg/beam/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsLmdv) | | |
| [sdks/go/pkg/beam/core/util/reflectx/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvdXRpbC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/util/reflectx/calls.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvY2FsbHMuZ28=) | | |
| [sdks/go/pkg/beam/option.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9vcHRpb24uZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/cogbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9jb2diay5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/varint.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3ZhcmludC5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/bind.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2JpbmQuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/coderx/string.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L3N0cmluZy5nbw==) | | |
| [sdks/go/pkg/beam/core/funcx/signature.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L3NpZ25hdHVyZS5nbw==) | | |
| [.../pkg/beam/runners/dataflow/dataflowlib/messages.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL21lc3NhZ2VzLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/symbols.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvc3ltYm9scy5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3JlZ2lzdHJ5Lmdv) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
> :exclamation: Current head 9af85a3 differs from pull request most recent head f2bdabc. Consider uploading reports for the commit f2bdabc to get more accurate results
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/coderx/int.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L2ludC5nbw==) | | |
| [sdks/go/pkg/beam/pcollection.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wY29sbGVjdGlvbi5nbw==) | | |
| [sdks/go/pkg/beam/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb2Rlci5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/namespace.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L25hbWVzcGFjZS5nbw==) | | |
| [sdks/go/pkg/beam/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJkby5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/graph.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2dyYXBoLmdv) | | |
| [...o/pkg/beam/runners/dataflow/dataflowlib/metrics.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL21ldHJpY3MuZ28=) | | |
| [sdks/go/pkg/beam/partition.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJ0aXRpb24uZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/row.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Jvdy5nbw==) | | |
| [...kg/beam/core/runtime/graphx/schema/logicaltypes.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NjaGVtYS9sb2dpY2FsdHlwZXMuZ28=) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...f2bdabc](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] aaltay commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
aaltay commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1043864469
What is the next step on this PR?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/graph/node.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL25vZGUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/options.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvb3B0aW9ucy5nbw==) | | |
| [sdks/go/pkg/beam/core/util/protox/any.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcHJvdG94L2FueS5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2NvZGVyLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/double.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2RvdWJsZS5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/graph.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2dyYXBoLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/metricsx/urns.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvbWV0cmljc3gvdXJucy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/pipelinex/clone.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvcGlwZWxpbmV4L2Nsb25lLmdv) | | |
| [sdks/go/pkg/beam/external.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9leHRlcm5hbC5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/edge.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2VkZ2UuZ28=) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1075407295
> Looks like the Java precommit errors are unrelated based on this line:
>
> > Task :runners:direct-java:needsRunnerTests FAILED
Yeah failure is in `org.apache.beam.sdk.transforms.ParDoLifecycleTest.testTeardownCalledAfterExceptionInFinishBundleStateful` which is BEAM-7752. I'd still like to get a green run to make sure that's not masking an issue though.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031895391
Since this is a Java change with only adding a new dependency, I'm going to guess that the Python failures are unrelated to this change.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/io/synthetic/source.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9zeW50aGV0aWMvc291cmNlLmdv) | | |
| [sdks/go/pkg/beam/io/filesystem/filesystem.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2ZpbGVzeXN0ZW0uZ28=) | | |
| [sdks/go/pkg/beam/internal/errors/errors.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbnRlcm5hbC9lcnJvcnMvZXJyb3JzLmdv) | | |
| [sdks/go/pkg/beam/transforms/stats/mean.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21lYW4uZ28=) | | |
| [sdks/go/pkg/beam/io/filesystem/gcs/gcs.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2djcy9nY3MuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/expand.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L2V4cGFuZC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/reshuffle.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9yZXNodWZmbGUuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/int.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2ludC5nbw==) | | |
| [sdks/go/pkg/beam/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsLmdv) | | |
| [sdks/go/pkg/beam/core/util/reflectx/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvdXRpbC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1058381627
@zhoufek is this ready for another review?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...dks/go/pkg/beam/core/runtime/harness/monitoring.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9tb25pdG9yaW5nLmdv) | | |
| [sdks/go/pkg/beam/util/shimx/generate.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsL3NoaW14L2dlbmVyYXRlLmdv) | | |
| [...o/pkg/beam/runners/dataflow/dataflowlib/metrics.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL21ldHJpY3MuZ28=) | | |
| [sdks/go/pkg/beam/io/bigqueryio/bigquery.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9iaWdxdWVyeWlvL2JpZ3F1ZXJ5Lmdv) | | |
| [sdks/go/pkg/beam/core/graph/graph.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2dyYXBoLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/double.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2RvdWJsZS5nbw==) | | |
| [.../pkg/beam/runners/dataflow/dataflowlib/messages.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL21lc3NhZ2VzLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/serialize.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NlcmlhbGl6ZS5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9wYXJkby5nbw==) | | |
| [.../go/pkg/beam/runners/dataflow/dataflowlib/fixup.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL2ZpeHVwLmdv) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r833279529
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,169 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
Review comment:
Done. Also removed reference to Beam schema, since that also isn't ready yet.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/graph/graph.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2dyYXBoLmdv) | | |
| [...s/go/pkg/beam/core/runtime/harness/sampler\_hook.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9zYW1wbGVyX2hvb2suZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/status.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9zdGF0dXMuZ28=) | | |
| [sdks/go/pkg/beam/options/gcpopts/options.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9vcHRpb25zL2djcG9wdHMvb3B0aW9ucy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZGVyLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/serialize.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NlcmlhbGl6ZS5nbw==) | | |
| [sdks/go/pkg/beam/core/util/reflectx/calls.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvY2FsbHMuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/harness/statemgr.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9zdGF0ZW1nci5nbw==) | | |
| [sdks/go/pkg/beam/partition.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJ0aXRpb24uZ28=) | | |
| [.../go/pkg/beam/runners/dataflow/dataflowlib/fixup.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL2ZpeHVwLmdv) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f2bdabc) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 452 +250
Lines 19914 62303 +42389
===========================================
+ Hits 9251 52097 +42846
- Misses 9674 10206 +532
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...o/pkg/beam/io/rtrackers/offsetrange/offsetrange.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9ydHJhY2tlcnMvb2Zmc2V0cmFuZ2Uvb2Zmc2V0cmFuZ2UuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/multiplex.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9tdWx0aXBsZXguZ28=) | | |
| [sdks/go/pkg/beam/core/util/reflectx/tags.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvdGFncy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/harness/sampler.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9zYW1wbGVyLmdv) | | |
| [sdks/go/pkg/beam/schema.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9zY2hlbWEuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/fullvalue.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mdWxsdmFsdWUuZ28=) | | |
| [...o/pkg/beam/runners/dataflow/dataflowlib/metrics.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL21ldHJpY3MuZ28=) | | |
| [sdks/go/pkg/beam/options/gcpopts/options.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9vcHRpb25zL2djcG9wdHMvb3B0aW9ucy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/harness/datamgr.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9kYXRhbWdyLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/pipelinex/replace.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvcGlwZWxpbmV4L3JlcGxhY2UuZ28=) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...f2bdabc](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f2bdabc) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 452 +250
Lines 19914 62303 +42389
===========================================
+ Hits 9251 52097 +42846
- Misses 9674 10206 +532
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/graph/coder/map.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL21hcC5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/quantiles.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3F1YW50aWxlcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/expand.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L2V4cGFuZC5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/row\_encoder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Jvd19lbmNvZGVyLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/cogbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZ2JrLmdv) | | |
| [sdks/go/pkg/beam/flatten.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9mbGF0dGVuLmdv) | | |
| [.../go/pkg/beam/core/graph/coder/testutil/testutil.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Rlc3R1dGlsL3Rlc3R1dGlsLmdv) | | |
| [sdks/go/pkg/beam/transforms/stats/sum\_switch.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3N1bV9zd2l0Y2guZ28=) | | |
| [sdks/go/pkg/beam/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJkby5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/translate.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3RyYW5zbGF0ZS5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...f2bdabc](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/option.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9vcHRpb24uZ28=) | | |
| [sdks/go/pkg/beam/runners/dataflow/dataflow.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93Lmdv) | | |
| [sdks/go/pkg/beam/core/util/symtab/symtab.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvc3ltdGFiL3N5bXRhYi5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/window.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy93aW5kb3cuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/hash.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9oYXNoLmdv) | | |
| [sdks/go/pkg/beam/core/graph/fn.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2ZuLmdv) | | |
| [sdks/go/pkg/beam/testing/passert/passert.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvcGFzc2VydC5zaGltcy5nbw==) | | |
| [sdks/go/pkg/beam/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/translate.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3RyYW5zbGF0ZS5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r833279256
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,169 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
Review comment:
Done
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/schema.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9zY2hlbWEuZ28=) | | |
| [sdks/go/pkg/beam/core/util/reflectx/structs.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvc3RydWN0cy5nbw==) | | |
| [sdks/go/pkg/beam/core/typex/class.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3R5cGV4L2NsYXNzLmdv) | | |
| [sdks/go/pkg/beam/transforms/filter/distinct.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9kaXN0aW5jdC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/fn.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbi5nbw==) | | |
| [sdks/go/pkg/beam/artifact/materialize.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9hcnRpZmFjdC9tYXRlcmlhbGl6ZS5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/multiplex.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9tdWx0aXBsZXguZ28=) | | |
| [sdks/go/pkg/beam/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJkby5nbw==) | | |
| [sdks/go/pkg/beam/core/util/reflectx/tags.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvdGFncy5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/map.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL21hcC5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f2bdabc) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 452 +250
Lines 19914 62303 +42389
===========================================
+ Hits 9251 52097 +42846
- Misses 9674 10206 +532
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/xlangx/namespace.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L25hbWVzcGFjZS5nbw==) | | |
| [sdks/go/pkg/beam/io/filesystem/local/local.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2xvY2FsL2xvY2FsLmdv) | | |
| [sdks/go/pkg/beam/util/shimx/generate.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS91dGlsL3NoaW14L2dlbmVyYXRlLmdv) | | |
| [sdks/go/pkg/beam/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/beam.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9iZWFtLnNoaW1zLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/tree.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3RyZWUuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/min.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21pbi5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/max.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21heC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/cogbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9jb2diay5nbw==) | | |
| [sdks/go/pkg/beam/external.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9leHRlcm5hbC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...f2bdabc](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/util/protox/protox.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcHJvdG94L3Byb3RveC5nbw==) | | |
| [sdks/go/pkg/beam/core/funcx/output.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L291dHB1dC5nbw==) | | |
| [...kg/beam/core/runtime/graphx/schema/logicaltypes.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NjaGVtYS9sb2dpY2FsdHlwZXMuZ28=) | | |
| [sdks/go/pkg/beam/options/gcpopts/options.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9vcHRpb25zL2djcG9wdHMvb3B0aW9ucy5nbw==) | | |
| [sdks/go/pkg/beam/pcollection.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wY29sbGVjdGlvbi5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/iterable.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2l0ZXJhYmxlLmdv) | | |
| [sdks/go/pkg/beam/runners/direct/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/internal/errors/errors.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbnRlcm5hbC9lcnJvcnMvZXJyb3JzLmdv) | | |
| [sdks/go/pkg/beam/forward.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9mb3J3YXJkLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/fn.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbi5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031881762
Run PythonDocs PreCommit
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r810316428
##########
File path: buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -656,6 +657,7 @@ class BeamModulePlugin implements Plugin<Project> {
proto_google_cloud_spanner_v1 : "com.google.api.grpc:proto-google-cloud-spanner-v1", // google_cloud_platform_libraries_bom sets version
proto_google_cloud_spanner_admin_database_v1: "com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1", // google_cloud_platform_libraries_bom sets version
proto_google_common_protos : "com.google.api.grpc:proto-google-common-protos", // google_cloud_platform_libraries_bom sets version
+ sbe_tool : "uk.co.real-logic:sbe-tool:$sbe_tool_version",
Review comment:
It uses Apache License 2.0 ([link](https://github.com/real-logic/simple-binary-encoding/blob/master/LICENSE))
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1075407295
> Looks like the Java precommit errors are unrelated based on this line:
>
> > Task :runners:direct-java:needsRunnerTests FAILED
Yeah failure is in `org.apache.beam.sdk.transforms.ParDoLifecycleTest.testTeardownCalledAfterExceptionInFinishBundleStateful` which is BEAM-7752. I'd still like to get a green run to make sure that's not masking an issue though.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1058412913
Yes, it should be ready.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/transforms/stats/quantiles.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3F1YW50aWxlcy5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/mean.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21lYW4uZ28=) | | |
| [sdks/go/pkg/beam/io/filesystem/memfs/memory.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL21lbWZzL21lbW9yeS5nbw==) | | |
| [sdks/go/pkg/beam/core/util/reflectx/structs.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3V0aWwvcmVmbGVjdHgvc3RydWN0cy5nbw==) | | |
| [sdks/go/pkg/beam/testing/passert/equals.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvZXF1YWxzLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/emit.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9lbWl0Lmdv) | | |
| [sdks/go/pkg/beam/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/io/filesystem/filesystem.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL2ZpbGVzeXN0ZW0uZ28=) | | |
| [sdks/go/pkg/beam/runners/direct/buffer.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9idWZmZXIuZ28=) | | |
| [sdks/go/pkg/beam/pardo.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9wYXJkby5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r814026896
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
Review comment:
> Could you clarify what you mean by run our own serialzation?
The IR contains all the necessary information that we could use for serializing a `Row` (or equivalent) into a `byte[]`. Real Logic uses this to generate stubs that know how to serialize and deserialize the `byte[]`. We'd basically do the same but focused on how to serialize a `Row`. It'll allow us to support writing SBE messages to a sink with IR, but it means implementing that serialization ourselves.
Converting to JSON would probably cover many use cases, including the one we have in Dataflow Templates, but I'd imagine that, sooner or later, someone would have a need to write SBE messages to a sink.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...o/pkg/beam/io/rtrackers/offsetrange/offsetrange.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9ydHJhY2tlcnMvb2Zmc2V0cmFuZ2Uvb2Zmc2V0cmFuZ2UuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/flatten.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbGF0dGVuLmdv) | | |
| [sdks/go/pkg/beam/io/databaseio/mapper.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhYmFzZWlvL21hcHBlci5nbw==) | | |
| [sdks/go/pkg/beam/windowing.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS93aW5kb3dpbmcuZ28=) | | |
| [sdks/go/pkg/beam/io/databaseio/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhYmFzZWlvL3V0aWwuZ28=) | | |
| [sdks/go/pkg/beam/flatten.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9mbGF0dGVuLmdv) | | |
| [sdks/go/pkg/beam/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/sdf\_invokers.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9zZGZfaW52b2tlcnMuZ28=) | | |
| [...ks/go/pkg/beam/core/runtime/coderx/coderx.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L2NvZGVyeC5zaGltcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/window.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy93aW5kb3cuZ28=) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1058375720
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...o/pkg/beam/io/rtrackers/offsetrange/offsetrange.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9ydHJhY2tlcnMvb2Zmc2V0cmFuZ2Uvb2Zmc2V0cmFuZ2UuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/flatten.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbGF0dGVuLmdv) | | |
| [sdks/go/pkg/beam/io/databaseio/mapper.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhYmFzZWlvL21hcHBlci5nbw==) | | |
| [sdks/go/pkg/beam/windowing.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS93aW5kb3dpbmcuZ28=) | | |
| [sdks/go/pkg/beam/io/databaseio/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhYmFzZWlvL3V0aWwuZ28=) | | |
| [sdks/go/pkg/beam/flatten.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9mbGF0dGVuLmdv) | | |
| [sdks/go/pkg/beam/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/sdf\_invokers.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9zZGZfaW52b2tlcnMuZ28=) | | |
| [...ks/go/pkg/beam/core/runtime/coderx/coderx.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L2NvZGVyeC5zaGltcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/window.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy93aW5kb3cuZ28=) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1057331445
Run CommunityMetrics PreCommit
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/xlangx/expand.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L2V4cGFuZC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/discard.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9kaXNjYXJkLmdv) | | |
| [sdks/go/pkg/beam/impulse.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pbXB1bHNlLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/payload.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L3BheWxvYWQuZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/row.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3Jvdy5nbw==) | | |
| [sdks/go/pkg/beam/testing/passert/passert.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvcGFzc2VydC5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/min.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21pbi5nbw==) | | |
| [sdks/go/pkg/beam/io/filesystem/memfs/memory.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL21lbWZzL21lbW9yeS5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/windows.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3dpbmRvd3MuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/data.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9kYXRhLmdv) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit merged pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit merged pull request #16762:
URL: https://github.com/apache/beam/pull/16762
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r833277570
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
Review comment:
Starting off with keeping the same bit count, changing to next higher bit count, converting to string, and converting to `BigDecimal`.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1044630147
Run PythonDocs PreCommit
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../pkg/beam/runners/universal/extworker/extworker.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3VuaXZlcnNhbC9leHR3b3JrZXIvZXh0d29ya2VyLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3JlZ2lzdHJ5Lmdv) | | |
| [.../go/pkg/beam/runners/dataflow/dataflowlib/fixup.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL2ZpeHVwLmdv) | | |
| [sdks/go/pkg/beam/encoding.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9lbmNvZGluZy5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2NvZGVyLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/namespace.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L25hbWVzcGFjZS5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/xlang.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3hsYW5nLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L3JlZ2lzdHJ5Lmdv) | | |
| [sdks/go/pkg/beam/runner.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXIuZ28=) | | |
| [sdks/go/pkg/beam/testing/passert/passert.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvcGFzc2VydC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r810322164
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
Review comment:
I was thinking that when this implemented the `PayloadSerializerProvider`, deserialization would use Real Logic's OTF implementation ([example](https://github.com/real-logic/simple-binary-encoding/blob/master/sbe-samples/src/main/java/uk/co/real_logic/sbe/examples/OtfExample.java)) and serialization would use Beam's [RowJsonSerializer](https://github.com/apache/beam/blob/30b440faa78f66fefd9b64be743d11021c998e82/sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJson.java#L453).
I'm not sure if that's way off from what should be done, though. The alternative would be to run our own serialization, which is doable based on the info we can get from the IR but obviously more work.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031978321
Yeah PythonDocs failure looks like a known issue: BEAM-13848
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/genx/genx.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ2VueC9nZW54Lmdv) | | |
| [sdks/go/pkg/beam/testing/passert/count.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvY291bnQuZ28=) | | |
| [sdks/go/pkg/beam/core/funcx/output.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2Z1bmN4L291dHB1dC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/pcollection.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9wY29sbGVjdGlvbi5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/min.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21pbi5nbw==) | | |
| [...ks/go/pkg/beam/runners/dataflow/dataflowlib/job.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RhdGFmbG93L2RhdGFmbG93bGliL2pvYi5nbw==) | | |
| [sdks/go/pkg/beam/runners/direct/gbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL2RpcmVjdC9nYmsuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/emit.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9lbWl0Lmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/int.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2ludC5nbw==) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9af85a3) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 452 +250
Lines 19914 62168 +42254
===========================================
+ Hits 9251 51994 +42743
- Misses 9674 10174 +500
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/artifact/materialize.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9hcnRpZmFjdC9tYXRlcmlhbGl6ZS5nbw==) | | |
| [sdks/go/pkg/beam/runners/vet/vet.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXJzL3ZldC92ZXQuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/harness/logging.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvaGFybmVzcy9sb2dnaW5nLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/reshuffle.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9yZXNodWZmbGUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZGVyLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/xlangx/payload.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUveGxhbmd4L3BheWxvYWQuZ28=) | | |
| [sdks/go/pkg/beam/runner.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9ydW5uZXIuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/max.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21heC5nbw==) | | |
| [sdks/go/pkg/beam/io/bigqueryio/bigquery.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9iaWdxdWVyeWlvL2JpZ3F1ZXJ5Lmdv) | | |
| [sdks/go/pkg/beam/testing/passert/equals.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvZXF1YWxzLmdv) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...9af85a3](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r813456122
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
+
+ /**
+ * Returns options for using the same bit size for all unsigned types.
+ *
+ * <p>This means that if an unsigned value from SBE comes in with a value outside the signed
+ * range, then the negative equivalent (in terms of bits) will be used.
+ */
+ public static UnsignedOptions usingSameBitSize() {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(false)
+ .setUseMoreBitsForUint16(false)
+ .setUseMoreBitsForUint32(false)
+ .setUseStringForUint64(false)
+ .build();
+ }
+
+ /**
+ * Returns options for using a higher bit count for unsigned types.
+ *
+ * <p>This means that if an unsigned value is encountered, it will always use the higher bit
+ * count, even if that higher bit count is unnecessary. However, this means that if it is
+ * necessary, then the proper value will be returned rather than the negative equivalent (in
+ * terms of bits).
+ *
+ * <p>The {@code includeUint64} controls the behavior of 64-bit values, since no properly
+ * higher-bit-numeric type exists. If true, then this will be converted into a string that must
+ * be parsed if intended to be used as a number. Otherwise, it will still be a 64-bit type and
+ * may return negative values.
+ */
+ public static UnsignedOptions usingHigherBitSize(boolean includeUint64) {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(true)
+ .setUseMoreBitsForUint16(true)
+ .setUseMoreBitsForUint32(true)
+ .setUseStringForUint64(includeUint64)
+ .build();
+ }
+
+ public static Builder builder() {
+ return new AutoValue_SbeSchema_UnsignedOptions.Builder();
+ }
+
+ /** Builder for {@link UnsignedOptions}. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+
+ public abstract Builder setUseMoreBitsForUint8(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint16(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint32(Boolean value);
+
+ public abstract Builder setUseStringForUint64(Boolean value);
+
+ public abstract UnsignedOptions build();
+ }
+ }
+
+ /**
+ * Options for configuring schema generation from an {@link Ir}.
+ *
+ * <p>The default options make the following assumptions:
+ *
+ * <ul>
+ * <p>There is only message in the XML schema. In order to override this, either {@link
+ * IrOptions#messageId()} or {@link IrOptions#messageName()} must be set, but not both.
+ * </ul>
+ */
+ @AutoValue
+ public abstract static class IrOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public static final long UNSET_MESSAGE_ID = -1;
+ public static final String UNSET_MESSAGE_NAME = "";
Review comment:
I think it would improve clarity to just use null here, and make messageId and messageName `@Nullable`
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
+ * representation of the message, not an SBE-serialized message. Downstream systems will need to
+ * account for this.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
+ ImmutableList<SbeField> getSbeFields() {
+ return sbeFields;
+ }
+
+ /**
+ * Options for controlling what to do with unsigned types, specifically whether to use a higher
+ * bit count or, in the case of uint64, a string.
+ */
+ @AutoValue
+ public abstract static class UnsignedOptions implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ public abstract Boolean useMoreBitsForUint8();
+
+ public abstract Boolean useMoreBitsForUint16();
+
+ public abstract Boolean useMoreBitsForUint32();
+
+ public abstract Boolean useStringForUint64();
+
+ /**
+ * Returns options for using the same bit size for all unsigned types.
+ *
+ * <p>This means that if an unsigned value from SBE comes in with a value outside the signed
+ * range, then the negative equivalent (in terms of bits) will be used.
+ */
+ public static UnsignedOptions usingSameBitSize() {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(false)
+ .setUseMoreBitsForUint16(false)
+ .setUseMoreBitsForUint32(false)
+ .setUseStringForUint64(false)
+ .build();
+ }
+
+ /**
+ * Returns options for using a higher bit count for unsigned types.
+ *
+ * <p>This means that if an unsigned value is encountered, it will always use the higher bit
+ * count, even if that higher bit count is unnecessary. However, this means that if it is
+ * necessary, then the proper value will be returned rather than the negative equivalent (in
+ * terms of bits).
+ *
+ * <p>The {@code includeUint64} controls the behavior of 64-bit values, since no properly
+ * higher-bit-numeric type exists. If true, then this will be converted into a string that must
+ * be parsed if intended to be used as a number. Otherwise, it will still be a 64-bit type and
+ * may return negative values.
+ */
+ public static UnsignedOptions usingHigherBitSize(boolean includeUint64) {
+ return UnsignedOptions.builder()
+ .setUseMoreBitsForUint8(true)
+ .setUseMoreBitsForUint16(true)
+ .setUseMoreBitsForUint32(true)
+ .setUseStringForUint64(includeUint64)
+ .build();
+ }
+
+ public static Builder builder() {
+ return new AutoValue_SbeSchema_UnsignedOptions.Builder();
+ }
+
+ /** Builder for {@link UnsignedOptions}. */
+ @AutoValue.Builder
+ public abstract static class Builder {
+
+ public abstract Builder setUseMoreBitsForUint8(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint16(Boolean value);
+
+ public abstract Builder setUseMoreBitsForUint32(Boolean value);
+
+ public abstract Builder setUseStringForUint64(Boolean value);
+
+ public abstract UnsignedOptions build();
+ }
+ }
+
+ /**
+ * Options for configuring schema generation from an {@link Ir}.
+ *
+ * <p>The default options make the following assumptions:
+ *
+ * <ul>
+ * <p>There is only message in the XML schema. In order to override this, either {@link
+ * IrOptions#messageId()} or {@link IrOptions#messageName()} must be set, but not both.
+ * </ul>
+ */
+ @AutoValue
+ public abstract static class IrOptions implements Serializable {
Review comment:
Yes so the `IrOptions` are critical for getting a single message to map the single schema to, right?
Note that in some `getSerializer` implementations the schema is inferred, e.g. for proto we get it from the proto class: https://github.com/apache/beam/blob/30b440faa78f66fefd9b64be743d11021c998e82/sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoPayloadSerializerProvider.java#L73-L75
and the schema passed as an argument is just verified to be equal (we could and probably should make the schema allowed to be null in this case).
This is definitely out of scope for this PR though :)
##########
File path: buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -656,6 +657,7 @@ class BeamModulePlugin implements Plugin<Project> {
proto_google_cloud_spanner_v1 : "com.google.api.grpc:proto-google-cloud-spanner-v1", // google_cloud_platform_libraries_bom sets version
proto_google_cloud_spanner_admin_database_v1: "com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1", // google_cloud_platform_libraries_bom sets version
proto_google_common_protos : "com.google.api.grpc:proto-google-common-protos", // google_cloud_platform_libraries_bom sets version
+ sbe_tool : "uk.co.real-logic:sbe-tool:$sbe_tool_version",
Review comment:
:+1: thanks
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,252 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ *
+ * <p>At this time, we cannot support serialization to an SBE message through IR. As a result, the
+ * {@code byte[]} output from the {@link PayloadSerializerProvider} serializer will be from a JSON
Review comment:
I don't think we should make a `PayloadSerializerProvider` that encodes and decodes different formats, I think it would be preferable to just not support encoding in this situation. Users could choose to use JSON for outputs explicitly if they want to.
Could you clarify what you mean by run our own serialzation?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f2bdabc) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
> :exclamation: Current head f2bdabc differs from pull request most recent head 49ecc54. Consider uploading reports for the commit 49ecc54 to get more accurate results
[](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 452 +250
Lines 19914 62303 +42389
===========================================
+ Hits 9251 52097 +42846
- Misses 9674 10206 +532
+ Partials 989 0 -989
```
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/io/datastoreio/datastore.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9kYXRhc3RvcmVpby9kYXRhc3RvcmUuZ28=) | | |
| [sdks/go/pkg/beam/testing/passert/passert.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90ZXN0aW5nL3Bhc3NlcnQvcGFzc2VydC5nbw==) | | |
| [sdks/go/pkg/beam/io/textio/textio.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby90ZXh0aW8vdGV4dGlvLmdv) | | |
| [sdks/go/pkg/beam/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb2Rlci5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/tree.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3RyZWUuZ28=) | | |
| [...kg/beam/core/runtime/graphx/schema/logicaltypes.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3NjaGVtYS9sb2dpY2FsdHlwZXMuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/coderx/string.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L3N0cmluZy5nbw==) | | |
| [sdks/go/pkg/beam/transforms/filter/distinct.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL2ZpbHRlci9kaXN0aW5jdC5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/pipelinex/clone.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvcGlwZWxpbmV4L2Nsb25lLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/coder.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2NvZGVyLmdv) | | |
| ... and [644 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] TheNeuralBit commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
TheNeuralBit commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r832446368
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/PrimitiveSbeField.java
##########
@@ -0,0 +1,160 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import com.google.auto.value.AutoValue;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.extensions.sbe.UnsignedOptions.Behavior;
+import org.apache.beam.sdk.schemas.Schema.Field;
+import org.apache.beam.sdk.schemas.Schema.FieldType;
+import uk.co.real_logic.sbe.PrimitiveType;
+
+/** Represents a primitive SBE field. */
+@Experimental(Kind.SCHEMAS)
+@AutoValue
+public abstract class PrimitiveSbeField implements SbeField {
Review comment:
Similarly here, it looks like SbeField is exposed SbeSchema.getFields, but PrimitiveSbeField is a special-case. Do we expect users to interact with this type directly, or could it be package-private?
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,169 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
Review comment:
`@VisibleForTesting` is a bit of an anti-pattern in my opinion. We should be testing through the public APIs as much as possible. Currently, it looks like this class doesn't actually _have_ a public API, you can create an instance through a public function, but all the accessors indicate they're exposed just for testing. Should some of these accessors be public?
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a385d4) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.17%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.63% +37.17%
===========================================
Files 202 453 +251
Lines 19914 63257 +43343
===========================================
+ Hits 9251 52902 +43651
- Misses 9674 10355 +681
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.63% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/io/filesystem/memfs/memory.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9maWxlc3lzdGVtL21lbWZzL21lbW9yeS5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/pipelinex/replace.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvcGlwZWxpbmV4L3JlcGxhY2UuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/util.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy91dGlsLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/window.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy93aW5kb3cuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/min\_switch.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21pbl9zd2l0Y2guZ28=) | | |
| [sdks/go/pkg/beam/core/graph/coder/time.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3RpbWUuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/hash.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9oYXNoLmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/windows.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3dpbmRvd3MuZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/graphx/cogbk.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L2NvZ2JrLmdv) | | |
| [sdks/go/pkg/beam/io/synthetic/source.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9pby9zeW50aGV0aWMvc291cmNlLmdv) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...1a385d4](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] zhoufek commented on a change in pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
zhoufek commented on a change in pull request #16762:
URL: https://github.com/apache/beam/pull/16762#discussion_r833282441
##########
File path: sdks/java/extensions/sbe/src/main/java/org/apache/beam/sdk/extensions/sbe/SbeSchema.java
##########
@@ -0,0 +1,169 @@
+/*
+ * 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 org.apache.beam.sdk.extensions.sbe;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import com.google.auto.value.AutoValue;
+import java.io.Serializable;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.schemas.Schema;
+import org.apache.beam.sdk.schemas.io.payloads.PayloadSerializerProvider;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.annotations.VisibleForTesting;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import uk.co.real_logic.sbe.ir.Ir;
+
+/**
+ * Represents an SBE schema that can be translated to a Beam {@link Schema} and {@link
+ * PayloadSerializerProvider}.
+ *
+ * <p>The schema represents a single SBE message. If the XML schema contains more than one message,
+ * then a new instance must be created for each message that the pipeline will work with.
+ *
+ * <p>The currently supported ways of generating a schema are:
+ *
+ * <ul>
+ * <li>Through an intermediate representation ({@link Ir}).
+ * </ul>
+ *
+ * <h3>Intermediate Representation</h3>
+ *
+ * <p>An {@link Ir} allows for a reflection-less way of getting a very accurate representation of
+ * the SBE schema, since it is a tokenized form of the original XML schema. To help deal with some
+ * ambiguities, such as which message to base the schema around, passing {@link IrOptions} is
+ * required. See the Javadoc for the options for more details.
+ */
+@Experimental(Kind.SCHEMAS)
+public final class SbeSchema implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final @Nullable SerializableIr ir;
+ private final @Nullable IrOptions irOptions;
+ private final ImmutableList<SbeField> sbeFields;
+
+ private SbeSchema(
+ @Nullable SerializableIr ir,
+ @Nullable IrOptions irOptions,
+ ImmutableList<SbeField> sbeFields) {
+ this.ir = ir;
+ this.irOptions = irOptions;
+ this.sbeFields = sbeFields;
+ }
+
+ /**
+ * Creates a new {@link SbeSchema} from the given intermediate representation.
+ *
+ * <p>This makes no guarantees about the state of the returned instance. That is, it may or may
+ * not have the generated SBE schema representation, and it may or may not have translated the SBE
+ * schema into a Beam schema.
+ *
+ * @param ir the intermediate representation of the SBE schema. Modifications to the passed-in
+ * value will not be reflected in the returned instance.
+ * @param irOptions options for configuring how to deal with cases where the desired behavior is
+ * ambiguous.
+ * @return a new {@link SbeSchema} instance
+ */
+ public static SbeSchema fromIr(Ir ir, IrOptions irOptions) {
+ ImmutableList<SbeField> sbeFields = IrFieldGenerator.generateFields(ir, irOptions);
+
+ Ir copy =
+ new Ir(
+ ir.packageName(),
+ ir.namespaceName(),
+ ir.id(),
+ ir.version(),
+ ir.description(),
+ ir.semanticVersion(),
+ ir.byteOrder(),
+ ImmutableList.copyOf(ir.headerStructure().tokens()));
+
+ return new SbeSchema(SerializableIr.fromIr(copy), irOptions, sbeFields);
+ }
+
+ @VisibleForTesting
+ @Nullable
+ Ir getIr() {
+ return ir == null ? null : ir.ir();
+ }
+
+ @VisibleForTesting
+ @Nullable
+ IrOptions getIrOptions() {
+ return irOptions;
+ }
+
+ @VisibleForTesting
Review comment:
My idea here was to make sure that modifications to the passed-in value couldn't also modify the `SbeSchema` instance, though in that case, it would probably make more sense to read the field directly in tests.
However, there's no real problem making these public, and I could see some use in making that info public (e.g. logging if something goes wrong), so I'll just make the methods public.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] edited a comment on pull request #16762: [BEAM-12697] Add primitive field generation from IR to SBE extension
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16762:
URL: https://github.com/apache/beam/pull/16762#issuecomment-1031843500
# [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#16762](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (49ecc54) into [master](https://codecov.io/gh/apache/beam/commit/07e1f84930bfda64cae5a9cad675082225bbe747?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (07e1f84) will **increase** coverage by `37.16%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #16762 +/- ##
===========================================
+ Coverage 46.45% 83.61% +37.16%
===========================================
Files 202 453 +251
Lines 19914 62482 +42568
===========================================
+ Hits 9251 52247 +42996
- Misses 9674 10235 +561
+ Partials 989 0 -989
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `83.61% <ø> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [sdks/go/pkg/beam/core/runtime/graphx/user.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZ3JhcGh4L3VzZXIuZ28=) | | |
| [sdks/go/pkg/beam/transforms/stats/quantiles.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3F1YW50aWxlcy5nbw==) | | |
| [sdks/go/pkg/beam/transforms/stats/min\_switch.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL21pbl9zd2l0Y2guZ28=) | | |
| [sdks/go/pkg/beam/core/runtime/exec/plan.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9wbGFuLmdv) | | |
| [sdks/go/pkg/beam/core/runtime/exec/fn\_arity.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9mbl9hcml0eS5nbw==) | | |
| [...ks/go/pkg/beam/core/runtime/coderx/coderx.shims.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvY29kZXJ4L2NvZGVyeC5zaGltcy5nbw==) | | |
| [sdks/go/pkg/beam/core/runtime/exec/combine.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL3J1bnRpbWUvZXhlYy9jb21iaW5lLmdv) | | |
| [sdks/go/pkg/beam/transforms/stats/sum.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS90cmFuc2Zvcm1zL3N0YXRzL3N1bS5nbw==) | | |
| [sdks/go/pkg/beam/core/graph/coder/registry.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL3JlZ2lzdHJ5Lmdv) | | |
| [sdks/go/pkg/beam/core/graph/coder/int.go](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2Rrcy9nby9wa2cvYmVhbS9jb3JlL2dyYXBoL2NvZGVyL2ludC5nbw==) | | |
| ... and [645 more](https://codecov.io/gh/apache/beam/pull/16762/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [07e1f84...49ecc54](https://codecov.io/gh/apache/beam/pull/16762?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org