presto-hive/src/main/java/io/prestosql/plugin/hive/HiveNodePartitioningProvider.java/HiveNodePartitioningProvider/getSplitBucketFunction
class HiveNodePartitioningProvider:    @Override
    public ToIntFunction<ConnectorSplit> getSplitBucketFunction(
            ConnectorTransactionHandle transactionHandle,
            ConnectorSession session,
            ConnectorPartitioningHandle partitioningHandle)
    {
        return value -> ((HiveSplit) value).getBucketNumber()
                .orElseThrow(() -> new IllegalArgumentException("Bucket number not set in split"));
    }