use of io.trino.operator.PagesIndexPageSorter in project trino by trinodb.
the class BenchmarkPagesIndexPageSorter method runBenchmark.
@Benchmark
public int runBenchmark(BenchmarkData data) {
PageSorter pageSorter = new PagesIndexPageSorter(new PagesIndex.TestingFactory(false));
long[] addresses = pageSorter.sort(data.types, data.pages, data.sortChannels, nCopies(data.sortChannels.size(), ASC_NULLS_FIRST), 10_000);
return addresses.length;
}
use of io.trino.operator.PagesIndexPageSorter in project trino by trinodb.
the class TestRaptorConnector method setup.
@BeforeMethod
public void setup() {
Jdbi dbi = createTestingJdbi();
dummyHandle = dbi.open();
metadataDao = dbi.onDemand(MetadataDao.class);
createTablesWithRetry(dbi);
dataDir = Files.createTempDir();
CatalogName connectorId = new CatalogName("test");
NodeManager nodeManager = new TestingNodeManager();
NodeSupplier nodeSupplier = nodeManager::getWorkerNodes;
ShardManager shardManager = createShardManager(dbi);
StorageManager storageManager = createRaptorStorageManager(dbi, dataDir);
StorageManagerConfig config = new StorageManagerConfig();
connector = new RaptorConnector(new LifeCycleManager(ImmutableList.of(), null), new TestingNodeManager(), new RaptorMetadataFactory(dbi, shardManager), new RaptorSplitManager(connectorId, nodeSupplier, shardManager, false), new RaptorPageSourceProvider(storageManager), new RaptorPageSinkProvider(storageManager, new PagesIndexPageSorter(new PagesIndex.TestingFactory(false)), config), new RaptorNodePartitioningProvider(nodeSupplier), new RaptorSessionProperties(config), new RaptorTableProperties(TESTING_TYPE_MANAGER), ImmutableSet.of(), Optional.empty(), dbi);
}
Aggregations