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

Absolute form conversion #3378

Merged
merged 32 commits into from
Apr 24, 2024
Merged

Conversation

jnsrnhld
Copy link
Collaborator

@jnsrnhld jnsrnhld commented Apr 8, 2024

No description provided.

@jnsrnhld jnsrnhld force-pushed the sql/feature/absolute-form-conversion branch from c8d8831 to 941c5f4 Compare April 8, 2024 12:44
Copy link
Collaborator Author

@jnsrnhld jnsrnhld left a comment

Choose a reason for hiding this comment

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

In der README hab ich nochmal versucht zusammenzufassen, wie der Prozess in SQL funktioniert. Ich hoffe das hilft etwas.

@jnsrnhld jnsrnhld requested a review from awildturtok April 8, 2024 13:37
@awildturtok awildturtok requested a review from thoniTUB April 8, 2024 13:39
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.

Danke für die ReadMe, das hat gut geholfen

Comment on lines +1 to +5
result,resolution,index,date_range,Alter
1,complete,,2012-06-16/2014-12-17,57
1,year,1,2012-06-16/2013-03-31,56
1,year,2,2013-04-01/2014-03-31,
1,year,3,2014-04-01/2014-12-17,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Danke dir! Stratifizierung und Altersberechnung sehen korrekt aus

@jnsrnhld
Copy link
Collaborator Author

@awildturtok @thoniTUB Wir sind bei dem Alignment DAY und der EntityDate Query an die Grenzen unseres Ansatzes gestoßen und haben nochmal einen neuen Ansatz ausgearbeitet. Damit ändert sich die Art und Weise, wie wir die Stratifizierungstabellen erstellen nochmal deutlich. Die README enthält dazu auch die aktualisierten Beispiele.

Copy link
Collaborator

@awildturtok awildturtok left a comment

Choose a reason for hiding this comment

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

Ich hab mir noch nicht alles angeschaut aber mir raucht jetzt erstmal der Kopf

Comment on lines +105 to +107
if (this.isSingleColumnRange() != right.isSingleColumnRange()) {
throw new UnsupportedOperationException("Can only join ColumnDateRanges of same type");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

in Hana können wir ja eh keine singleColumnRanges machen oder? Können wir dann vlt einen Standard erzwingen? Also in Hana müssen es compounds sein, in psql müssen es singleColumnRanges sein

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Siehe oben, können wir gerne darüber sprechen weil mir das auch nicht gefällt wie es aktuell ist, aber sehe ich nicht im Rahmen dieses PRs, weil das mMn. sehr viele Änderungen wären.

);
}

private Field<Integer> getQuartersInMonths(Field<Date> date, int quarterOffset) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

monthsInQuarters

@@ -24,7 +26,7 @@ public class QueryStepJoiner {
public static QueryStep joinChildren(
Iterable<CQElement> children,
ConversionContext context,
LogicalOperation logicalOperation,
com.bakdata.conquery.sql.conversion.model.JoinType logicalOperation,
Copy link
Collaborator

Choose a reason for hiding this comment

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

warum fully Qualified?

Copy link
Collaborator

Choose a reason for hiding this comment

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

hm, jetzt hast du zwei Klassen, die Join-Type heißen und hier ein 1:1 mapping davon, magst du die vlt zusammenziehen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hab es nochmal umbenannt: wir hatten die Klasse damals eingeführt und so benannt, weil es im Grund ein Subset vom JOOQ Enum JoinType ist. Deswegen auch der lange Qualifier an der einen Stelle.

Comment on lines 59 to 62
if (queriesToJoin.size() == 1) {
QueryStep convertedFeature = queriesToJoin.get(0);
return createFinalSelect(form, stratificationTable, convertedFeature, childContext);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

sowas ist gerne mal quelle für bugs, kann der code unten explizit nicht mit N=1 umgehen?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich strukturiere das nochmal um, sodass der Check in der Method selbst stattfindet. Also joinSteps() joined nur, wenn size > 1, ansonsten wird der einzige Step zurückgegeben.

@jnsrnhld jnsrnhld requested a review from thoniTUB April 23, 2024 14:37
@jnsrnhld
Copy link
Collaborator Author

@thoniTUB Ich musste nochmal dein Review anfordern, andernfalls kann ich nicht mergen wegen den requested changes 😄

@jnsrnhld jnsrnhld enabled auto-merge (squash) April 23, 2024 18:19
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.

@jnsrnhld Alles klar :)

@jnsrnhld jnsrnhld merged commit d4291e9 into develop Apr 24, 2024
6 checks passed
@delete-merged-branch delete-merged-branch bot deleted the sql/feature/absolute-form-conversion branch April 24, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants