Repository navigation
Compact dateAggregationCtes - #4092
Merged
awildturtok merged 7 commits intoNov 24, 2026
Merged
Conversation
awildturtok
changed the base branch from
develop
to
feature/complete-sql-selects
October 20, 2026 09:34
awildturtok
force-pushed
the
feature/move-row-numbering-to-preprocessing-cte
branch
from
October 20, 2026 09:43
ca48756 to
48bbe0c
Compare
awildturtok
force-pushed
the
feature/move-row-numbering-to-preprocessing-cte
branch
3 times, most recently
from
October 26, 2026 10:14
fcddafc to
15ec35c
Compare
thoniTUB
requested changes
Nov 11, 2026
Collaborator
Author
There was a problem hiding this comment.
iirc hat das rumschieben der ctes hier was gemacht, weiß es aber tbh nicht mehr
Comment on lines
+95
to
+101
| Condition startIsNull = allStarts.stream() | ||
| .map(Field::isNull) | ||
| .reduce(Condition::or) | ||
| .orElseThrow(); | ||
| Condition startBeforeEnd = this.functionProvider.greatest(allStarts).lessThan(this.functionProvider.least(allEnds)); | ||
| Condition noOverlapCondition = startIsNull.orNot(startBeforeEnd); | ||
|
|
Collaborator
There was a problem hiding this comment.
Da die methoden ahnlich sind: -> MergeCte.noOverlapCondition
| import org.jooq.Field; | ||
|
|
||
| @Getter | ||
| class IntermediateTableCte extends DateAggregationCte { |
Collaborator
There was a problem hiding this comment.
Bitte doku ergänzen, weshalb es diese intermediate table benötigt wird. Aus sql_date_aggregation.md verstehe ich, dass sie für die no_overlap cte im merge modus gebraucht wird. Aber für etwas anderes wird sie nicht gebraucht oder?
| context.getCarryThroughSelects() | ||
| ) | ||
| .flatMap(Collection::stream) | ||
| .collect(Collectors.toList()); |
Collaborator
There was a problem hiding this comment.
Hier weiter unten ist ein Pattern das sich mehrere male wiederholt:
SqlFunctionProvider functionProvider = context.getFunctionProvider();
Condition startBeforeEnd = functionProvider.greatest(allStarts).lessThan(functionProvider.least(allEnds));
Condition startIsNull = allStarts.stream()
.map(Field::isNull)
.reduce(Condition::or)
.orElseThrow();
Condition intermediateTableCondition = startIsNull.orNot(startBeforeEnd);
Das gibt es auch in AnsiSqlDateAggregator. Sind die Wiederholungen notwendig?
awildturtok
force-pushed
the
feature/move-row-numbering-to-preprocessing-cte
branch
2 times, most recently
from
November 11, 2026 16:15
3c6b5a4 to
53171d7
Compare
awildturtok
force-pushed
the
feature/move-row-numbering-to-preprocessing-cte
branch
2 times, most recently
from
November 12, 2026 15:38
443431a to
9710fea
Compare
thoniTUB
approved these changes
Nov 17, 2026
… and RequiredTable
Co-Authored-By: Codex GPT-5 <codex@openai.com>
Co-Authored-By: Codex GPT-5 <codex@openai.com>
Co-Authored-By: Codex GPT-5 <codex@openai.com>
Co-Authored-By: Codex GPT-5 <codex@openai.com>
Co-Authored-By: Codex GPT-5 <codex@openai.com>
awildturtok
force-pushed
the
feature/move-row-numbering-to-preprocessing-cte
branch
from
November 24, 2026 14:29
9710fea to
4344b06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduces overhead on joins