@@ -0,0 +1,2177 @@
+/*%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.facebook.presto.tests;%0A%0Aimport com.facebook.presto.Session;%0Aimport com.facebook.presto.testing.LocalQueryRunner;%0Aimport com.facebook.presto.tests.statistics.StatisticsAssertion;%0Aimport com.facebook.presto.tpch.ColumnNaming;%0Aimport com.facebook.presto.tpch.TpchConnectorFactory;%0Aimport com.google.common.collect.ImmutableMap;%0Aimport org.testng.annotations.AfterClass;%0Aimport org.testng.annotations.BeforeClass;%0A%0Aimport static com.facebook.presto.SystemSessionProperties.ENABLE_NEW_STATS_CALCULATOR;%0Aimport static com.facebook.presto.testing.TestingSession.testSessionBuilder;%0Aimport static com.facebook.presto.tpch.TpchMetadata.TINY_SCHEMA_NAME;%0A%0Apublic class TestTpchLocalStats%0A%7B%0A    private LocalQueryRunner queryRunner;%0A    private StatisticsAssertion statisticsAssertion;%0A%0A    @BeforeClass%0A    public void setUp()%0A    %7B%0A        Session defaultSession = testSessionBuilder()%0A                .setCatalog(%22tpch%22)%0A                .setSchema(TINY_SCHEMA_NAME)%0A                .setSystemProperty(ENABLE_NEW_STATS_CALCULATOR, %22true%22)%0A                .build();%0A%0A        queryRunner = new LocalQueryRunner(defaultSession);%0A        queryRunner.createCatalog(%0A                %22tpch%22,%0A                new TpchConnectorFactory(1),%0A                ImmutableMap.of(%22tpch.column-naming%22, ColumnNaming.STANDARD.name()));%0A        statisticsAssertion = new StatisticsAssertion(queryRunner);%0A    %7D%0A%0A    @AfterClass(alwaysRun = true)%0A    public void tearDown()%0A    %7B%0A        statisticsAssertion = null;%0A        if (queryRunner != null) %7B%0A            queryRunner.close();%0A            queryRunner = null;%0A        %7D%0A    %7D%0A%7D%0A

Add TestTpchLocalStats stub