Skip to content

Added treatAsOldTimeStamp field#2

Open
Krish-cloudsufi wants to merge 10 commits intodevelopfrom
Timestamp
Open

Added treatAsOldTimeStamp field#2
Krish-cloudsufi wants to merge 10 commits intodevelopfrom
Timestamp

Conversation

@Krish-cloudsufi
Copy link
Owner

No description provided.

Choose a reason for hiding this comment

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

This logic is already there at line 223

@@ -84,7 +87,11 @@ public Schema getSchema(ResultSetMetaData metadata, int index) throws SQLExcepti
return Schema.of(Schema.LogicalType.TIMESTAMP_MICROS);
case Types.TIMESTAMP:
Copy link

@vikasrathee-cs vikasrathee-cs May 28, 2025

Choose a reason for hiding this comment

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

For timestamp it should be return Schema.of(Schema.LogicalType.DATETIME); always. handle both cases separately

}

public OracleSourceSchemaReader(String sessionID) {
public OracleSourceSchemaReader(String sessionID, boolean treatAsOldTimestamp) {

Choose a reason for hiding this comment

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

you have to call it in oracle source class to make it work

Copy link
Owner Author

Choose a reason for hiding this comment

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

Done!

Choose a reason for hiding this comment

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

make it object type otherwise it will be shown as mandatory

Choose a reason for hiding this comment

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

do like this
return Boolean.TRUE.equals(treatAsOldTimestamp);

Choose a reason for hiding this comment

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

make return type as primitive

Choose a reason for hiding this comment

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

make it primitive

return Schema.of(Schema.LogicalType.DATETIME);
case TIMESTAMP_LTZ:
if (treatAsOldTimestamp) {
return Schema.of(Schema.LogicalType.TIMESTAMP_MICROS);

Choose a reason for hiding this comment

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

add a comment mentioning why are we doing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments