use of io.prestosql.sql.TestingRowExpressionTranslator in project hetu-core by openlookeng.
the class TestConnectorFilterStatsCalculatorService method setUp.
@BeforeClass
public void setUp() {
session = testSessionBuilder().build();
MetadataManager metadata = MetadataManager.createTestMetadataManager();
FilterStatsCalculator statsCalculator = new FilterStatsCalculator(metadata, new ScalarStatsCalculator(metadata), new StatsNormalizer());
statsCalculatorService = new ConnectorFilterStatsCalculatorService(statsCalculator);
xStats = ColumnStatistics.builder().setDistinctValuesCount(Estimate.of(40)).setRange(new DoubleRange(-10, 10)).setNullsFraction(Estimate.of(0.25)).build();
zeroTableStatistics = TableStatistics.builder().setRowCount(Estimate.zero()).build();
unknownTableStatistics = TableStatistics.builder().setRowCount(Estimate.unknown()).build();
originalTableStatistics = TableStatistics.builder().setRowCount(Estimate.of(100)).setColumnStatistics(xColumn, xStats).build();
originalTableStatisticsWithoutTotalSize = TableStatistics.builder().setRowCount(Estimate.of(100)).setColumnStatistics(xColumn, xStats).build();
standardTypes = TypeProvider.viewOf(ImmutableMap.<Symbol, Type>builder().put(new Symbol("x"), DOUBLE).build());
translator = new TestingRowExpressionTranslator(MetadataManager.createTestMetadataManager());
}
Aggregations