blob: d2021534e88ebc68cdde1260cc4d6b98799dbe05 [file] [log] [blame]
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tajo.engine.query;
import org.apache.tajo.IntegrationTest;
import org.apache.tajo.QueryTestCaseBase;
import org.apache.tajo.TajoConstants;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import java.sql.ResultSet;
@Category(IntegrationTest.class)
public class TestWindowQuery extends QueryTestCaseBase {
public TestWindowQuery() {
super(TajoConstants.DEFAULT_DATABASE_NAME);
}
@Test
public final void testWindow1() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindow2() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindow3() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindow4() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindow5() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindow6() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindow7() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithOrderBy1() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithOrderBy2() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithOrderBy3() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithOrderBy4() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithOrderBy5() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowBeforeLimit() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithSubQuery() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithSubQuery2() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithSubQuery3() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithSubQuery4() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithSubQuery5() throws Exception {
// filter push down test
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithSubQuery6() throws Exception {
// filter push down test
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithAggregation1() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithAggregation2() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithAggregation3() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithAggregation4() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithAggregation5() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testWindowWithAggregation6() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void testComplexOrderBy1() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void rowNumber1() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void rowNumber2() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
@Test
public final void rowNumber3() throws Exception {
ResultSet res = executeQuery();
assertResultSet(res);
cleanupQuery(res);
}
}