-
Notifications
You must be signed in to change notification settings - Fork 13
fix: sql negation #3812
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
base: feature/sql-run-all-tests
Are you sure you want to change the base?
fix: sql negation #3812
Conversation
| .withNegation(false); | ||
|
|
||
| QueryStep queryStep = converted.getLastConvertedStep(); | ||
| if (negationNode.getDateAction() != DateAggregationAction.NEGATE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die Stelle hier meine ich. Ggf. müssten wir darüber nochmal sprechen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich verstehe die Frage nicht ganz. Geht die negierte Datumsaggregation für dateMode=Logical jetzt nicht mehr?
awildturtok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sieht soweit gut aus, muss mir noch das SQL anschauen.
| if (queriesToJoin.stream().anyMatch(QueryStep::isNegate)) { | ||
| List<QueryStep> nonNegateSteps = queriesToJoin.stream().filter(Predicate.not(QueryStep::isNegate)).toList(); | ||
| List<QueryStep> negateSteps = queriesToJoin.stream().filter(QueryStep::isNegate).toList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier wäre ein partitioningBy schöner denke ich.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also
partitioned = queriesToJoin.partitionBy(isNegate);
if(!partitioned.get(true).isEmpty()){
...
}|
|
||
| return QueryStep.builder() | ||
| .cteName(context.getNameGenerator().joinedNodeName(logicalOperation) + NEGATED_CTE_SUFFIX) | ||
| .selects(nonNegateJoined.getQualifiedSelects()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Die selects von negated werden auch ausgegeben.
| .withNegation(false); | ||
|
|
||
| QueryStep queryStep = converted.getLastConvertedStep(); | ||
| if (negationNode.getDateAction() != DateAggregationAction.NEGATE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich verstehe die Frage nicht ganz. Geht die negierte Datumsaggregation für dateMode=Logical jetzt nicht mehr?
|
@awildturtok Der hier |
Das reverted alles, was bisher die nicht korrekt funktionierende Negation implementier hat.
Nur bzgl. invertiertes Validity Date bin ich mir noch unsicher - brauchen wir das irgendwie? Ich habe die entsprechende Stelle nochmal kommentiert.