Skip to content

Conversation

@jianguotian
Copy link
Contributor

@jianguotian jianguotian commented Jan 7, 2026

Purpose

PartitionStatistics add totalBuckets field, get value from ManifestEntry.totalBuckets()

Tests

org.apache.paimon.flink.RESTCatalogITCase#testTotalBucketsStatistics:
verify totalBuckets stats for 3 bucket mode

API and Format

Partition and PartitionStatistics add new totalBuckets field

Documentation

rest-catalog-open-api doc:
Partition and PartitionStatistics add totalBuckets field

@jianguotian jianguotian changed the title [wip][core]PartitionStatistics support bucket count [wip][core]PartitionStatistics add bucket count field Jan 7, 2026
@jianguotian jianguotian force-pushed the add_bucket_cnt_partition_stats branch from 9441daf to 541ea26 Compare January 7, 2026 08:36
@JingsongLi JingsongLi closed this Jan 7, 2026
@JingsongLi JingsongLi reopened this Jan 7, 2026
@jianguotian jianguotian force-pushed the add_bucket_cnt_partition_stats branch from a0c7e51 to 9e42afc Compare January 8, 2026 00:30
@jianguotian jianguotian changed the title [wip][core]PartitionStatistics add bucket count field [wip]PartitionStatistics support totalBuckets Jan 8, 2026
@jianguotian jianguotian reopened this Jan 13, 2026
@jianguotian jianguotian changed the title [wip]PartitionStatistics support totalBuckets PartitionStatistics support totalBuckets Jan 13, 2026
@JingsongLi
Copy link
Contributor

JingsongLi commented Jan 13, 2026

Is this change compatible?

  1. Using the old version to read will ignore totalBucket, right?
  2. Can the old version of the client, which lacks totalBucket, be deserialized?

Perhaps you need to conduct some tests to ensure

@jianguotian
Copy link
Contributor Author

jianguotian commented Jan 14, 2026

Is this change compatible?

  1. Using the old version to read will ignore totalBucket, right?
  2. Can the old version of the client, which lacks totalBucket, be deserialized?

Perhaps you need to conduct some tests to ensure

I have test old version RESTCatalog listPartitions request to DLF catalog server(which return Partition with new totalBuckets field), server response can be deserialized into Partition successfully. @JsonIgnoreProperties annotation and DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES ensure that.

protected final long lastFileCreationTime;

@JsonProperty(FIELD_TOTAL_BUCKETS)
protected final int totalBuckets;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add comments to explain value when missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please add comments to explain value when missing.

done

protected final long lastFileCreationTime;

@JsonProperty(FIELD_TOTAL_BUCKETS)
protected final int totalBuckets;
Copy link
Contributor

Choose a reason for hiding this comment

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

Also add test to missing case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

add PartitionStatisticsTest

@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit fdb4a93 into apache:master Jan 14, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants