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 2020/08/04 06:21:10 UTC

[GitHub] [beam] kanterov commented on a change in pull request #10413: [BEAM-9035] Typed options for Row Schema and Field

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