-
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
Implement SecondaryId conversion #3317
Conversation
* selects the right column for the given secondaryId from a table | ||
*/ | ||
@CheckForNull | ||
private Column findSecondaryIdColumn(Table table) { |
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.
Den Teil hier habe ich in die Table
Klasse verschoben und public gemacht, damit ich bei der Conversion auch darauf zugreifen kann.
backend/src/main/java/com/bakdata/conquery/apiv1/query/concept/filter/CQTable.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.
Duplizierte ungenutzte Klasse.
backend/src/main/java/com/bakdata/conquery/sql/conversion/model/Qualifiable.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.
Für die tests hab ich gerade leider keinen Kopf, Code ist ja aber im Grunde nur durchhangeln der SelectsIds. (sind nur +~80 Zeilen Code wenn man die Tests ignoriert 🔥 )
...ava/com/bakdata/conquery/sql/conversion/cqelement/intervalpacking/AnsiSqlIntervalPacker.java
Show resolved
Hide resolved
import org.jooq.Field; | ||
import org.jooq.impl.DSL; | ||
|
||
public class SelectsIds implements Qualifiable<SelectsIds> { |
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.
der Name ist etwas merkwürdig, sit das ein Typo?
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.
Meine Herleitung war: das sind die IDs für die Selects
Klasse, also hab ich SelectsIds
draus gemacht.
Du meinst Typo im Sinne dass es SelectIds
heißen sollte?
Ansonsten würde ich anbieten:
SqlIds
SqlIdColumns
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.
Glaube SqlIdColumns gefällt mir am besten.
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.
@awildturtok Mir auch, hab die Klasse umbenannt. Ist sonst noch was offen?
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 Tests hast du aus den legacy tests kopiert oder? Wenn ja dann passt. Sonst würde ich nochmal drüber gehen.
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.
genau, sind 1 zu 1 übernommen, außer dass ich DATE_RANGE
validity dates in start und end DATE column umgewandelt hab, sodass es für beide Dialekte passt.
joinSecondariesCondition = leftIds.getSecondaryId().get().eq(rightIds.getSecondaryId().get()); | ||
} | ||
else { | ||
joinSecondariesCondition = DSL.noCondition(); |
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.
invert und early return?
No description provided.