Skip to content

Commit

Permalink
Merge pull request FoundationDB#1900 from normen662/main
Browse files Browse the repository at this point in the history
introduce `ResolvedAccessor`
  • Loading branch information
MMcM committed Nov 8, 2022
2 parents 5d87de1 + 4092b55 commit 032f1e4
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 128 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ private static void addCoveringField(@Nonnull IndexKeyValueToPartialRecord.Build
@Nonnull AvailableFields.FieldData fieldData) {
// TODO field names are for debugging purposes only, we should probably use field ordinals here instead.
final var simplifiedFieldValue = (FieldValue)fieldValue.simplify(AliasMap.emptyMap(), ImmutableSet.of());
for (final var maybeFieldName : simplifiedFieldValue.getFieldPrefix().getFieldNamesMaybe()) {
for (final var maybeFieldName : simplifiedFieldValue.getFieldPrefix().getOptionalFieldNames()) {
Verify.verify(maybeFieldName.isPresent());
builder = builder.getFieldBuilder(maybeFieldName.get());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private static boolean addCoveringField(@Nonnull IndexKeyValueToPartialRecord.Bu
@Nonnull FieldValue fieldValue,
@Nonnull AvailableFields.FieldData fieldData) {
// TODO field names are for debugging purposes only, we should probably use field ordinals here instead.
for (final var maybeFieldName : fieldValue.getFieldPrefix().getFieldNamesMaybe()) {
for (final var maybeFieldName : fieldValue.getFieldPrefix().getOptionalFieldNames()) {
if (maybeFieldName.isEmpty()) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ private static boolean addCoveringField(@Nonnull IndexKeyValueToPartialRecord.Bu
@Nonnull FieldValue fieldValue,
@Nonnull AvailableFields.FieldData fieldData) {
// TODO field names are for debugging purposes only, we should probably use field ordinals here instead.
for (final var maybeFieldName : fieldValue.getFieldPrefix().getFieldNamesMaybe()) {
for (final var maybeFieldName : fieldValue.getFieldPrefix().getOptionalFieldNames()) {
if (maybeFieldName.isEmpty()) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public static <V extends Value> BindingMatcher<FieldValue> fieldValueWithFieldPa
downstreamValue);
final TypedMatcherWithExtractAndDownstream<FieldValue> downstreamFieldPathOrdinalsMatcher =
typedWithDownstream(FieldValue.class,
Extractor.of(f -> f.getFieldPathOrdinals().asList(), name -> "fieldPathOrdinals(" + name + ")"),
Extractor.of(f -> f.getFieldOrdinals().asList(), name -> "fieldPathOrdinals(" + name + ")"),
downstreamFieldPathOrdinals);
final TypedMatcherWithExtractAndDownstream<FieldValue> downstreamFieldPathTypesMatcher =
typedWithDownstream(FieldValue.class,
Expand Down

0 comments on commit 032f1e4

Please sign in to comment.