http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java ---------------------------------------------------------------------- diff --git a/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java b/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java deleted file mode 100644 index 680acee..0000000 --- a/query/src/test/java/org/apache/kylin/query/test/KylinTestBase.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * 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.kylin.query.test; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.Charset; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.SQLException; -import java.sql.Statement; -import java.sql.Timestamp; -import java.sql.Types; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; -import java.util.logging.LogManager; - -import org.apache.commons.lang3.StringUtils; -import org.apache.kylin.common.KylinConfig; -import org.dbunit.Assertion; -import org.dbunit.database.DatabaseConfig; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.database.IDatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.ITable; -import org.dbunit.dataset.SortedTable; -import org.dbunit.dataset.datatype.DataType; -import org.dbunit.dataset.datatype.DataTypeException; -import org.dbunit.ext.h2.H2Connection; -import org.dbunit.ext.h2.H2DataTypeFactory; -import org.junit.Assert; - -import com.google.common.io.Files; - -/** - */ -public class KylinTestBase { - - // Hack for the different constant integer type between optiq (INTEGER) and - // h2 (BIGINT) - public static class TestH2DataTypeFactory extends H2DataTypeFactory { - @Override - public DataType createDataType(int sqlType, String sqlTypeName, String tableName, String columnName) throws DataTypeException { - - if ((columnName.startsWith("COL") || columnName.startsWith("col")) && sqlType == Types.BIGINT) { - return DataType.INTEGER; - } - return super.createDataType(sqlType, sqlTypeName); - } - } - - protected static final String resultTableName = "query result of "; - protected static KylinConfig config = null; - protected static Connection cubeConnection = null; - protected static Connection h2Connection = null; - protected static String joinType = "default"; - protected static int h2InstanceCount = 0; - - protected static int compQueryCount = 0; - protected static ArrayList<String> zeroResultQueries = new ArrayList<String>(); - - protected static void closeConnection(Connection connection) { - if (connection != null) { - try { - connection.close(); - } catch (SQLException e) { - e.printStackTrace(); - } - } - } - - /** - * @param folder - * @param fileType - * specify the interested file type by file extension - * @return - */ - protected static List<File> getFilesFromFolder(final File folder, final String fileType) { - List<File> files = new ArrayList<File>(); - for (final File fileEntry : folder.listFiles()) { - if (fileEntry.getName().toLowerCase().endsWith(fileType.toLowerCase())) { - files.add(fileEntry); - } - } - return files; - } - - protected static void getFilesFromFolderR(final String directoryStr, List<File> files, final String fileType) { - File folder = new File(directoryStr); - for (final File fileEntry : folder.listFiles()) { - if (fileEntry.isDirectory()) { - getFilesFromFolderR(fileEntry.getAbsolutePath(), files, fileType); - } else if (fileEntry.isFile()) { - if (fileEntry.getName().toLowerCase().endsWith(fileType.toLowerCase())) { - files.add(fileEntry); - } - } - } - } - - protected static void putTextTofile(File file, String sql) throws IOException { - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); - writer.write(sql, 0, sql.length()); - writer.close(); - } - - protected static String getTextFromFile(File file) throws IOException { - BufferedReader reader = new BufferedReader(new FileReader(file)); - String line = null; - StringBuilder stringBuilder = new StringBuilder(); - String ls = System.getProperty("line.separator"); - while ((line = reader.readLine()) != null) { - stringBuilder.append(line); - stringBuilder.append(ls); - } - reader.close(); - return stringBuilder.toString(); - } - - protected static List<String> getParameterFromFile(File sqlFile) throws IOException { - String sqlFileName = sqlFile.getAbsolutePath(); - int prefixIndex = sqlFileName.lastIndexOf(".sql"); - String dataFielName = sqlFileName.substring(0, prefixIndex) + ".dat"; - File dataFile = new File(dataFielName); - List<String> parameters = Files.readLines(dataFile, Charset.defaultCharset()); - return parameters; - } - - protected static void printInfo(String info) { - System.out.println(new Timestamp(System.currentTimeMillis()) + " - " + info); - } - - protected static void printResult(ITable resultTable) throws DataSetException { - StringBuilder sb = new StringBuilder(); - - int columnCount = resultTable.getTableMetaData().getColumns().length; - String[] columns = new String[columnCount]; - - for (int i = 0; i < columnCount; i++) { - sb.append(resultTable.getTableMetaData().getColumns()[i].getColumnName()); - sb.append("-"); - sb.append(resultTable.getTableMetaData().getColumns()[i].getDataType()); - sb.append("\t"); - columns[i] = resultTable.getTableMetaData().getColumns()[i].getColumnName(); - } - sb.append("\n"); - - for (int i = 0; i < resultTable.getRowCount(); i++) { - for (int j = 0; j < columns.length; j++) { - sb.append(resultTable.getValue(i, columns[j])); - sb.append("\t"); - } - sb.append("\n"); - } - System.out.println(sb.toString()); - } - - protected Set<String> buildExclusiveSet(String[] exclusiveQuerys) { - Set<String> exclusiveSet = new HashSet<String>(); - if (exclusiveQuerys != null) { - for (String query : exclusiveQuerys) { - exclusiveSet.add(query); - } - } - return exclusiveSet; - } - - // //////////////////////////////////////////////////////////////////////////////////////// - // execute - - protected ITable executeQuery(IDatabaseConnection dbConn, String queryName, String sql, boolean needSort) throws Exception { - - // change join type to match current setting - sql = changeJoinType(sql, joinType); - - ITable queryTable = dbConn.createQueryTable(resultTableName + queryName, sql); - String[] columnNames = new String[queryTable.getTableMetaData().getColumns().length]; - for (int i = 0; i < columnNames.length; i++) { - columnNames[i] = queryTable.getTableMetaData().getColumns()[i].getColumnName(); - } - if (needSort) { - queryTable = new SortedTable(queryTable, columnNames); - } - //printResult(queryTable); - - return queryTable; - } - - protected int executeQuery(String sql, boolean needDisplay) throws SQLException { - - // change join type to match current setting - sql = changeJoinType(sql, joinType); - - Statement statement = null; - ResultSet resultSet = null; - try { - printInfo("start running..."); - statement = cubeConnection.createStatement(); - resultSet = statement.executeQuery(sql); - printInfo("stop running..."); - - return output(resultSet, needDisplay); - } finally { - if (resultSet != null) { - try { - resultSet.close(); - } catch (SQLException e) { - // ignore - } - } - if (statement != null) { - try { - statement.close(); - } catch (SQLException e) { - // ignore - } - } - } - - } - - protected ITable executeDynamicQuery(IDatabaseConnection dbConn, String queryName, String sql, List<String> parameters, boolean needSort) throws Exception { - - // change join type to match current setting - sql = changeJoinType(sql, joinType); - - PreparedStatement prepStat = dbConn.getConnection().prepareStatement(sql); - for (int j = 1; j <= parameters.size(); ++j) { - prepStat.setString(j, parameters.get(j - 1).trim()); - } - - ITable queryTable = dbConn.createTable(resultTableName + queryName, prepStat); - String[] columnNames = new String[queryTable.getTableMetaData().getColumns().length]; - for (int i = 0; i < columnNames.length; i++) { - columnNames[i] = queryTable.getTableMetaData().getColumns()[i].getColumnName(); - } - if (needSort) { - queryTable = new SortedTable(queryTable, columnNames); - } - //printResult(queryTable); - return queryTable; - } - - // end of execute - // //////////////////////////////////////////////////////////////////////////////////////// - - protected static String changeJoinType(String sql, String targetType) { - - if (targetType.equalsIgnoreCase("default")) - return sql; - - String specialStr = "changeJoinType_DELIMITERS"; - sql = sql.replaceAll(System.getProperty("line.separator"), " " + specialStr + " "); - - String[] tokens = StringUtils.split(sql, null);// split white spaces - for (int i = 0; i < tokens.length - 1; ++i) { - if ((tokens[i].equalsIgnoreCase("inner") || tokens[i].equalsIgnoreCase("left")) && tokens[i + 1].equalsIgnoreCase("join")) { - tokens[i] = targetType.toLowerCase(); - } - } - - String ret = StringUtils.join(tokens, " "); - ret = ret.replaceAll(specialStr, System.getProperty("line.separator")); - System.out.println("The actual sql executed is: " + ret); - - return ret; - } - - protected static void batchChangeJoinType(String targetType) throws IOException { - List<File> files = new LinkedList<File>(); - getFilesFromFolderR("src/test/resources/query", files, ".sql"); - for (File file : files) { - String x = changeJoinType(getTextFromFile(file), targetType); - putTextTofile(file, x); - } - } - - protected void execQueryUsingH2(String queryFolder, boolean needSort) throws Exception { - printInfo("---------- Running H2 queries: " + queryFolder); - - List<File> sqlFiles = getFilesFromFolder(new File(queryFolder), ".sql"); - for (File sqlFile : sqlFiles) { - String queryName = StringUtils.split(sqlFile.getName(), '.')[0]; - String sql = getTextFromFile(sqlFile); - - // execute H2 - printInfo("Query Result from H2 - " + queryName); - H2Connection h2Conn = new H2Connection(h2Connection, null); - h2Conn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new TestH2DataTypeFactory()); - executeQuery(h2Conn, queryName, sql, needSort); - } - } - - protected void verifyResultRowCount(String queryFolder) throws Exception { - printInfo("---------- verify result count in folder: " + queryFolder); - - List<File> sqlFiles = getFilesFromFolder(new File(queryFolder), ".sql"); - for (File sqlFile : sqlFiles) { - String queryName = StringUtils.split(sqlFile.getName(), '.')[0]; - String sql = getTextFromFile(sqlFile); - - File expectResultFile = new File(sqlFile.getParent(), sqlFile.getName() + ".expected"); - int expectRowCount = Integer.parseInt(Files.readFirstLine(expectResultFile, Charset.defaultCharset())); - - // execute Kylin - printInfo("Query Result from Kylin - " + queryName + " (" + queryFolder + ")"); - IDatabaseConnection kylinConn = new DatabaseConnection(cubeConnection); - ITable kylinTable = executeQuery(kylinConn, queryName, sql, false); - - // compare the result - Assert.assertEquals(expectRowCount, kylinTable.getRowCount()); - // Assertion.assertEquals(expectRowCount, kylinTable.getRowCount()); - } - } - - protected void execAndCompResultSize(String queryFolder, String[] exclusiveQuerys, boolean needSort) throws Exception { - printInfo("---------- test folder: " + queryFolder); - Set<String> exclusiveSet = buildExclusiveSet(exclusiveQuerys); - - List<File> sqlFiles = getFilesFromFolder(new File(queryFolder), ".sql"); - for (File sqlFile : sqlFiles) { - String queryName = StringUtils.split(sqlFile.getName(), '.')[0]; - if (exclusiveSet.contains(queryName)) { - continue; - } - String sql = getTextFromFile(sqlFile); - - // execute Kylin - printInfo("Query Result from Kylin - " + queryName + " (" + queryFolder + ")"); - IDatabaseConnection kylinConn = new DatabaseConnection(cubeConnection); - ITable kylinTable = executeQuery(kylinConn, queryName, sql, needSort); - - // execute H2 - printInfo("Query Result from H2 - " + queryName); - H2Connection h2Conn = new H2Connection(h2Connection, null); - h2Conn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new TestH2DataTypeFactory()); - ITable h2Table = executeQuery(h2Conn, queryName, sql, needSort); - - // compare the result - Assert.assertEquals(h2Table.getRowCount(), kylinTable.getRowCount()); - - compQueryCount++; - if (kylinTable.getRowCount() == 0) { - zeroResultQueries.add(sql); - } - } - } - - protected void execAndCompQuery(String queryFolder, String[] exclusiveQuerys, boolean needSort) throws Exception { - printInfo("---------- test folder: " + queryFolder); - Set<String> exclusiveSet = buildExclusiveSet(exclusiveQuerys); - - List<File> sqlFiles = getFilesFromFolder(new File(queryFolder), ".sql"); - for (File sqlFile : sqlFiles) { - String queryName = StringUtils.split(sqlFile.getName(), '.')[0]; - if (exclusiveSet.contains(queryName)) { - continue; - } - String sql = getTextFromFile(sqlFile); - - // execute Kylin - printInfo("Query Result from Kylin - " + queryName + " (" + queryFolder + ")"); - IDatabaseConnection kylinConn = new DatabaseConnection(cubeConnection); - ITable kylinTable = executeQuery(kylinConn, queryName, sql, needSort); - - // execute H2 - printInfo("Query Result from H2 - " + queryName); - H2Connection h2Conn = new H2Connection(h2Connection, null); - h2Conn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new TestH2DataTypeFactory()); - ITable h2Table = executeQuery(h2Conn, queryName, sql, needSort); - - // compare the result - Assertion.assertEquals(h2Table, kylinTable); - - compQueryCount++; - if (kylinTable.getRowCount() == 0) { - zeroResultQueries.add(sql); - } - } - } - - protected void execAndCompDynamicQuery(String queryFolder, String[] exclusiveQuerys, boolean needSort) throws Exception { - printInfo("---------- test folder: " + queryFolder); - Set<String> exclusiveSet = buildExclusiveSet(exclusiveQuerys); - - List<File> sqlFiles = getFilesFromFolder(new File(queryFolder), ".sql"); - for (File sqlFile : sqlFiles) { - String queryName = StringUtils.split(sqlFile.getName(), '.')[0]; - if (exclusiveSet.contains(queryName)) { - continue; - } - String sql = getTextFromFile(sqlFile); - List<String> parameters = getParameterFromFile(sqlFile); - - // execute Kylin - printInfo("Query Result from Kylin - " + queryName + " (" + queryFolder + ")"); - IDatabaseConnection kylinConn = new DatabaseConnection(cubeConnection); - ITable kylinTable = executeDynamicQuery(kylinConn, queryName, sql, parameters, needSort); - - // execute H2 - printInfo("Query Result from H2 - " + queryName); - IDatabaseConnection h2Conn = new DatabaseConnection(h2Connection); - h2Conn.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new TestH2DataTypeFactory()); - ITable h2Table = executeDynamicQuery(h2Conn, queryName, sql, parameters, needSort); - - // compare the result - Assertion.assertEquals(h2Table, kylinTable); - } - } - - protected int runSqlFile(String file) throws Exception { - return runSQL(new File(file), true, false); - } - - protected int runSQL(File sqlFile, boolean debug, boolean explain) throws Exception { - if (debug) { - System.setProperty("calcite.debug", "true"); - InputStream inputStream = new FileInputStream("src/test/resources/logging.properties"); - LogManager.getLogManager().readConfiguration(inputStream); - } - - String queryName = StringUtils.split(sqlFile.getName(), '.')[0]; - printInfo("Testing Query " + queryName); - String sql = getTextFromFile(sqlFile); - if (explain) { - sql = "explain plan for " + sql; - } - int count = executeQuery(sql, true); - - if (debug) { - System.clearProperty("calcite.debug"); - } - return count; - } - - protected void batchExecuteQuery(String queryFolder) throws Exception { - List<File> sqlFiles = getFilesFromFolder(new File(queryFolder), ".sql"); - for (File sqlFile : sqlFiles) { - runSQL(sqlFile, false, false); - } - } - - protected int output(ResultSet resultSet, boolean needDisplay) throws SQLException { - int count = 0; - ResultSetMetaData metaData = resultSet.getMetaData(); - int columnCount = metaData.getColumnCount(); - StringBuilder sb = new StringBuilder("\n"); - if (needDisplay) { - for (int i = 1; i <= columnCount; i++) { - sb.append(metaData.getColumnName(i)); - sb.append("-"); - sb.append(metaData.getTableName(i)); - sb.append("-"); - sb.append(metaData.getColumnTypeName(i)); - if (i < columnCount) { - sb.append("\t"); - } else { - sb.append("\n"); - } - } - } - - while (resultSet.next()) { - if (needDisplay) { - for (int i = 1; i <= columnCount; i++) { - sb.append(resultSet.getString(i)); - if (i < columnCount) { - sb.append("\t"); - } else { - sb.append("\n"); - } - } - } - count++; - } - printInfo(sb.toString()); - return count; - } -}
http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/java/org/apache/kylin/query/test/RealizationRegistryTest.java ---------------------------------------------------------------------- diff --git a/query/src/test/java/org/apache/kylin/query/test/RealizationRegistryTest.java b/query/src/test/java/org/apache/kylin/query/test/RealizationRegistryTest.java deleted file mode 100644 index c1789db..0000000 --- a/query/src/test/java/org/apache/kylin/query/test/RealizationRegistryTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.kylin.query.test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.Set; - -import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.LocalFileMetadataTestCase; -import org.apache.kylin.metadata.realization.RealizationRegistry; -import org.apache.kylin.metadata.realization.RealizationType; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -/** - */ -public class RealizationRegistryTest extends LocalFileMetadataTestCase { - @Before - public void setup() throws Exception { - - createTestMetadata(); - } - - @After - public void after() throws Exception { - cleanupTestMetadata(); - } - - @Test - public void test() throws Exception { - final RealizationRegistry registry = RealizationRegistry.getInstance(KylinConfig.getInstanceFromEnv()); - final Set<RealizationType> realizationTypes = registry.getRealizationTypes(); - assertEquals(RealizationType.values().length, realizationTypes.size()); - for (RealizationType type : RealizationType.values()) { - assertTrue(realizationTypes.contains(type)); - } - } -} http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/logging.properties ---------------------------------------------------------------------- diff --git a/query/src/test/resources/logging.properties b/query/src/test/resources/logging.properties deleted file mode 100644 index a925478..0000000 --- a/query/src/test/resources/logging.properties +++ /dev/null @@ -1,5 +0,0 @@ -handlers=java.util.logging.ConsoleHandler -.level=INFO -#org.eigenbase.relopt.RelOptPlanner.level=FINEST -java.util.logging.ConsoleHandler.level=ALL -java.util.logging.ConsoleHandler.formatter=org.apache.kylin.common.util.MyLogFormatter \ No newline at end of file http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/debug/query78.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/debug/query78.sql b/query/src/test/resources/query/debug/query78.sql deleted file mode 100644 index 299f1a4..0000000 --- a/query/src/test/resources/query/debug/query78.sql +++ /dev/null @@ -1,22 +0,0 @@ --- --- 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. --- - -select count(*) as c,sum(PRICE) as GMV, LSTG_FORMAT_NAME as FORMAT_NAME -from test_kylin_fact -where (LSTG_FORMAT_NAME in ('ABIN')) or (LSTG_FORMAT_NAME>='FP-GTC' and LSTG_FORMAT_NAME<='Others') -group by LSTG_FORMAT_NAME http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/h2/query07.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/h2/query07.sql b/query/src/test/resources/query/h2/query07.sql deleted file mode 100644 index 9fd2b7f..0000000 --- a/query/src/test/resources/query/h2/query07.sql +++ /dev/null @@ -1,21 +0,0 @@ --- --- 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. --- - -select count(*) from ( select test_kylin_fact.lstg_format_name from test_kylin_fact - where test_kylin_fact.lstg_format_name='FP-GTC' - group by test_kylin_fact.lstg_format_name ) t http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/h2/query09.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/h2/query09.sql b/query/src/test/resources/query/h2/query09.sql deleted file mode 100644 index e6e5576..0000000 --- a/query/src/test/resources/query/h2/query09.sql +++ /dev/null @@ -1,23 +0,0 @@ --- --- 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. --- - -select count(*) from (select test_cal_dt.week_beg_dt - from test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - group by test_cal_dt.week_beg_dt) t http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/h2/query10.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/h2/query10.sql b/query/src/test/resources/query/h2/query10.sql deleted file mode 100644 index 9511363..0000000 --- a/query/src/test/resources/query/h2/query10.sql +++ /dev/null @@ -1,25 +0,0 @@ --- --- 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. --- - -select test_cal_dt.week_beg_dt - from test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - where test_kylin_fact.lstg_format_name='FP-GTC' - and test_cal_dt.week_beg_dt between DATE '2013-05-01' and DATE '2013-08-01' - group by test_cal_dt.week_beg_dt http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query00.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query00.sql b/query/src/test/resources/query/sql/query00.sql deleted file mode 100644 index 6e4d94b..0000000 --- a/query/src/test/resources/query/sql/query00.sql +++ /dev/null @@ -1,22 +0,0 @@ --- --- 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. --- - -select lstg_format_name, sum(price) as GMV - from test_kylin_fact - where lstg_format_name='FP-GTC' - group by lstg_format_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query01.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query01.sql b/query/src/test/resources/query/sql/query01.sql deleted file mode 100644 index 9ed1db3..0000000 --- a/query/src/test/resources/query/sql/query01.sql +++ /dev/null @@ -1,20 +0,0 @@ --- --- 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. --- - -select LSTG_FORMAT_NAME,slr_segment_cd ,sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact - group by LSTG_FORMAT_NAME ,slr_segment_cd http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query02.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query02.sql b/query/src/test/resources/query/sql/query02.sql deleted file mode 100644 index 8d27c93..0000000 --- a/query/src/test/resources/query/sql/query02.sql +++ /dev/null @@ -1,19 +0,0 @@ --- --- 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. --- - -select sum(price) as GMV, count(1) as TRANS_CNT from test_kylin_fact http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query03.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query03.sql b/query/src/test/resources/query/sql/query03.sql deleted file mode 100644 index a605594..0000000 --- a/query/src/test/resources/query/sql/query03.sql +++ /dev/null @@ -1,20 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name, sum(price) as GMV, count(*) as TRANS_CNT from test_kylin_fact - group by test_kylin_fact.lstg_format_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query04.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query04.sql b/query/src/test/resources/query/sql/query04.sql deleted file mode 100644 index a3672f5..0000000 --- a/query/src/test/resources/query/sql/query04.sql +++ /dev/null @@ -1,21 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT from test_kylin_fact - group by test_kylin_fact.lstg_format_name having sum(price)>5000 http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query05.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query05.sql b/query/src/test/resources/query/sql/query05.sql deleted file mode 100644 index 512356a..0000000 --- a/query/src/test/resources/query/sql/query05.sql +++ /dev/null @@ -1,22 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT from test_kylin_fact - where test_kylin_fact.lstg_format_name is null - group by test_kylin_fact.lstg_format_name having sum(price)>5000 and count(*)>72 http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query06.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query06.sql b/query/src/test/resources/query/sql/query06.sql deleted file mode 100644 index de99c4f..0000000 --- a/query/src/test/resources/query/sql/query06.sql +++ /dev/null @@ -1,23 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT from test_kylin_fact - where test_kylin_fact.lstg_format_name is not null - group by test_kylin_fact.lstg_format_name - having sum(price)>5000 or count(*)>20 http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query07.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query07.sql b/query/src/test/resources/query/sql/query07.sql deleted file mode 100644 index 0c27d98..0000000 --- a/query/src/test/resources/query/sql/query07.sql +++ /dev/null @@ -1,22 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT from test_kylin_fact - where test_kylin_fact.lstg_format_name='FP-GTC' - group by test_kylin_fact.lstg_format_name having sum(price)>5000 or count(*)>20 http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query08.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query08.sql b/query/src/test/resources/query/sql/query08.sql deleted file mode 100644 index 7a31541..0000000 --- a/query/src/test/resources/query/sql/query08.sql +++ /dev/null @@ -1,22 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT from test_kylin_fact - where not (test_kylin_fact.lstg_format_name='FP-GTC') - group by test_kylin_fact.lstg_format_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query09.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query09.sql b/query/src/test/resources/query/sql/query09.sql deleted file mode 100644 index d13f8c8..0000000 --- a/query/src/test/resources/query/sql/query09.sql +++ /dev/null @@ -1,27 +0,0 @@ --- --- 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. --- - -select test_cal_dt.week_beg_dt, count(*) as TRANS_CNT - from test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - group by test_cal_dt.week_beg_dt http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query10.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query10.sql b/query/src/test/resources/query/sql/query10.sql deleted file mode 100644 index ad86086..0000000 --- a/query/src/test/resources/query/sql/query10.sql +++ /dev/null @@ -1,30 +0,0 @@ --- --- 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. --- - -select test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT , sum(test_kylin_fact.item_count) as total_items - from test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_kylin_fact.lstg_format_name='FP-GTC' - and test_cal_dt.week_beg_dt between '2013-05-01' and DATE '2013-08-01' - group by test_cal_dt.week_beg_dt http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query11.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query11.sql b/query/src/test/resources/query/sql/query11.sql deleted file mode 100644 index e431a63..0000000 --- a/query/src/test/resources/query/sql/query11.sql +++ /dev/null @@ -1,30 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - from test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-05-01' and DATE '2013-08-01' - group by test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt - having sum(price)>500 http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query12.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query12.sql b/query/src/test/resources/query/sql/query12.sql deleted file mode 100644 index 012ecfc..0000000 --- a/query/src/test/resources/query/sql/query12.sql +++ /dev/null @@ -1,29 +0,0 @@ --- --- 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. --- - -select test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - from test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt >= DATE '2013-02-10' - group by test_kylin_fact.lstg_format_name, test_cal_dt.week_beg_dt http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query13.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query13.sql b/query/src/test/resources/query/sql/query13.sql deleted file mode 100644 index 7d1c481..0000000 --- a/query/src/test/resources/query/sql/query13.sql +++ /dev/null @@ -1,28 +0,0 @@ --- --- 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. --- - -select sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT from test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_kylin_fact.lstg_format_name='FP-GTC' - and test_cal_dt.week_beg_dt between DATE '2013-05-01' and DATE '2013-08-01' http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query14.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query14.sql b/query/src/test/resources/query/sql/query14.sql deleted file mode 100644 index 9cca8f5..0000000 --- a/query/src/test/resources/query/sql/query14.sql +++ /dev/null @@ -1,36 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,sum(test_kylin_fact.price) as GMV - , count(*) as trans_cnt - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query15.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query15.sql b/query/src/test/resources/query/sql/query15.sql deleted file mode 100644 index b189de3..0000000 --- a/query/src/test/resources/query/sql/query15.sql +++ /dev/null @@ -1,32 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,sum(price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query16.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query16.sql b/query/src/test/resources/query/sql/query16.sql deleted file mode 100644 index 2c64347..0000000 --- a/query/src/test/resources/query/sql/query16.sql +++ /dev/null @@ -1,35 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,sum(price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query17.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query17.sql b/query/src/test/resources/query/sql/query17.sql deleted file mode 100644 index c6cb4e5..0000000 --- a/query/src/test/resources/query/sql/query17.sql +++ /dev/null @@ -1,38 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,sum(price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-09-01' and DATE '2013-10-01' - and test_category_groupings.meta_categ_name='Collectibles' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query18.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query18.sql b/query/src/test/resources/query/sql/query18.sql deleted file mode 100644 index 30939be..0000000 --- a/query/src/test/resources/query/sql/query18.sql +++ /dev/null @@ -1,34 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,sum(price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-09-01' and DATE '2013-10-01' - and test_category_groupings.categ_lvl2_name='Comics' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query19.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query19.sql b/query/src/test/resources/query/sql/query19.sql deleted file mode 100644 index c6cb4e5..0000000 --- a/query/src/test/resources/query/sql/query19.sql +++ /dev/null @@ -1,38 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,sum(price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-09-01' and DATE '2013-10-01' - and test_category_groupings.meta_categ_name='Collectibles' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query20.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query20.sql b/query/src/test/resources/query/sql/query20.sql deleted file mode 100644 index 5958037..0000000 --- a/query/src/test/resources/query/sql/query20.sql +++ /dev/null @@ -1,34 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,sum(price) as GMV, count(*) as TRANS_CNT , sum(test_kylin_fact.item_count) as total_items - FROM test_kylin_fact -inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-09-01' and DATE '2013-10-01' - and test_category_groupings.categ_lvl3_name='Other' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query21.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query21.sql b/query/src/test/resources/query/sql/query21.sql deleted file mode 100644 index 5a7c446..0000000 --- a/query/src/test/resources/query/sql/query21.sql +++ /dev/null @@ -1,40 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,sum(test_kylin_fact.price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-02-01' and DATE '2013-03-01' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query22.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query22.sql b/query/src/test/resources/query/sql/query22.sql deleted file mode 100644 index 8aa7f66..0000000 --- a/query/src/test/resources/query/sql/query22.sql +++ /dev/null @@ -1,42 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2012-02-01' and DATE '2013-10-01' - and site_name='Canada' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query23.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query23.sql b/query/src/test/resources/query/sql/query23.sql deleted file mode 100644 index 6d4e5cb..0000000 --- a/query/src/test/resources/query/sql/query23.sql +++ /dev/null @@ -1,41 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - where test_cal_dt.week_beg_dt between DATE '2013-02-01' and DATE '2013-10-01' - and site_name='Ebay' - and test_category_groupings.categ_lvl3_name='Other' - and test_kylin_fact.lstg_format_name='Auction' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query24.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query24.sql b/query/src/test/resources/query/sql/query24.sql deleted file mode 100644 index 22c376e..0000000 --- a/query/src/test/resources/query/sql/query24.sql +++ /dev/null @@ -1,45 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - ,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - inner JOIN edw.test_seller_type_dim as test_seller_type_dim - ON test_kylin_fact.slr_segment_cd = test_seller_type_dim.seller_type_cd - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query25.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query25.sql b/query/src/test/resources/query/sql/query25.sql deleted file mode 100644 index fe19065..0000000 --- a/query/src/test/resources/query/sql/query25.sql +++ /dev/null @@ -1,46 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - ,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - inner JOIN edw.test_seller_type_dim as test_seller_type_dim - ON test_kylin_fact.slr_segment_cd = test_seller_type_dim.seller_type_cd - where test_cal_dt.week_beg_dt between DATE '2013-01-01' and DATE '2013-06-01' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query26.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query26.sql b/query/src/test/resources/query/sql/query26.sql deleted file mode 100644 index c908c6c..0000000 --- a/query/src/test/resources/query/sql/query26.sql +++ /dev/null @@ -1,48 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - ,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - inner JOIN edw.test_seller_type_dim as test_seller_type_dim - ON test_kylin_fact.slr_segment_cd = test_seller_type_dim.seller_type_cd - where test_cal_dt.week_beg_dt between DATE '2013-01-01' and DATE '2013-06-04' - and (test_category_groupings.meta_categ_name='Collectibles' or test_category_groupings.meta_categ_name='Clothing, Shoes & Accessories') and - test_category_groupings.categ_lvl3_name <>'Other' and test_sites.site_name='Ebay' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query27.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query27.sql b/query/src/test/resources/query/sql/query27.sql deleted file mode 100644 index 0c204ed..0000000 --- a/query/src/test/resources/query/sql/query27.sql +++ /dev/null @@ -1,47 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc - ,sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - inner JOIN edw.test_seller_type_dim as test_seller_type_dim - ON test_kylin_fact.slr_segment_cd = test_seller_type_dim.seller_type_cd - where - (test_category_groupings.meta_categ_name='Collectibles' or test_category_groupings.categ_lvl3_name='Dresses') - and test_sites.site_name='Ebay' - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,test_category_groupings.categ_lvl3_name - ,test_kylin_fact.lstg_format_name - ,test_sites.site_name - ,test_seller_type_dim.seller_type_desc http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query28.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query28.sql b/query/src/test/resources/query/sql/query28.sql deleted file mode 100644 index 58a0b8e..0000000 --- a/query/src/test/resources/query/sql/query28.sql +++ /dev/null @@ -1,30 +0,0 @@ --- --- 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. --- - -SELECT - sum(test_kylin_fact.price) as GMV - , count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - inner JOIN edw.test_sites as test_sites - ON test_kylin_fact.lstg_site_id = test_sites.site_id - inner JOIN edw.test_seller_type_dim as test_seller_type_dim - ON test_kylin_fact.slr_segment_cd = test_seller_type_dim.seller_type_cd http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query29.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query29.sql b/query/src/test/resources/query/sql/query29.sql deleted file mode 100644 index b2e9c9d..0000000 --- a/query/src/test/resources/query/sql/query29.sql +++ /dev/null @@ -1,32 +0,0 @@ --- --- 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. --- - -SELECT - test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name - ,sum(price) as GMV, count(*) as TRANS_CNT - FROM test_kylin_fact - inner JOIN edw.test_cal_dt as test_cal_dt - ON test_kylin_fact.cal_dt = test_cal_dt.cal_dt - inner JOIN test_category_groupings - ON test_kylin_fact.leaf_categ_id = test_category_groupings.leaf_categ_id - AND test_kylin_fact.lstg_site_id = test_category_groupings.site_id - group by test_cal_dt.week_beg_dt - ,test_category_groupings.meta_categ_name - ,test_category_groupings.categ_lvl2_name http://git-wip-us.apache.org/repos/asf/kylin/blob/1428bbc4/query/src/test/resources/query/sql/query30.sql ---------------------------------------------------------------------- diff --git a/query/src/test/resources/query/sql/query30.sql b/query/src/test/resources/query/sql/query30.sql deleted file mode 100644 index 4d7011f..0000000 --- a/query/src/test/resources/query/sql/query30.sql +++ /dev/null @@ -1,19 +0,0 @@ --- --- 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. --- - -select sum(price) as GMV, count(1) as TRANS_CNT , sum(test_kylin_fact.item_count) as total_items from test_kylin_fact limit 50
