in src/main/java/org/apache/paimon/trino/FixedBucketTableShuffleFunction.java [48:64]
public FixedBucketTableShuffleFunction(
List<Type> partitionChannelTypes,
TrinoPartitioningHandle partitioningHandle,
int workerCount) {
TableSchema schema = partitioningHandle.getOriginalSchema();
this.projectionContext =
ThreadLocal.withInitial(
() ->
CodeGenUtils.newProjection(
schema.logicalPrimaryKeysType(), schema.primaryKeys()));
this.bucketCount = new CoreOptions(schema.options()).bucket();
this.workerCount = workerCount;
this.isRowId =
partitionChannelTypes.size() == 1
&& partitionChannelTypes.get(0) instanceof RowType;
}