ahmedabu98 commented on code in PR #34856: URL: https://github.com/apache/beam/pull/34856#discussion_r2076263888
########## sdks/java/io/iceberg/src/main/java/org/apache/beam/sdk/io/iceberg/IcebergScanConfig.java: ########## @@ -204,13 +233,33 @@ public Builder setTableIdentifier(String... names) { public abstract Builder setBranch(@Nullable String branch); + public abstract Builder setKeepFields(@Nullable List<String> fields); + + public abstract Builder setDropFields(@Nullable List<String> fields); + public abstract IcebergScanConfig build(); } @VisibleForTesting abstract Builder toBuilder(); void validate(Table table) { + @Nullable List<String> keep = getKeepFields(); + @Nullable List<String> drop = getDropFields(); + if (keep != null || drop != null) { + checkArgument( + keep == null || drop == null, error("only one of 'keep' or 'drop' can be set.")); + Set<String> fieldsSpecified = Sets.newHashSet(checkNotNull(drop != null ? drop : keep)); Review Comment: Thanks, 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-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org