Search in sources :

Example 1 with Results

use of com.teradata.tpcds.Results in project presto by prestodb.

the class TpcdsRecordSetProvider method getRecordSet.

private RecordSet getRecordSet(Table table, List<? extends ColumnHandle> columns, double scaleFactor, int partNumber, int totalParts, boolean noSexism) {
    ImmutableList.Builder<Column> builder = ImmutableList.builder();
    for (ColumnHandle column : columns) {
        String columnName = ((TpcdsColumnHandle) column).getColumnName();
        builder.add(table.getColumn(columnName));
    }
    Session session = Session.getDefaultSession().withScale(scaleFactor).withParallelism(totalParts).withChunkNumber(partNumber + 1).withTable(table).withNoSexism(noSexism);
    Results results = constructResults(table, session);
    return new TpcdsRecordSet(results, builder.build());
}
Also used : ColumnHandle(com.facebook.presto.spi.ColumnHandle) Column(com.teradata.tpcds.column.Column) Results(com.teradata.tpcds.Results) Results.constructResults(com.teradata.tpcds.Results.constructResults) ImmutableList(com.google.common.collect.ImmutableList) Session(com.teradata.tpcds.Session) ConnectorSession(com.facebook.presto.spi.ConnectorSession)

Aggregations

ColumnHandle (com.facebook.presto.spi.ColumnHandle)1 ConnectorSession (com.facebook.presto.spi.ConnectorSession)1 ImmutableList (com.google.common.collect.ImmutableList)1 Results (com.teradata.tpcds.Results)1 Results.constructResults (com.teradata.tpcds.Results.constructResults)1 Session (com.teradata.tpcds.Session)1 Column (com.teradata.tpcds.column.Column)1