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
Move common implementation to base implementation #33369
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
|
||
protected abstract Condition cdcDeletedAtNotNullCondition(); | ||
|
||
protected abstract Field<Integer> getRowNumber(final List<ColumnId> primaryKey, final Optional<ColumnId> cursorField); |
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.
jooq already handles dialect specific rowNumber()
window step function but the additional support of DESC NULLS FIRST|LAST is missing (which redshift and snowflake does). so, made it abstract
is it possible to extract a JdbcSqlGeneratorIntegrationTest class? I feel like that's the last piece missing (and also huge leverage, iirc implementing the redshift version took nearly 2 days) |
I think so, I'll take a look. expected fixtures will still be destination specific but some of the setup/teardown code can go to this class. |
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.
took a quick pass over this. Left a few comments but didn't read the sqlgenerators in great detail. I think this is really great though, love that everything in RedshiftSqlGenerator is actually redshift-specific now ❤️
will do another pass later but I think this is enough for me to write up some tickets for mysql :)
...main/java/io/airbyte/cdk/integrations/destination/jdbc/typing_deduping/JdbcSqlGenerator.java
Outdated
Show resolved
Hide resolved
if (!force) { | ||
return Strings.join( | ||
List.of( | ||
createSchemaSql(stream.id().finalNamespace()), |
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.
...main/java/io/airbyte/cdk/integrations/destination/jdbc/typing_deduping/JdbcSqlGenerator.java
Show resolved
Hide resolved
...main/java/io/airbyte/cdk/integrations/destination/jdbc/typing_deduping/JdbcSqlGenerator.java
Outdated
Show resolved
Hide resolved
...main/java/io/airbyte/cdk/integrations/destination/jdbc/typing_deduping/JdbcSqlGenerator.java
Show resolved
Hide resolved
import org.jooq.meta.TableDefinition; | ||
|
||
public abstract class JdbcSqlGeneratorIntegrationTest<T> extends BaseSqlGeneratorIntegrationTest<T> { | ||
|
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.
@edgao Moved reusable methods to base class. Thing to be noted is typing-deduping doesn't depend on CDK so i had to leave it generic type. I think these methods should be moved to a Util rather than a base test class in later refactors.
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.
we could put this into db-destinations.testFixtures?
e914adb
to
aa02722
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.
approving just so we can get this thing merged, but we probably should add the useExpensiveSaferCasting
logic soonish
private String insertAndDeleteTransaction(final StreamConfig streamConfig, | ||
final String finalSuffix, | ||
final Optional<Instant> minRawTimestamp, | ||
final boolean useExpensiveSaferCasting) { |
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.
intellij says this param isn't being used?
/publish-java-cdk
|
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
…dbc sqls Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
c4d5155
to
f392129
Compare
/publish-java-cdk
|
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
Signed-off-by: Gireesh Sreepathi <gisripa@gmail.com>
What
Promotes common implementation to base class and redshift specific overrides.
Anything jooq supports with dialect specific syntax is moved to JdbcSqlGenerator.
Breaking CDK changes.
Closes #31591