Skip to content

Commit

Permalink
refactor: use ifPresent for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarua committed Nov 2, 2023
1 parent 7951985 commit 930addf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/io/substrait/dsl/SubstraitBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class SubstraitBuilder {
static final TypeCreator R = TypeCreator.of(false);
static final TypeCreator N = TypeCreator.of(true);

private static final String FUNCTIONS_AGGREGATE_GENERIC = "/functions_aggregate_generic.yaml";
private static final String FUNCTIONS_ARITHMETIC = "/functions_arithmetic.yaml";
private static final String FUNCTIONS_COMPARISON = "/functions_comparison.yaml";
private static final String FUNCTIONS_AGGREGATE_GENERIC = "/functions_aggregate_generic.yaml";

private final SimpleExtension.ExtensionCollection extensions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public Rel visit(NamedScan namedScan) throws RuntimeException {
.setNamedTable(ReadRel.NamedTable.newBuilder().addAllNames(namedScan.getNames()))
.setBaseSchema(namedScan.getInitialSchema().toProto(typeProtoConverter));

namedScan.getFilter().map(f -> builder.setFilter(toProto(f)));
namedScan.getFilter().ifPresent(f -> builder.setFilter(toProto(f)));

namedScan.getExtension().ifPresent(ae -> builder.setAdvancedExtension(ae.toProto()));
return Rel.newBuilder().setRead(builder).build();
Expand Down

0 comments on commit 930addf

Please sign in to comment.