Akash3121 commented on code in PR #11207:
URL: https://github.com/apache/paimon/pull/11207#discussion_r4602828851
##########
paimon-core/src/main/java/org/apache/paimon/append/cluster/IncrementalClusterStrategy.java:
##########
@@ -71,10 +72,20 @@ public Optional<CompactUnit> pickFullCompaction(int
numLevels, List<LevelSortedR
}
if (runs.size() == 1 && runs.get(0).level() == maxLevel) {
- long schemaId = runs.get(0).run().files().get(0).schemaId();
- CoreOptions coreOptions =
CoreOptions.fromMap(schemaManager.schema(schemaId).options());
+ boolean sameClusterKeys =
+ runs.get(0).run().files().stream()
+ .mapToLong(DataFileMeta::schemaId)
+ .distinct()
+ .allMatch(
+ schemaId ->
+ CoreOptions.fromMap(
+ schemaManager
+
.schema(schemaId)
+ .options())
+ .clusteringColumns()
Review Comment:
Nit: when rebasing onto `master` (after `#11217`), feel free to either drop
this hunk as requested or keep `.mapToLong(DataFileMeta::schemaId)` to avoid
`Long` boxing on `schemaId`. The end-to-end test in
`BucketedAppendClusteringSchemaTest` looks great!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]