@@ -0,0 +1,2581 @@
+/*%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.connector.ConnectorId;%0Aimport com.facebook.presto.metadata.SessionPropertyManager;%0Aimport com.facebook.presto.testing.LocalQueryRunner;%0Aimport com.facebook.presto.tpch.TpchConnectorFactory;%0Aimport com.google.common.collect.ImmutableMap;%0A%0Aimport static com.facebook.presto.testing.TestingSession.TESTING_CATALOG;%0Aimport static com.facebook.presto.testing.TestingSession.testSessionBuilder;%0Aimport static com.facebook.presto.tpch.TpchMetadata.TINY_SCHEMA_NAME;%0A%0Apublic class TestLocalBinarySpilledQueries%0A        extends AbstractTestQueries%0A%7B%0A    public TestLocalBinarySpilledQueries()%0A    %7B%0A        super(createLocalQueryRunner());%0A    %7D%0A%0A    private static LocalQueryRunner createLocalQueryRunner()%0A    %7B%0A        Session defaultSession = testSessionBuilder()%0A                .setCatalog(%22local%22)%0A                .setSchema(TINY_SCHEMA_NAME)%0A                .setSystemProperty(SystemSessionProperties.SPILL_ENABLED, %22true%22)%0A                .setSystemProperty(SystemSessionProperties.OPERATOR_MEMORY_LIMIT_BEFORE_SPILL, %221B%22) //spill constantly%0A                .build();%0A%0A        LocalQueryRunner localQueryRunner = new LocalQueryRunner(defaultSession);%0A%0A        // add the tpch catalog%0A        // local queries run directly against the generator%0A        localQueryRunner.createCatalog(%0A                defaultSession.getCatalog().get(),%0A                new TpchConnectorFactory(1),%0A                ImmutableMap.%3CString, String%3Eof());%0A%0A        localQueryRunner.getMetadata().addFunctions(CUSTOM_FUNCTIONS);%0A%0A        SessionPropertyManager sessionPropertyManager = localQueryRunner.getMetadata().getSessionPropertyManager();%0A        sessionPropertyManager.addSystemSessionProperties(TEST_SYSTEM_PROPERTIES);%0A        sessionPropertyManager.addConnectorSessionProperties(new ConnectorId(TESTING_CATALOG), TEST_CATALOG_PROPERTIES);%0A%0A        return localQueryRunner;%0A    %7D%0A%7D%0A

Add TestLocalBinarySpilledQueries