-
Notifications
You must be signed in to change notification settings - Fork 12
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
Absolute form conversion #3378
Conversation
c8d8831
to
941c5f4
Compare
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.
In der README hab ich nochmal versucht zusammenzufassen, wie der Prozess in SQL funktioniert. Ich hoffe das hilft etwas.
backend/src/main/java/com/bakdata/conquery/apiv1/query/EditorQuery.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/cqelement/CQExternalConverter.java
Show resolved
Hide resolved
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.
Danke für die ReadMe, das hat gut geholfen
...end/src/main/java/com/bakdata/conquery/apiv1/query/concept/specific/external/CQExternal.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/dialect/HanaSqlFunctionProvider.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/dialect/HanaSqlFunctionProvider.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/forms/AbsoluteStratification.java
Outdated
Show resolved
Hide resolved
.../main/java/com/bakdata/conquery/sql/conversion/forms/PostgresStratificationTableFactory.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/forms/README.md
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/model/QueryStepJoiner.java
Show resolved
Hide resolved
backend/src/test/resources/tests/sql/form/ABSOLUT/ALIGNMENT/YEAR QUARTER.json
Outdated
Show resolved
Hide resolved
backend/src/test/resources/tests/sql/form/ABSOLUT/ALIGNMENT/year quarter expected.csv
Outdated
Show resolved
Hide resolved
This reverts commit 55c33eb.
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, |
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.
Danke dir! Stratifizierung und Altersberechnung sehen korrekt aus
backend/src/main/java/com/bakdata/conquery/sql/conversion/forms/StratificationTableFactory.java
Outdated
Show resolved
Hide resolved
…s/README.md Co-authored-by: Torben Meyer <torben.meyer@bakdata.com>
…s/README.md Co-authored-by: Torben Meyer <torben.meyer@bakdata.com>
…ect/HanaSqlFunctionProvider.java Co-authored-by: Torben Meyer <torben.meyer@bakdata.com>
@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. |
…sion' into sql/feature/absolute-form-conversion
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 hab mir noch nicht alles angeschaut aber mir raucht jetzt erstmal der Kopf
backend/src/main/java/com/bakdata/conquery/models/error/ErrorMessages.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/cqelement/CQExternalConverter.java
Show resolved
Hide resolved
...rc/main/java/com/bakdata/conquery/sql/conversion/cqelement/concept/AggregationSelectCte.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/cqelement/concept/EventFilterCte.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/cqelement/concept/EventFilterCte.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/forms/StratificationFunctions.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/forms/StratificationFunctions.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/sql/conversion/model/LogicalOperation.java
Outdated
Show resolved
Hide resolved
if (this.isSingleColumnRange() != right.isSingleColumnRange()) { | ||
throw new UnsupportedOperationException("Can only join ColumnDateRanges of same type"); | ||
} |
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.
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
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.
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.
backend/src/test/java/com/bakdata/conquery/integration/IntegrationTest.java
Outdated
Show resolved
Hide resolved
); | ||
} | ||
|
||
private Field<Integer> getQuartersInMonths(Field<Date> date, int quarterOffset) { |
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.
monthsInQuarters
backend/src/main/java/com/bakdata/conquery/sql/conversion/forms/README.md
Outdated
Show resolved
Hide resolved
@@ -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, |
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.
warum fully Qualified?
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.
hm, jetzt hast du zwei Klassen, die Join-Type heißen und hier ein 1:1 mapping davon, magst du die vlt zusammenziehen?
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.
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.
if (queriesToJoin.size() == 1) { | ||
QueryStep convertedFeature = queriesToJoin.get(0); | ||
return createFinalSelect(form, stratificationTable, convertedFeature, childContext); | ||
} |
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.
sowas ist gerne mal quelle für bugs, kann der code unten explizit nicht mit N=1 umgehen?
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 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.
…s/README.md Co-authored-by: awildturtok <1553491+awildturtok@users.noreply.github.com>
@thoniTUB Ich musste nochmal dein Review anfordern, andernfalls kann ich nicht mergen wegen den requested changes 😄 |
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.
@jnsrnhld Alles klar :)
No description provided.