Skip to content

DBZ-6387 Addding new isostring, microseconds, nanoseconds TemporalPrecisionModes#6002

Merged
jpechane merged 3 commits intodebezium:mainfrom
ismailsimsek:isostring-temporal-type
Jan 14, 2025
Merged

DBZ-6387 Addding new isostring, microseconds, nanoseconds TemporalPrecisionModes#6002
jpechane merged 3 commits intodebezium:mainfrom
ismailsimsek:isostring-temporal-type

Conversation

@ismailsimsek
Copy link
Contributor

@ismailsimsek ismailsimsek commented Nov 20, 2024

Adding 3 new non adaptive temporal modes:

  • isostring: converts to UTC ISO 8601
  • microseconds: converts to int64, always with microseconds precision mode. not adaptive
  • nanoseconds: converts to int64, always with nanoseconds precision mode. not adaptive

Implements DBZ-6387

remaining todos

  • update code comments
  • add it to postgresql array types as well

Requires debezium/debezium-connector-vitess#219

@github-actions
Copy link

Hi @ismailsimsek. Thank you for your valuable contribution.
Please author your commit(s) using an email linked to your GitHub account.

@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch from e0028b1 to e7418ee Compare November 20, 2024 18:56
@github-actions
Copy link

Hi @ismailsimsek. Thank you for your valuable contribution.
Please author your commit(s) using an email linked to your GitHub account.

@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch 2 times, most recently from 1621d23 to 77bee5c Compare November 20, 2024 19:19
@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch 3 times, most recently from a2725c0 to 17a0802 Compare November 21, 2024 19:12
@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch 2 times, most recently from 4a8988b to 607db6d Compare November 21, 2024 20:18
@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch 3 times, most recently from 733e48f to 7bb4259 Compare November 22, 2024 17:53
@ismailsimsek
Copy link
Contributor Author

ismailsimsek commented Nov 22, 2024

JDBC test failing with following error. i think, because its using old version of debezium (test-container) and trying to validate the new enum value.

2024-11-22T18:09:08.0937176Z Caused by: java.lang.IllegalStateException: Unexpected response: Response{protocol=http/1.1, code=400, message=Bad Request, url=http://localhost:32779/connectors/} ; Response Body: {"error_code":400,"message":"Connector configuration is invalid and contains the following 1 error(s):\nThe 'time.precision.mode' value is invalid: Value must be one of adaptive, adaptive_time_microseconds, connect\nYou can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`"}

@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch from 9f07312 to b6e6ba3 Compare November 24, 2024 12:24
@ismailsimsek ismailsimsek changed the title DBZ-6387 Add isostring TemporalPrecisionMode DBZ-6387 Addding new isostring,microseconds,nanoseconds TemporalPrecisionModes Nov 25, 2024
@ismailsimsek ismailsimsek changed the title DBZ-6387 Addding new isostring,microseconds,nanoseconds TemporalPrecisionModes DBZ-6387 Addding new isostring,microseconds,nanoseconds TemporalPrecisionModes Nov 25, 2024
@ismailsimsek ismailsimsek changed the title DBZ-6387 Addding new isostring,microseconds,nanoseconds TemporalPrecisionModes DBZ-6387 Addding new isostring, microseconds, nanoseconds TemporalPrecisionModes Nov 25, 2024
@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch 2 times, most recently from 5bc2b7c to 69563df Compare November 25, 2024 17:57
@ismailsimsek ismailsimsek force-pushed the isostring-temporal-type branch from 69563df to e0b7da6 Compare November 25, 2024 20:15
@ismailsimsek
Copy link
Contributor Author

@jpechane its ready for review. JDBC test failing, i think because its using old code with container.

Copy link
Contributor

@jpechane jpechane left a comment

Choose a reason for hiding this comment

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

@ismailsimsek I pushed some refactorings related to the schema building and I hope they work as intended. Also few more comments were added so please take a look. Thsi PR will be merged at the beginning of January into Debezium 3.1.


assertEquals(after.get("c_id"), 2);
// '2017-09-15'::DATE
// assertEquals(after.get("c_date"), "2017-09-15Z");
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sure no asserts are comented out.

Copy link
Contributor Author

@ismailsimsek ismailsimsek Dec 11, 2024

Choose a reason for hiding this comment

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

Added FIx for date conversion and activated this line.

@jpechane
Copy link
Contributor

/packit test --labels oracle

…es, apply code review suggestions and fix date conversion
Comment on lines +397 to +398
case NANOSECONDS:
case MICROSECONDS:
Copy link
Contributor Author

@ismailsimsek ismailsimsek Dec 11, 2024

Choose a reason for hiding this comment

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

this was missing and catched by test. added them.

NANOSECONDS and MICROSECONDS will generate EpochDays for DATE values.

@ismailsimsek
Copy link
Contributor Author

ismailsimsek commented Dec 11, 2024

@ismailsimsek I pushed some refactorings related to the schema building and I hope they work as intended. Also few more comments were added so please take a look. Thsi PR will be merged at the beginning of January into Debezium 3.1.

Thank you @jpechane applied suggestions and added a fix for DATE values.

@jpechane jpechane merged commit 36419da into debezium:main Jan 14, 2025
@jpechane
Copy link
Contributor

@ismailsimsek Applied, thanks! Could you please send a follw-up PR with doc updates? Thanks a lot

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants