Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document casting timestamp_tz column to a date as part of Iceberg optimize #12943 #18745

Conversation

Ankan0011
Copy link
Member

@Ankan0011 Ankan0011 commented Aug 20, 2023

Description

Documentation for support Iceberg OPTIMIZE with WHERE casting timestamp_tz column to a date.

Additional context and related issues

Fixes #12943

Release notes

(X) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Aug 20, 2023
@github-actions github-actions bot added the docs label Aug 20, 2023
docs/src/main/sphinx/connector/iceberg.rst Outdated Show resolved Hide resolved
docs/src/main/sphinx/connector/iceberg.rst Outdated Show resolved Hide resolved
docs/src/main/sphinx/connector/iceberg.rst Outdated Show resolved Hide resolved
docs/src/main/sphinx/connector/iceberg.rst Outdated Show resolved Hide resolved
@ebyhr
Copy link
Member

ebyhr commented Aug 21, 2023

Please fix the commit title and squash commits into one.
https://github.com/trinodb/trino/blob/master/.github/DEVELOPMENT.md#format-git-commit-messages

@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 2e41c32 to 1591437 Compare August 21, 2023 22:01
@cla-bot
Copy link

cla-bot bot commented Aug 21, 2023

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ankan Ghosh.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot cla-bot bot removed the cla-signed label Aug 21, 2023
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 1591437 to 826e84b Compare August 21, 2023 22:08
@cla-bot cla-bot bot added the cla-signed label Aug 21, 2023
@Ankan0011 Ankan0011 requested a review from ebyhr August 21, 2023 22:10
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 826e84b to f799269 Compare August 23, 2023 21:52
docs/src/main/sphinx/connector/iceberg.md Outdated Show resolved Hide resolved
docs/src/main/sphinx/connector/iceberg.md Outdated Show resolved Hide resolved
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch 2 times, most recently from ce89dcb to f96555d Compare August 28, 2023 21:09
@Ankan0011 Ankan0011 requested a review from ebyhr August 28, 2023 21:10
@ebyhr ebyhr requested review from mosabua and removed request for ebyhr August 28, 2023 22:46
@@ -593,6 +593,15 @@ ALTER TABLE test_partitioned_table EXECUTE optimize
WHERE partition_key = 1
```

``optimize`` can also be used with ``WHERE`` clause with partitioned base
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
``optimize`` can also be used with ``WHERE`` clause with partitioned base
You can use a more complex ``WHERE`` to narrow down the scope of the ``optimize`` procedure. The following example casts the data to a date and uses a comparison to only optimize partitions with data from the year 2022 or newer:

Copy link
Member

Choose a reason for hiding this comment

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

casts the data to a date

@mosabua Is it a typo of "casts the timestamp to a date"?

docs/src/main/sphinx/connector/iceberg.md Outdated Show resolved Hide resolved
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch 2 times, most recently from 1dbc7ad to d7a103e Compare August 29, 2023 18:49
@ebyhr
Copy link
Member

ebyhr commented Sep 7, 2023

Squased commits.

@Ankan0011 Please fix the commit title.

@ebyhr
Copy link
Member

ebyhr commented Sep 7, 2023

Docs for #12943

Please fix the PR description as Fixes #12943 so that we can close the issue automatically when merging this PR.

@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from d7a103e to deddc44 Compare September 7, 2023 20:32
@Ankan0011 Ankan0011 requested a review from mosabua September 7, 2023 21:23
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from deddc44 to 54b984d Compare September 17, 2023 20:20
@mosabua mosabua force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 54b984d to 97e7701 Compare September 18, 2023 16:53
@mosabua
Copy link
Member

mosabua commented Sep 18, 2023

@ebyhr I updated the text, source formatting, and commit message now. Imho this is ready to go now.

Copy link
Member

@mosabua mosabua left a comment

Choose a reason for hiding this comment

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

I updated and this is good to go now.

@mosabua
Copy link
Member

mosabua commented Sep 18, 2023

@Ankan0011 please have a look

@Ankan0011 Ankan0011 requested a review from ebyhr September 21, 2023 13:12
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 97e7701 to 0ffdde1 Compare September 21, 2023 18:12
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 0ffdde1 to 8301baa Compare October 2, 2023 20:34
@Ankan0011 Ankan0011 requested a review from ebyhr October 2, 2023 20:35
docs/src/main/sphinx/connector/iceberg.md Outdated Show resolved Hide resolved
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 8301baa to 8e96b24 Compare October 8, 2023 14:00
@ebyhr ebyhr removed their request for review November 27, 2023 23:46
Copy link

This pull request has gone a while without any activity. Tagging the Trino developer relations team: @bitsondatadev @colebow @mosabua

@github-actions github-actions bot added the stale label Jan 11, 2024
@mosabua
Copy link
Member

mosabua commented Jan 11, 2024

@Ankan0011 can you move the text to the included fragment file as requested please?

@github-actions github-actions bot removed the stale label Jan 12, 2024
@Ankan0011 Ankan0011 force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 8e96b24 to 35c90a5 Compare January 14, 2024 22:37
@Ankan0011
Copy link
Member Author

@Ankan0011 can you move the text to the included fragment file as requested please?

@mosabua Can you check if I have placed the changes in the right fragment ?

@Ankan0011 Ankan0011 requested a review from mosabua January 15, 2024 17:07
@mosabua mosabua force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch 3 times, most recently from f0c50df to 6df8a54 Compare January 15, 2024 22:28
- Shows casting timestamp_tz column values to dates
- And using value for condition
@mosabua mosabua force-pushed the #12943_Document-casting-timestamp_tz-column-to-a-date-as-part-of-Iceberg-optimize branch from 6df8a54 to 3148f8a Compare January 15, 2024 22:30
Copy link
Member

@mosabua mosabua left a comment

Choose a reason for hiding this comment

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

Looks good now.

@mosabua mosabua merged commit b6aff29 into trinodb:master Jan 15, 2024
3 of 8 checks passed
@github-actions github-actions bot added this to the 437 milestone Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Document casting timestamp_tz column to a date as part of Iceberg optimize
3 participants