-
Notifications
You must be signed in to change notification settings - Fork 55
Snowflake dialect #57
Snowflake dialect #57
Conversation
Hi @lukasznowak-viacom, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key. |
Welcome as a new contributor to Debezium, @lukasznowak-viacom. Reviewers, please add missing author name(s) and alias name(s) to the COPYRIGHT.txt and Aliases.txt respectively. |
Hi @lukasznowak-viacom Thanks for this PR. Can you please open an issue explaining the requirements for that? This can help the discussion and review. Thanks. |
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.
I left a few inline comments.
public class SnowflakeDialect extends org.hibernate.dialect.Dialect { | ||
|
||
@Override | ||
public DatabaseVersion getVersion() { | ||
return new DatabaseVersion() { | ||
@Override | ||
public int getDatabaseMajorVersion() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int getDatabaseMinorVersion() { | ||
return 0; | ||
} | ||
}; | ||
} | ||
} |
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.
Given that the SnowflakeDialect
implementation here is basically a generalized shell of Hibernate's Dialect
base class, I wonder whether it would make more sense to add a way that a user could influence the dialect chosen directly using the JDBC sink connector's dialect and perhaps we could omit this specific class all together somehow?
|
||
/** | ||
* An implementation of {@link Type} that provides compatibility with other dialect's numeric | ||
* types to Oracle's numeric 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.
* types to Oracle's numeric type. | |
* types to Snowflake's numeric type. |
import java.util.Optional; | ||
|
||
/** | ||
* A {@link DatabaseDialect} implementation for Oracle. |
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.
* A {@link DatabaseDialect} implementation for Oracle. | |
* A {@link DatabaseDialect} implementation for Snowflake. |
|
||
@Override | ||
protected Optional<String> getDatabaseTimeZoneQuery() { | ||
return Optional.of("SELECT DBTIMEZONE, SESSIONTIMEZONE FROM DUAL"); |
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.
Does Snowflake support DBTIMEZONE
and SESSIONTIMEZONE
like Oracle?
Hi @lukasznowak-viacom, we've moved this repository to the main https://github.com/debezium/debezium repository. If this is still something you are working on and intend to contribute, please re-open this PR against that repository and address the above review comments. Thanks! |
No description provided.