Skip to content

Conversation

skyglass
Copy link
Member

Description

Added Exasol Trino connector support for Timestamp and Timestamp With Local Time Zone JDBC data types

Additional context and related issues

  • added correspondent tests for timestamp with precision data type
  • added correspondent tests for timestamp with local time zone with precision data type
  • implemented special addRoundTrip method with additional column expression parameter for the predicate to fix the test predicate assumption
  • all timestamp with timezone tests use input literal timestamp string, which is interpreted as a JVM timestamp string ("America/Bahia_Banderas") but expected literal strings are interpreted as UTC strings. Therefore the difference between these timestamps is 6 hours (with DST) or 5 (without DST); for some historical values, like 1970 for example, the difference can be 7, which is expected behaviour for timestamp with local time zone

Release notes

## Exasol Connect
* Add support for `timestamp` and `timestamp with time zone` types. 

Copy link

cla-bot bot commented Jul 22, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions bot added the exasol Exasol connector label Jul 22, 2025
Copy link

cla-bot bot commented Jul 22, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 37a2fe5 to 78d1495 Compare July 22, 2025 10:03
Copy link

cla-bot bot commented Jul 22, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass changed the title Add support for TIMESTAMP and TIMESTAMP WITH TIME ZONE types in Exasol connector [Closed Duplicate] Add support for TIMESTAMP and TIMESTAMP WITH TIME ZONE types in Exasol connector Jul 22, 2025
@skyglass skyglass changed the title [Closed Duplicate] Add support for TIMESTAMP and TIMESTAMP WITH TIME ZONE types in Exasol connector Add support for TIMESTAMP and TIMESTAMP WITH TIME ZONE types in Exasol connector Jul 22, 2025
@dekimir dekimir mentioned this pull request Jul 22, 2025
Copy link

cla-bot bot commented Jul 22, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from c950205 to d7ff56f Compare July 23, 2025 08:59
Copy link

cla-bot bot commented Jul 23, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

1 similar comment
Copy link

cla-bot bot commented Jul 23, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@github-actions github-actions bot added the docs label Jul 23, 2025
@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from ef6b95a to 07a421f Compare July 23, 2025 14:12
Copy link

cla-bot bot commented Jul 23, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 07a421f to 0d4b20a Compare July 24, 2025 12:14
Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 0d4b20a to bd554f9 Compare July 24, 2025 12:16
Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from bd554f9 to 4ff3087 Compare July 24, 2025 14:52
Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

3 similar comments
Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 2a722d5 to 2c0b293 Compare July 24, 2025 15:05
Copy link

cla-bot bot commented Jul 24, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 2c0b293 to cb525e5 Compare July 25, 2025 08:41
@github-actions github-actions bot added the stale label Sep 8, 2025
@yelianevich
Copy link

Hello everyone! Is anything missing on this PR? Looking forward to having it merged!

@github-actions github-actions bot removed the stale label Sep 9, 2025
@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 47da9cf to 3035c52 Compare September 10, 2025 18:17
@skyglass
Copy link
Member Author

Thank you very much for your reviews, @ebyhr , @chenjian2664 ! 👍

Any updates on the PR?
Please, let me know, if anything is missing or required.

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from 3035c52 to d94b914 Compare September 10, 2025 18:50
@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from d94b914 to fb10175 Compare September 11, 2025 09:36
@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from fb10175 to ab0858d Compare September 11, 2025 18:38
Copy link
Member Author

@skyglass skyglass left a comment

Choose a reason for hiding this comment

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

Thank you very much for the review comments, @ebyhr , @chenjian2664 ! 👍
I have resolved the conversations and added code changes, based on the review comments.

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch 3 times, most recently from 0270c0e to e1eaaeb Compare September 12, 2025 17:19
skyglass

This comment was marked as duplicate.

@skyglass skyglass force-pushed the feature/724_timestamp_data_types branch from e1eaaeb to 1fda337 Compare September 12, 2025 19:42
@skyglass skyglass changed the title Add support for TIMESTAMP and TIMESTAMP WITH TIME ZONE types in Exasol connector [Draft] Add support for TIMESTAMP and TIMESTAMP WITH TIME ZONE types in Exasol connector Sep 14, 2025
@skyglass skyglass marked this pull request as draft September 14, 2025 18:32
Copy link
Member Author

@skyglass skyglass left a comment

Choose a reason for hiding this comment

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

I decided to move this PR to DRAFT and replace it with the new PR, with more simple, more efficient and less error-prone solution: #26633

Please, review the new PR, @ebyhr , @chenjian2664 ! 🙏

After reviewing the implementation, I believe the current approach - mapping Exasol TIMESTAMP WITH LOCAL TIME ZONE to Trino TIMESTAMP WITH TIME ZONE - adds unnecessary complexity and potential pitfalls.

Exasol TIMESTAMP WITH LOCAL TIME ZONE does not actually persist any time zone information. Apart from some minor edge cases, its semantics is very close to a plain Exasol TIMESTAMP.

Mapping to Trino TIMESTAMP WITH TIME ZONE requires hardcoding the JVM time zone, which introduces fragility. For example, values valid in the Exasol DB time zone but invalid in the JVM time zone (e.g., during DST gaps) may cause Trino to throw exceptions, potentially breaking queries.

A simpler mapping to Trino TIMESTAMP avoids these problems, is more efficient, and aligns better with how Exasol handles this type internally.

Given this, I created a new PR proposing the TIMESTAMP WITH LOCAL TIME ZONE → TIMESTAMP mapping, which I believe will result in a cleaner, simpler and more reliable solution: #26633

@skyglass skyglass closed this Sep 15, 2025
@skyglass
Copy link
Member Author

Closed as outdated. See the new PR with improved solution for Exasol TIMESTAMP WITH LOCAL TIME ZONE: #26633

@chenjian2664
Copy link
Contributor

Does the timestamp part is the same as new pr #26259 ?

@skyglass
Copy link
Member Author

Does the timestamp part is the same as new pr #26259 ?

The new PR is here: #26633

The main difference is that the new PR maps Exasol TIMESTAMP WITH LOCAL TIME ZONE to Trino TIMESTAMP.
The new PR is more simple.

This current PR was closed, because it was mapping Exasol TIMESTAMP WITH LOCAL TIME ZONE to Trino TIMESTAMP WITH TIME ZONE, which is not necessary, because Exasol TIMESTAMP WITH LOCAL TIME ZONE doesn't actually store the time zone information.

@chenjian2664
Copy link
Contributor

If it just about TIMESTAMP WITH LOCAL TIME ZONE, we could split to support TIMESTAMP first

@skyglass
Copy link
Member Author

Does the timestamp part is the same as new pr #26259 ?

The new PR, which contains only TIMESTAMP changes, has been created:
#26963

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

Labels

Development

Successfully merging this pull request may close these issues.

4 participants