Skip to content

Add toString to IcebergOptimizeHandle, static import in IcebergMetadata#11759

Merged
findepi merged 2 commits intotrinodb:masterfrom
homar:homar/preparation_commits_for_iceberg_expire_snapshots
Apr 5, 2022
Merged

Add toString to IcebergOptimizeHandle, static import in IcebergMetadata#11759
findepi merged 2 commits intotrinodb:masterfrom
homar:homar/preparation_commits_for_iceberg_expire_snapshots

Conversation

@homar
Copy link
Copy Markdown
Member

@homar homar commented Apr 2, 2022

Description

Small changes that are necessary to implement expire_snapshots and delete_orpahn_files for iceberg.

Related issues, pull requests, and links

Documentation

(.) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(.) No release notes entries required.
( ) Release notes entries required with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Apr 2, 2022
@homar homar requested a review from findepi April 2, 2022 06:41
@homar homar force-pushed the homar/preparation_commits_for_iceberg_expire_snapshots branch from 8b788d9 to 3c0ad15 Compare April 2, 2022 06:43
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

generate the toString using Intellij, prefer Guava's toStringHelper (except in SPI where Guava is not on the pass, use StringJoiner there)

    @Override
    public String toString()
    {
        return toStringHelper(this)
                .add("schemaAsJson", schemaAsJson)
                .add("partitionSpecAsJson", partitionSpecAsJson)
                .add("tableColumns", tableColumns)
                .add("fileFormat", fileFormat)
                .add("tableStorageProperties", tableStorageProperties)
                .add("maxScannedFileSize", maxScannedFileSize)
                .add("retriesEnabled", retriesEnabled)
                .toString();
    }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

in the meantime retriesEnabled was added to the class, add it to the toString too

@homar homar force-pushed the homar/preparation_commits_for_iceberg_expire_snapshots branch from 3c0ad15 to d0265b2 Compare April 4, 2022 08:36
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: Code reformat -> Static import

@homar homar force-pushed the homar/preparation_commits_for_iceberg_expire_snapshots branch from d0265b2 to 0ea885e Compare April 4, 2022 11:26
@homar homar changed the title Add toString to IcebergOptimizeHandle, reformat IcebergMetadata Add toString to IcebergOptimizeHandle, static import in IcebergMetadata Apr 4, 2022
@findepi findepi merged commit 4a6fdd9 into trinodb:master Apr 5, 2022
@findepi findepi added the no-release-notes This pull request does not require release notes entry label Apr 5, 2022
@github-actions github-actions bot added this to the 376 milestone Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

3 participants