Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023 10 gg snapshot fix #1471

Merged
merged 10 commits into from
Oct 24, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private ElementDefinition processPaths(final ProfilePathProcessorState cursors)
ElementDefinition res = null;
List<TypeSlice> typeList = new ArrayList<>();
// just repeat processing entries until we run out of our allowed scope (1st entry, the allowed scope is all the entries)
while (cursors.baseCursor <= getBaseLimit()) {
while (cursors.baseCursor <= getBaseLimit() && cursors.baseCursor < cursors.base.getElement().size()) {
// get the current focus of the base, and decide what to do
ElementDefinition currentBase = cursors.base.getElement().get(cursors.baseCursor);
String currentBasePath = profileUtilities.fixedPathSource(getContextPathSource(), currentBase.getPath(), getRedirector());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private void executeSelect(JsonObject select, Base b, List<List<Cell>> rows) {
focus.add(b);
}

// } else if (select.has("union")) {
// } else if (select.has("unionAll")) {
// focus.addAll(executeUnion(select, b));

List<List<Cell>> tempRows = new ArrayList<>();
Expand All @@ -149,7 +149,7 @@ private void executeSelect(JsonObject select, Base b, List<List<Cell>> rows) {
executeColumn(column, f, rowsToAdd);
}

for (JsonObject sub : select.getJsonObjects("union")) {
for (JsonObject sub : select.getJsonObjects("unionAll")) {
executeSelect(sub, f, rowsToAdd);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public void checkViewDefinition(String path, JsonObject viewDefinition) {
checkForEach(path, viewDefinition, viewDefinition.get("forEach"), t);
} else if (viewDefinition.has("forEachOrNull")) {
checkForEachOrNull(path, viewDefinition, viewDefinition.get("forEachOrNull"), t);
} else if (viewDefinition.has("union")) {
checkUnion(path, viewDefinition, viewDefinition.get("union"), t);
} else if (viewDefinition.has("unionAll")) {
checkUnion(path, viewDefinition, viewDefinition.get("unionAll"), t);
} else {
i = 0;
if (checkAllObjects(path, viewDefinition, "select")) {
Expand Down Expand Up @@ -135,8 +135,8 @@ private void checkSelect(String path, JsonObject select, TypeDetails t) {
if (t != null) {
boolean content = false;

if (select.has("union")) {
content = checkUnion(path, select, select.get("union"), t);
if (select.has("unionAll")) {
content = checkUnion(path, select, select.get("unionAll"), t);
}

if (select.has("column")) {
Expand Down Expand Up @@ -181,7 +181,7 @@ private void checkSelect(String path, JsonObject select, TypeDetails t) {


private boolean checkUnion(String path, JsonObject focus, JsonElement expression, TypeDetails t) {
JsonElement a = focus.get("union");
JsonElement a = focus.get("unionAll");
if (!(a instanceof JsonArray)) {
error(path+".union", a, "union is not an array", IssueType.INVALID);
return false;
Expand Down