Skip to content

Commit

Permalink
Correcting hanling of NULLs when concatenating results of reverseReso…
Browse files Browse the repository at this point in the history
…lve for non existing keys.
  • Loading branch information
piotrszul committed Jan 8, 2025
1 parent 15d2569 commit 00b4d25
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 195 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public class ParserTest extends AbstractParserTest {

@SuppressWarnings("SameParameterValue")
private <T extends Throwable> T assertThrows(final Class<T> errorType, final String expression) {
return Assertions.assertThrows(errorType, () -> executor.evaluate(ResourceType.PATIENT, expression));
return Assertions.assertThrows(errorType,
() -> executor.evaluate(ResourceType.PATIENT, expression));
}

private TranslateExpectations setupMockTranslationFor_195662009_444814009(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,217 +1,27 @@
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e 54c45763-20f4-4a54-a506-7be0b3405836
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e 1f7f64e2-db15-4821-ae11-cfc16ee328bf
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e 3d4f9569-1a5d-40b2-9383-91de37db9af7
121503c8-9564-4b48-9086-a22df717948e d8ca2cfd-94cc-4ebc-b49f-22534a662e86
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e f433abac-e782-4b76-b03a-f39e090ffba3
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e d8c3ae50-a099-48b0-bc8d-c1fe98219afe
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e
121503c8-9564-4b48-9086-a22df717948e 05fd5547-18ab-406b-9da1-5eea3e787e7f
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702 542857ec-8ddf-4a4a-bc8c-ffd0a349101b
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
2b36c1e2-bbe1-45ae-8124-4adad2677702
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469 9f6e34e4-c9f7-44dd-8ad9-17ec9f31e4b3
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469 a855f6cc-0bb7-4e7b-ab51-db570c3e2b4e
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
7001ad9c-34d2-4eb5-8165-5fdc2147f469
8ee183e2-b3c0-4151-be94-b945d6aa8c6d 7ab71676-8460-434c-bd00-f1164820cc7d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
8ee183e2-b3c0-4151-be94-b945d6aa8c6d
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20 92788782-57e9-4089-b462-c26de46781a6
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20 dcca1188-e211-47fb-aa6a-269014f58bb7
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20 d77ffb18-21b6-4c2a-8b6c-0c2411870c2d
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20 122ca2d5-d026-4952-929b-8df056a4a157
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20 ee50d60f-0488-465b-939c-f27a9376cb1a
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
9360820c-8602-4335-8b50-c88d627a0c20
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55 b1775b0d-230c-4f65-963d-91ab3a446d7c
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55 7a7f1ab8-d356-49ca-8514-99f31ee27ef3
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55 bb8cc17c-93c4-4f36-894f-fc7f192a6fab
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
a7eb2ce7-1075-426c-addd-957b861b0e55
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9 01b9ab89-fa4e-40cb-a020-d544b82ea31d
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9 a0161707-e016-4d92-a681-c1c358d8d37b
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9 017e4feb-9b7f-4e5c-b8d8-f09b01145224
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9 5a807931-7736-47a7-a250-b7067b461f2b
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
bbd33563-70d9-4f6d-a79a-dd1fc55f5ad9
beff242e-580b-47c0-9844-c1a68c36c5bf
beff242e-580b-47c0-9844-c1a68c36c5bf
beff242e-580b-47c0-9844-c1a68c36c5bf
beff242e-580b-47c0-9844-c1a68c36c5bf
beff242e-580b-47c0-9844-c1a68c36c5bf
beff242e-580b-47c0-9844-c1a68c36c5bf
beff242e-580b-47c0-9844-c1a68c36c5bf
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08 ca000fdd-4559-4fed-9b51-3e68a4af25d4
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08 bd244a5f-9c8b-44ab-8a80-dec44de03dc9
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08 9be4c8a3-b0e8-4301-919a-89da2cfff37d
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
e62e52ae-2d75-4070-a0ae-3cc78d35ed08
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public ColumnRepresentation singular() {
*/
@Nonnull
public ColumnRepresentation applyTo(@Nonnull final Column mapColumn) {
return transform(mapColumn::apply).flatten();
return transform(mapColumn::apply).removeNulls().flatten();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,6 @@ void nestedReverseResolveToAggregation() {
);
System.out.println(resultDataset.queryExecution().executedPlan().toString());
resultDataset.show();

// TODO: should be 0 in the last row

new DatasetAssert(resultDataset)
.hasRowsUnordered(
RowFactory.create("1", 4),
Expand Down Expand Up @@ -330,6 +327,7 @@ void nestedResolveOneToValue() {
new Encounter().setSubject(new Reference("Patient/1")).setId("Encounter/1.1"),
new Encounter().setSubject(new Reference("Patient/1")).setId("Encounter/1.2"),
new Encounter().setSubject(new Reference("Patient/2")).setId("Encounter/2.1"),
new Encounter().setSubject(new Reference("Patient/2")).setId("Encounter/2.2"),
new Condition().setSubject(new Reference("Patient/1"))
.setEncounter(new Reference("Encounter/1.1")).setId("Condition/1.1.1"),
new Condition().setSubject(new Reference("Patient/1"))
Expand Down

0 comments on commit 00b4d25

Please sign in to comment.