Skip to content

Conversation

ssheikin
Copy link
Contributor

@ssheikin ssheikin commented Oct 15, 2024

Copy link
Member

@Praveen2112 Praveen2112 left a comment

Choose a reason for hiding this comment

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

I need to check with the test code

Copy link
Member

Choose a reason for hiding this comment

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

Isn't this check a bit redundant ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it may be useful. In Trino MAX_PRECISION = 12 for TimestampWithTimeZoneType.

@ssheikin ssheikin force-pushed the ssheikin/43/trino/clickhouse-datetime64 branch from 4ef6297 to bce8a64 Compare November 18, 2024 13:05
@github-actions github-actions bot added the docs label Nov 18, 2024
@ssheikin
Copy link
Contributor Author

@Praveen2112 comments are addressed. PTAL.

@ssheikin ssheikin force-pushed the ssheikin/43/trino/clickhouse-datetime64 branch from bce8a64 to bf96aaa Compare November 21, 2024 13:39
@ssheikin
Copy link
Contributor Author

@Praveen2112 comments are addressed, PTAL.

@ssheikin ssheikin force-pushed the ssheikin/43/trino/clickhouse-datetime64 branch from bf96aaa to 20cefa3 Compare November 21, 2024 14:18
Comment on lines 805 to 819
Copy link
Member

Choose a reason for hiding this comment

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

Can this be merged with TIMESTAMP_SECONDS -

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Assuming you are asking about these cases:

        if (type == TIMESTAMP_SECONDS) {
            return WriteMapping.longMapping("DateTime", timestampSecondsWriteFunction(getClickHouseServerVersion(session)));
        }
        if (type instanceof TimestampType timestampType) {
            return timestampWriteMapping(timestampType);
        }

They could be merged, but TimestampType returns native type as DateTime64(%s), whereas TIMESTAMP_SECONDS -> DateTime without precision.
The default processing may be changed later via additional property.
As this change is invasive let's reconsider it in separate PR if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see that this moment may never come, so will address in this PR.

Copy link
Member

Choose a reason for hiding this comment

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

We need to handle the min and max value like we handle for seconds right ?

Copy link
Member

Choose a reason for hiding this comment

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

Can we add multiple precision for testUnsupportedTimestamp

Copy link

This pull request has gone a while without any activity. Tagging for triage help: @mosabua

@github-actions github-actions bot added the stale label Dec 17, 2024
Copy link

github-actions bot commented Jan 7, 2025

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Jan 7, 2025
@ssheikin ssheikin reopened this Jan 13, 2025
@github-actions github-actions bot removed the stale label Jan 13, 2025
Copy link

github-actions bot commented Feb 4, 2025

This pull request has gone a while without any activity. Tagging for triage help: @mosabua

@github-actions github-actions bot added the stale label Feb 4, 2025
Copy link

Closing this pull request, as it has been stale for six weeks. Feel free to re-open at any time.

@github-actions github-actions bot closed this Feb 25, 2025
TIMESTAMP(p)
TIMESTAMP(p) WITH TIME ZONE
@ssheikin ssheikin reopened this Jun 23, 2025
@github-actions github-actions bot added the clickhouse ClickHouse connector label Jun 23, 2025
@ssheikin ssheikin force-pushed the ssheikin/43/trino/clickhouse-datetime64 branch from 20cefa3 to 617d1a2 Compare June 23, 2025 09:56
@ssheikin ssheikin closed this Jun 23, 2025
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.

2 participants