Skip to content

Conversation

@awildturtok
Copy link
Collaborator

Fixes the bug, where null values or values without validity date would overwrite selected values.

@awildturtok awildturtok requested a review from jnsrnhld August 18, 2025 15:09
@awildturtok awildturtok self-assigned this Aug 18, 2025
@awildturtok awildturtok requested a review from thoniTUB as a code owner August 18, 2025 15:09
Copy link
Collaborator

@thoniTUB thoniTUB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cooler Ansatz mit der Window Funktion :)

endDateExpression = dateRestriction.getMax().toString();
}

return ColumnDateRange.of(toDateField(startDateExpression), toDateField(endDateExpression));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich habe gesehen, dass oft das Range-End exclusiv ist, ist das hier nicht so?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wir behandeln alle Ranges end-inclusive, postgres konvertiert alle automatisch nach end-exclisive, was ziemlich nervig ist.

@jnsrnhld stimmt das so?

@awildturtok awildturtok force-pushed the feature/sql/fix-last-first-value-select branch from d0abfad to fb44820 Compare November 5, 2025 16:17
endDateExpression = dateRestriction.getMax().toString();
}

return ColumnDateRange.of(toDateField(startDateExpression), toDateField(endDateExpression));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wir behandeln alle Ranges end-inclusive, postgres konvertiert alle automatisch nach end-exclisive, was ziemlich nervig ist.

@jnsrnhld stimmt das so?

@awildturtok awildturtok requested a review from thoniTUB November 6, 2025 16:19
@awildturtok awildturtok force-pushed the feature/sql/fix-last-first-value-select branch from d49110a to 00056e4 Compare November 11, 2025 08:19
@awildturtok awildturtok force-pushed the feature/sql/fix-last-first-value-select branch from b36cb76 to 6278da3 Compare November 11, 2025 10:56
Copy link
Collaborator

@thoniTUB thoniTUB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nur noch die kleine Aufräumaktion (rawValidityDate->validityDateCondition/validityDateFilter). Ich hoffe das geht

}
}

conditions.add(functionProvider.validityDateFilter(tableContext.getRawValidityDate()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Und kannst du den functionProvider.validityDateFilter(tableContext.getRawValidityDate()) jetzt nicht nach CQConceptConverter.java schieben und rawValidityDate aus CQTableContext.java loschen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Der Code da ist komisch vertrackt aber ich kann ihn nochmal versuchen zu verstehen, um es besser zu platzieren. So wie ich das verstehe ist der Context auch einfach etwas eine schlechte Abstraktion: Hier wird viel Vorarbeit geleistet, die dann verkettet wird. Besser wäre da drin nur den Context zu speichern und die arbeit dann in den CTEs, aber ist alles etwas merkwürdig

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Habs geschafft. Musste den Code etwas verstehen, aber hab ihn dadurch echt gut aufräumen können

@awildturtok awildturtok requested a review from thoniTUB November 11, 2025 17:15
@awildturtok awildturtok merged commit ec3c3d9 into develop Nov 12, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants