You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/08/04 06:22:00 UTC

[jira] [Work logged] (BEAM-9035) BIP-1: Typed options for Row Schema and Fields

     [ https://issues.apache.org/jira/browse/BEAM-9035?focusedWorklogId=466048&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-466048 ]

ASF GitHub Bot logged work on BEAM-9035:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Aug/20 06:21
            Start Date: 04/Aug/20 06:21
    Worklog Time Spent: 10m 
      Work Description: kanterov commented on a change in pull request #10413:
URL: https://github.com/apache/beam/pull/10413#discussion_r464824602



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/Schema.java
##########
@@ -986,10 +1246,8 @@ public Field getField(String name) {
   /** Find the index of a given field. */
   public int indexOf(String fieldName) {
     Integer index = fieldIndices.get(fieldName);
-    if (index == null) {

Review comment:
       This change caused BEAM-10631, we should always use if-blocks (as it was), or lazy `Preconditions.checkArgument(boolean condition, String format, Object args...)`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 466048)
    Time Spent: 8h 50m  (was: 8h 40m)

> BIP-1: Typed options for Row Schema and Fields
> ----------------------------------------------
>
>                 Key: BEAM-9035
>                 URL: https://issues.apache.org/jira/browse/BEAM-9035
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Alex Van Boxel
>            Assignee: Alex Van Boxel
>            Priority: P2
>             Fix For: 2.21.0
>
>          Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> This is the first issue of a multipart commit: this ticket implements the basic infrastructure of options on row and field.
> Full explanation:
> Introduce the concept of Options in Beam Schema’s to add extra context to fields and schema. In contracts to metadata, options would be added to fields, logical types and rows. In the options schema convertors can add options/annotations/decorators that were in the original schema, this context can be used in the rest of the pipeline for specific transformations or augment the end schema in the target output.
> Examples of options are:
>  * informational: like the source of the data, ...
>  * drive decisions further in the pipeline: flatten a row into another, rename a field, ...
>  * influence something in the output: like cluster index, primary key, ...
>  * logical type information
> And option is a key/typed value combination. The advantages of having the value types is: 
>  * Having strongly typed options would give a *portable way of Logical Types* to have structured information that could be shared over different languages.
>  * This could keep the type intact when mapping from a formats that have strongly typed options (example: Protobuf).
> This is part of a multi ticket implementation. The following tickets are related:
>  # Typed options for Row Schema and Fields
>  # Convert Proto Options to Beam Schema options
>  # Convert Avro extra information for Beam string options
>  # Replace meta data with Logical Type options
>  # Extract meta data in Calcite SQL to Beam options
>  # Extract meta data in Zeta SQL to Beam options
>  # Add java example of using option in a transform 
> This feature is discussed with Reuven Lax, Brian Hulette



--
This message was sent by Atlassian Jira
(v8.3.4#803005)