@@ -0,0 +1,2687 @@
+/*%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.SystemSessionProperties;%0Aimport com.facebook.presto.sql.parser.SqlParserOptions;%0Aimport com.facebook.presto.tpch.TpchPlugin;%0Aimport com.google.common.collect.ImmutableMap;%0A%0Aimport java.nio.file.Paths;%0A%0Aimport static com.facebook.presto.testing.TestingSession.testSessionBuilder;%0Aimport static com.facebook.presto.tpch.TpchMetadata.TINY_SCHEMA_NAME;%0A%0Apublic class TestDistributedSpilledQueries%0A        extends AbstractTestQueries%0A%7B%0A    public TestDistributedSpilledQueries()%0A            throws Exception%0A    %7B%0A        super(TestDistributedSpilledQueries::createQueryRunner);%0A    %7D%0A%0A    private static DistributedQueryRunner createQueryRunner()%0A            throws Exception%0A    %7B%0A        Session defaultSession = testSessionBuilder()%0A                .setCatalog(%22tpch%22)%0A                .setSchema(TINY_SCHEMA_NAME)%0A                .setSystemProperty(SystemSessionProperties.TASK_CONCURRENCY, %222%22)%0A                .setSystemProperty(SystemSessionProperties.SPILL_ENABLED, %22true%22)%0A                .setSystemProperty(SystemSessionProperties.AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT, %22128kB%22)%0A                .build();%0A%0A        ImmutableMap%3CString, String%3E extraProperties = ImmutableMap.%3CString, String%3Ebuilder()%0A                .put(%22experimental.spiller-spill-path%22, Paths.get(System.getProperty(%22java.io.tmpdir%22), %22presto%22, %22spills%22).toString())%0A                .put(%22experimental.spiller-max-used-space-threshold%22, %221.0%22)%0A                .put(%22experimental.memory-revoking-threshold%22, %220.0%22) // revoke always%0A                .put(%22experimental.memory-revoking-target%22, %220.0%22)%0A                .build();%0A%0A        DistributedQueryRunner queryRunner = new DistributedQueryRunner(defaultSession, 2, extraProperties, ImmutableMap.of(), new SqlParserOptions());%0A%0A        try %7B%0A            queryRunner.installPlugin(new TpchPlugin());%0A            queryRunner.createCatalog(%22tpch%22, %22tpch%22);%0A            return queryRunner;%0A        %7D%0A        catch (Exception e) %7B%0A            queryRunner.close();%0A            throw e;%0A        %7D%0A    %7D%0A%7D%0A

Add TestDistributedSpilledQueries