Repository: tajo Updated Branches: refs/heads/branch-0.11.0 35dc8df4c -> 144a02e34
http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLEndPointTests.java ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLEndPointTests.java b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLEndPointTests.java new file mode 100644 index 0000000..111f52b --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLEndPointTests.java @@ -0,0 +1,74 @@ +/** + * 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.storage.pgsql; + +import com.google.common.collect.Sets; +import org.apache.tajo.QueryTestCaseBase; +import org.apache.tajo.catalog.TableDesc; +import org.apache.tajo.client.TajoClient; +import org.apache.tajo.exception.UndefinedTableException; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.util.Set; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class TestPgSQLEndPointTests extends QueryTestCaseBase { + private static final String jdbcUrl = PgSQLTestServer.getInstance().getJdbcUrlForAdmin(); + private static TajoClient client; + + + @BeforeClass + public static void setUp() throws Exception { + QueryTestCaseBase.testingCluster.getMaster().refresh(); + client = QueryTestCaseBase.testingCluster.newTajoClient(); + } + + @AfterClass + public static void tearDown() { + client.close(); + } + + @Test(timeout = 1000) + public void testGetAllDatabaseNames() { + Set<String> retrieved = Sets.newHashSet(client.getAllDatabaseNames()); + assertTrue(retrieved.contains(PgSQLTestServer.DATABASE_NAME)); + } + + @Test(timeout = 1000) + public void testGetTableList() { + final Set<String> expected = Sets.newHashSet(PgSQLTestServer.TPCH_TABLES); + expected.add("datetime_types"); + final Set<String> retrieved = Sets.newHashSet(client.getTableList("tpch")); + + assertEquals(expected, retrieved); + } + + @Test(timeout = 1000) + public void testGetTable() throws UndefinedTableException { + for (String tableName: PgSQLTestServer.TPCH_TABLES) { + TableDesc retrieved = client.getTableDesc(PgSQLTestServer.DATABASE_NAME + "." + tableName); + assertEquals(PgSQLTestServer.DATABASE_NAME + "." + tableName, retrieved.getName()); + assertEquals(jdbcUrl + "&table=" + tableName, retrieved.getUri().toASCIIString()); + } + } +} http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLJdbcTableSpace.java ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLJdbcTableSpace.java b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLJdbcTableSpace.java new file mode 100644 index 0000000..cf4fe12 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLJdbcTableSpace.java @@ -0,0 +1,127 @@ +/* + * 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.storage.pgsql; + +import net.minidev.json.JSONObject; +import org.apache.tajo.catalog.MetadataProvider; +import org.apache.tajo.catalog.TableDesc; +import org.apache.tajo.conf.TajoConf; +import org.apache.tajo.exception.TajoException; +import org.apache.tajo.exception.TajoRuntimeException; +import org.apache.tajo.storage.Tablespace; +import org.apache.tajo.storage.TablespaceManager; +import org.apache.tajo.storage.fragment.Fragment; +import org.apache.tajo.storage.jdbc.JdbcTablespace; +import org.junit.Test; +import org.postgresql.util.PSQLException; + +import java.io.IOException; +import java.net.URI; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.*; + +public class TestPgSQLJdbcTableSpace { + static String jdbcUrl = PgSQLTestServer.getInstance().getJdbcUrlForAdmin(); + + @Test(timeout = 1000) + public void testTablespaceHandler() throws Exception { + assertTrue((TablespaceManager.getByName("pgsql_cluster").get()) instanceof PgSQLTablespace); + assertEquals("pgsql_cluster", (TablespaceManager.getByName("pgsql_cluster").get().getName())); + + assertTrue((TablespaceManager.get(jdbcUrl).get()) instanceof PgSQLTablespace); + assertTrue((TablespaceManager.get(jdbcUrl + "&table=tb1").get()) instanceof PgSQLTablespace); + + assertEquals(jdbcUrl, TablespaceManager.get(jdbcUrl).get().getUri().toASCIIString()); + assertTrue(TablespaceManager.get(jdbcUrl).get().getMetadataProvider() instanceof PgSQLMetadataProvider); + } + + @Test(timeout = 1000, expected = TajoRuntimeException.class) + public void testCreateTable() throws IOException, TajoException { + Tablespace space = TablespaceManager.getByName("pgsql_cluster").get(); + space.createTable(null, false); + } + + @Test(timeout = 1000, expected = TajoRuntimeException.class) + public void testDropTable() throws IOException, TajoException { + Tablespace space = TablespaceManager.getByName("pgsql_cluster").get(); + space.purgeTable(null); + } + + @Test(timeout = 1000) + public void testGetSplits() throws IOException, TajoException { + Tablespace space = TablespaceManager.getByName("pgsql_cluster").get(); + MetadataProvider provider = space.getMetadataProvider(); + TableDesc table = provider.getTableDesc(null, "lineitem"); + List<Fragment> fragments = space.getSplits("lineitem", table, null); + assertNotNull(fragments); + assertEquals(1, fragments.size()); + } + + @Test + public void testConnProperties() throws Exception { + Map<String, String> connProperties = new HashMap<>(); + connProperties.put("user", "postgres"); + connProperties.put("password", ""); + + String uri = PgSQLTestServer.getInstance().getJdbcUrl().split("\\?")[0]; + Tablespace space = new PgSQLTablespace("t1", URI.create(uri), getJsonTablespace(connProperties)); + try { + space.init(new TajoConf()); + } finally { + space.close(); + } + } + + @Test + public void testConnPropertiesNegative() throws Exception { + Map<String, String> connProperties = new HashMap<>(); + connProperties.put("user", "postgresX"); + connProperties.put("password", ""); + + String uri = PgSQLTestServer.getInstance().getJdbcUrl().split("\\?")[0]; + Tablespace space = new PgSQLTablespace("t1", URI.create(uri), getJsonTablespace(connProperties)); + try { + space.init(new TajoConf()); + fail("Must be failed"); + } catch (IOException ioe) { + assertTrue(ioe.getCause() instanceof PSQLException); + } finally { + space.close(); + } + } + + public static JSONObject getJsonTablespace(Map<String, String> connProperties) + throws IOException { + String uri = PgSQLTestServer.getInstance().getJdbcUrl().split("\\?")[0]; + + JSONObject configElements = new JSONObject(); + configElements.put(JdbcTablespace.CONFIG_KEY_MAPPED_DATABASE, PgSQLTestServer.DATABASE_NAME); + + JSONObject connPropertiesJson = new JSONObject(); + for (Map.Entry<String, String> entry : connProperties.entrySet()) { + connPropertiesJson.put(entry.getKey(), entry.getValue()); + } + configElements.put(JdbcTablespace.CONFIG_KEY_CONN_PROPERTIES, connPropertiesJson); + + return configElements; + } +} http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLMetadataProvider.java ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLMetadataProvider.java b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLMetadataProvider.java new file mode 100644 index 0000000..2221f94 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLMetadataProvider.java @@ -0,0 +1,84 @@ +/* + * 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.storage.pgsql; + +import com.google.common.collect.Sets; +import org.apache.tajo.catalog.MetadataProvider; +import org.apache.tajo.catalog.TableDesc; +import org.apache.tajo.storage.Tablespace; +import org.apache.tajo.storage.TablespaceManager; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.util.Set; + +import static org.junit.Assert.*; + +public class TestPgSQLMetadataProvider { + static final String jdbcUrl = PgSQLTestServer.getInstance().getJdbcUrlForAdmin(); + + @BeforeClass + public static void setUp() throws Exception { + } + + @Test + public void testGetTablespaceName() throws Exception { + Tablespace tablespace = TablespaceManager.get(jdbcUrl).get(); + MetadataProvider provider = tablespace.getMetadataProvider(); + assertEquals("pgsql_cluster", provider.getTablespaceName()); + } + + @Test + public void testGetDatabaseName() throws Exception { + Tablespace tablespace = TablespaceManager.get(jdbcUrl).get(); + MetadataProvider provider = tablespace.getMetadataProvider(); + assertEquals("tpch", provider.getDatabaseName()); + } + + @Test + public void testGetSchemas() throws Exception { + Tablespace tablespace = TablespaceManager.get(jdbcUrl).get(); + MetadataProvider provider = tablespace.getMetadataProvider(); + assertTrue(provider.getSchemas().isEmpty()); + } + + @Test + public void testGetTables() throws Exception { + Tablespace tablespace = TablespaceManager.get(jdbcUrl).get(); + MetadataProvider provider = tablespace.getMetadataProvider(); + + final Set<String> expected = Sets.newHashSet(PgSQLTestServer.TPCH_TABLES); + expected.add("datetime_types"); + final Set<String> found = Sets.newHashSet(provider.getTables(null, null)); + + assertEquals(expected, found); + } + + @Test + public void testGetTableDescriptor() throws Exception { + Tablespace tablespace = TablespaceManager.get(jdbcUrl).get(); + MetadataProvider provider = tablespace.getMetadataProvider(); + + for (String tableName : PgSQLTestServer.TPCH_TABLES) { + TableDesc table = provider.getTableDesc(null, tableName); + assertEquals("tpch." + tableName, table.getName()); + assertEquals(jdbcUrl + "&table=" + tableName, table.getUri().toASCIIString()); + } + } +} http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLQueryTests.java ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLQueryTests.java b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLQueryTests.java new file mode 100644 index 0000000..9655968 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLQueryTests.java @@ -0,0 +1,200 @@ +/** + * 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.storage.pgsql; + +import com.google.common.base.Optional; +import org.apache.tajo.QueryTestCaseBase; +import org.apache.tajo.conf.TajoConf; +import org.apache.tajo.storage.Tablespace; +import org.apache.tajo.storage.TablespaceManager; +import org.junit.BeforeClass; +import org.junit.Test; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class TestPgSQLQueryTests extends QueryTestCaseBase { + @SuppressWarnings("unused") + // This should be invoked for initializing PgSQLTestServer + private static final String jdbcUrl = PgSQLTestServer.getInstance().getJdbcUrl(); + + public TestPgSQLQueryTests() { + super(PgSQLTestServer.DATABASE_NAME); + } + + @BeforeClass + public static void setUp() { + QueryTestCaseBase.testingCluster.getMaster().refresh(); + } + + @SimpleTest + @Test + public void testProjectedColumns() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testFixedLengthFields() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testVariableLengthFields() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testDateTimeTypes() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testTPCH_Q1() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testTPCH_Q2_Part() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testTPCH_Q2_Part_MixedStorage() throws Exception { + // Manually enable broadcast feature + try { + testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$TEST_BROADCAST_JOIN_ENABLED.varname, "true"); + testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$DIST_QUERY_BROADCAST_NON_CROSS_JOIN_THRESHOLD.varname, + "" + (5 * 1024)); + testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$DIST_QUERY_BROADCAST_CROSS_JOIN_THRESHOLD.varname, + "" + (2 * 1024)); + + runSimpleTests(); + + } finally { + testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$TEST_BROADCAST_JOIN_ENABLED.varname, + TajoConf.ConfVars.$TEST_BROADCAST_JOIN_ENABLED.defaultVal); + testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$DIST_QUERY_BROADCAST_NON_CROSS_JOIN_THRESHOLD.varname, + TajoConf.ConfVars.$DIST_QUERY_BROADCAST_NON_CROSS_JOIN_THRESHOLD.defaultVal); + testingCluster.setAllTajoDaemonConfValue(TajoConf.ConfVars.$DIST_QUERY_BROADCAST_CROSS_JOIN_THRESHOLD.varname, + TajoConf.ConfVars.$DIST_QUERY_BROADCAST_CROSS_JOIN_THRESHOLD.defaultVal); + } + } + + @SimpleTest + @Test + public void testTPCH_Q3() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testTPCH_Q5() throws Exception { + runSimpleTests(); + } + + // Predicates -------------------------------------------------------------- + + @SimpleTest + @Test + public void testSimpleFilter() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testInPredicateWithNumbers() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testInPredicateWithLiterals() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testBetweenNumbers() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testBetweenDates() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testCaseWhenFilter() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testFunctionWithinFilter() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testCountAsterisk() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testCtasToHdfs() throws Exception { + try { + executeString("CREATE DATABASE pgtmp").close(); + executeString("CREATE TABLE pgtmp.offload AS SELECT * FROM LINEITEM").close(); + + runSimpleTests(); + + } finally { + executeString("DROP TABLE IF EXISTS pgtmp.offload").close(); + executeString("DROP DATABASE IF EXISTS pgtmp").close(); + } + } + + @SimpleTest + @Test + public void testQueryWithConnProperties() throws Exception { + Map<String, String> connProperties = new HashMap<>(); + connProperties.put("user", "postgres"); + connProperties.put("password", ""); + + Optional<Tablespace> old = Optional.absent(); + try { + old = PgSQLTestServer.resetAllParamsAndSetConnProperties(connProperties); + runSimpleTests(); + } finally { + if (old.isPresent()) { + TablespaceManager.addTableSpaceForTest(old.get()); + } + } + } +} http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLSimpleQueryTests.java ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLSimpleQueryTests.java b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLSimpleQueryTests.java new file mode 100644 index 0000000..91aba63 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/java/org/apache/tajo/storage/pgsql/TestPgSQLSimpleQueryTests.java @@ -0,0 +1,48 @@ +/** + * 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.storage.pgsql; + +import org.apache.tajo.QueryTestCaseBase; +import org.junit.BeforeClass; +import org.junit.Test; + +public class TestPgSQLSimpleQueryTests extends QueryTestCaseBase { + private static final String jdbcUrl = PgSQLTestServer.getInstance().getJdbcUrl(); + + public TestPgSQLSimpleQueryTests() { + super(PgSQLTestServer.DATABASE_NAME); + } + + @BeforeClass + public static void setUp() { + QueryTestCaseBase.testingCluster.getMaster().refresh(); + } + + @SimpleTest + @Test + public void testSelectAll() throws Exception { + runSimpleTests(); + } + + @SimpleTest + @Test + public void testSelectLimit() throws Exception { + runSimpleTests(); + } +} http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/dataset/.marker ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/dataset/.marker b/tajo-storage/tajo-storage-pgsql/src/test/resources/dataset/.marker new file mode 100644 index 0000000..158780d --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/dataset/.marker @@ -0,0 +1 @@ +// for keeping dataset directory \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/customer.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/customer.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/customer.sql new file mode 100644 index 0000000..35b1861 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/customer.sql @@ -0,0 +1,10 @@ +CREATE TABLE CUSTOMER ( + C_CUSTKEY INTEGER NOT NULL, + C_NAME VARCHAR(25) NOT NULL, + C_ADDRESS VARCHAR(40) NOT NULL, + C_NATIONKEY INTEGER NOT NULL, + C_PHONE CHAR(15) NOT NULL, + C_ACCTBAL DECIMAL(15,2) NOT NULL, + C_MKTSEGMENT CHAR(10) NOT NULL, + C_COMMENT VARCHAR(117) NOT NULL +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.sql new file mode 100644 index 0000000..9cbbc2f --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.sql @@ -0,0 +1,5 @@ +CREATE TABLE DATETIME_TYPES ( + date_field DATE, + time_field TIME, + ts_field TIMESTAMP +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.txt ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.txt b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.txt new file mode 100644 index 0000000..6c7d8ff --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/datetime_types.txt @@ -0,0 +1,4 @@ +1980-04-01|01:50:27|1980-04-01 01:50:27 +1984-01-05|02:45:31|1984-01-05 02:45:31 +1984-01-15|14:12:58|1984-01-15 14:12:58 +2015-03-21|08:11:01|2015-03-21 08:11:01 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/lineitem.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/lineitem.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/lineitem.sql new file mode 100644 index 0000000..a7f61bb --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/lineitem.sql @@ -0,0 +1,18 @@ +CREATE TABLE LINEITEM ( + L_ORDERKEY INTEGER NOT NULL, + L_PARTKEY INTEGER NOT NULL, + L_SUPPKEY INTEGER NOT NULL, + L_LINENUMBER INTEGER NOT NULL, + L_QUANTITY DECIMAL(15,2) NOT NULL, + L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL, + L_DISCOUNT DECIMAL(15,2) NOT NULL, + L_TAX DECIMAL(15,2) NOT NULL, + L_RETURNFLAG CHAR(1) NOT NULL, + L_LINESTATUS CHAR(1) NOT NULL, + L_SHIPDATE DATE NOT NULL, + L_COMMITDATE DATE NOT NULL, + L_RECEIPTDATE DATE NOT NULL, + L_SHIPINSTRUCT CHAR(25) NOT NULL, + L_SHIPMODE CHAR(10) NOT NULL, + L_COMMENT VARCHAR(44) NOT NULL +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/nation.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/nation.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/nation.sql new file mode 100644 index 0000000..f7ecda8 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/nation.sql @@ -0,0 +1,6 @@ +CREATE TABLE NATION ( + N_NATIONKEY INTEGER NOT NULL, + N_NAME CHAR(25) NOT NULL, + N_REGIONKEY INTEGER NOT NULL, + N_COMMENT VARCHAR(152) +); http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/orders.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/orders.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/orders.sql new file mode 100644 index 0000000..220d576 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/orders.sql @@ -0,0 +1,11 @@ +CREATE TABLE ORDERS ( + O_ORDERKEY INTEGER NOT NULL, + O_CUSTKEY INTEGER NOT NULL, + O_ORDERSTATUS CHAR(1) NOT NULL, + O_TOTALPRICE DECIMAL(15,2) NOT NULL, + O_ORDERDATE DATE NOT NULL, + O_ORDERPRIORITY CHAR(15) NOT NULL, + O_CLERK CHAR(15) NOT NULL, + O_SHIPPRIORITY INTEGER NOT NULL, + O_COMMENT VARCHAR(79) NOT NULL +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/part.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/part.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/part.sql new file mode 100644 index 0000000..e66f73c --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/part.sql @@ -0,0 +1,11 @@ +CREATE TABLE PART ( + P_PARTKEY INTEGER NOT NULL, + P_NAME VARCHAR(55) NOT NULL, + P_MFGR CHAR(25) NOT NULL, + P_BRAND CHAR(10) NOT NULL, + P_TYPE VARCHAR(25) NOT NULL, + P_SIZE INTEGER NOT NULL, + P_CONTAINER CHAR(10) NOT NULL, + P_RETAILPRICE DECIMAL(15,2) NOT NULL, + P_COMMENT VARCHAR(23) NOT NULL +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/partsupp.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/partsupp.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/partsupp.sql new file mode 100644 index 0000000..1f61331 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/partsupp.sql @@ -0,0 +1,7 @@ +CREATE TABLE PARTSUPP ( + PS_PARTKEY INTEGER NOT NULL, + PS_SUPPKEY INTEGER NOT NULL, + PS_AVAILQTY INTEGER NOT NULL, + PS_SUPPLYCOST DECIMAL(15,2) NOT NULL, + PS_COMMENT VARCHAR(199) NOT NULL +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/region.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/region.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/region.sql new file mode 100644 index 0000000..c47e26e --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/region.sql @@ -0,0 +1,5 @@ +CREATE TABLE REGION ( + R_REGIONKEY INTEGER NOT NULL, + R_NAME CHAR(25) NOT NULL, + R_COMMENT VARCHAR(152) +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/supplier.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/supplier.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/supplier.sql new file mode 100644 index 0000000..a4d35d3 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/pgsql/supplier.sql @@ -0,0 +1,9 @@ +CREATE TABLE SUPPLIER ( + S_SUPPKEY INTEGER NOT NULL, + S_NAME CHAR(25) NOT NULL, + S_ADDRESS VARCHAR(40) NOT NULL, + S_NATIONKEY INTEGER NOT NULL, + S_PHONE CHAR(15) NOT NULL, + S_ACCTBAL DECIMAL(15,2) NOT NULL, + S_COMMENT VARCHAR(101) NOT NULL +); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenDates.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenDates.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenDates.sql new file mode 100644 index 0000000..e6b20a6 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenDates.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE L_SHIPDATE BETWEEN DATE '1996-01-1' AND DATE '1997-12-31'; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenNumbers.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenNumbers.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenNumbers.sql new file mode 100644 index 0000000..e5d0408 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testBetweenNumbers.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE L_ORDERKEY BETWEEN 1 AND 2; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCaseWhenFilter.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCaseWhenFilter.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCaseWhenFilter.sql new file mode 100644 index 0000000..2bdccde --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCaseWhenFilter.sql @@ -0,0 +1,6 @@ +SELECT * FROM LINEITEM WHERE + CASE + WHEN L_RETURNFLAG = 'N' THEN TRUE + ELSE FALSE + END +; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCountAsterisk.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCountAsterisk.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCountAsterisk.sql new file mode 100644 index 0000000..fc9bc79 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCountAsterisk.sql @@ -0,0 +1 @@ +SELECT COUNT(*) FROM LINEITEM; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCtasToHdfs.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCtasToHdfs.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCtasToHdfs.sql new file mode 100644 index 0000000..843e46c --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testCtasToHdfs.sql @@ -0,0 +1 @@ +SELECT * FROM pgtmp.offload; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testDateTimeTypes.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testDateTimeTypes.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testDateTimeTypes.sql new file mode 100644 index 0000000..37c5377 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testDateTimeTypes.sql @@ -0,0 +1 @@ +SELECT * FROM DATETIME_TYPES WHERE date_field > DATE '1980-01-01'; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFixedLengthFields.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFixedLengthFields.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFixedLengthFields.sql new file mode 100644 index 0000000..fff0905 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFixedLengthFields.sql @@ -0,0 +1 @@ +SELECT L_SHIPINSTRUCT, L_SHIPMODE FROM LINEITEM WHERE L_ORDERKEY > 1 AND L_LINENUMBER > 0; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFunctionWithinFilter.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFunctionWithinFilter.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFunctionWithinFilter.sql new file mode 100644 index 0000000..61c6b3b --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testFunctionWithinFilter.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE CONCAT(L_RETURNFLAG, L_LINESTATUS) = 'NO' \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithLiterals.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithLiterals.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithLiterals.sql new file mode 100644 index 0000000..466f59e --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithLiterals.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE L_RETURNFLAG in ('N'); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithNumbers.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithNumbers.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithNumbers.sql new file mode 100644 index 0000000..197858b --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testInPredicateWithNumbers.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE L_ORDERKEY in (1, 2); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testProjectedColumns.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testProjectedColumns.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testProjectedColumns.sql new file mode 100644 index 0000000..1c7512b --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testProjectedColumns.sql @@ -0,0 +1 @@ +SELECT L_ORDERKEY, L_SHIPDATE FROM LINEITEM WHERE L_ORDERKEY > 1 AND L_LINENUMBER > 0; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testQueryWithConnProperties.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testQueryWithConnProperties.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testQueryWithConnProperties.sql new file mode 100644 index 0000000..a5eccc5 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testQueryWithConnProperties.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE L_ORDERKEY > 1; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testSimpleFilter.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testSimpleFilter.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testSimpleFilter.sql new file mode 100644 index 0000000..a5eccc5 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testSimpleFilter.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM WHERE L_ORDERKEY > 1; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q1.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q1.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q1.sql new file mode 100644 index 0000000..9e02d80 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q1.sql @@ -0,0 +1,21 @@ +select + l_returnflag, + l_linestatus, + sum(l_quantity) as sum_qty, + sum(l_extendedprice) as sum_base_price, + sum(l_extendedprice*(1-l_discount)) as sum_disc_price, + sum(l_extendedprice*(1-l_discount)*(1+l_tax)) as sum_charge, + avg(l_quantity) as avg_qty, + avg(l_extendedprice) as avg_price, + avg(l_discount) as avg_disc, + count(*) as count_order +from + lineitem +where + l_shipdate <= DATE '1998-09-01' +group by + l_returnflag, + l_linestatus +order by + l_returnflag, + l_linestatus; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part.sql new file mode 100644 index 0000000..ffaaf87 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part.sql @@ -0,0 +1,18 @@ +select + s_acctbal, + s_name, + n_name, + p_partkey, + p_mfgr, + s_address, + s_phone, + s_comment, + ps_supplycost, + r_name, + p_type, + p_size +from + region join nation on n_regionkey = r_regionkey and r_name = 'AMERICA' + join supplier on s_nationkey = n_nationkey + join partsupp on s_suppkey = ps_suppkey + join part on p_partkey = ps_partkey and p_type like '%BRASS' and p_size = 15; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.sql new file mode 100644 index 0000000..e6ff43f --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.sql @@ -0,0 +1,18 @@ +SELECT + s_acctbal, + s_name, + n_name, + p_partkey, + p_mfgr, + s_address, + s_phone, + s_comment, + ps_supplycost, + r_name, + p_type, + p_size +FROM + default.region join tpch.nation on n_regionkey = r_regionkey and r_name = 'AMERICA' + join default.supplier on s_nationkey = n_nationkey + join default.partsupp on s_suppkey = ps_suppkey + join default.part on p_partkey = ps_partkey and p_type like '%BRASS' and p_size = 15; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q3.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q3.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q3.sql new file mode 100644 index 0000000..7d338dd --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q3.sql @@ -0,0 +1,22 @@ +select + l_orderkey, + sum(l_extendedprice*(1-l_discount)) as revenue, + o_orderdate, + o_shippriority +from + customer, + orders, + lineitem +where + c_mktsegment in ('BUILDING', 'AUTOMOBILE', 'MACHINERY', 'HOUSEHOLD') -- modified for selectivity + and c_custkey = o_custkey + and l_orderkey = o_orderkey + and o_orderdate < date '1996-12-31' -- modified for selectivity + and l_shipdate > date '1992-03-15' -- modified for selectivity +group by + l_orderkey, + o_orderdate, + o_shippriority +order by + revenue desc, + o_orderdate; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q5.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q5.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q5.sql new file mode 100644 index 0000000..91e016b --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testTPCH_Q5.sql @@ -0,0 +1,25 @@ +select n_name, revenue::float4 as revenue from ( +select + n_name, + sum(l_extendedprice * (1 - l_discount)) as revenue +from + customer, + orders, + lineitem, + supplier, + nation, + region +where + c_custkey = o_custkey and + /* l_orderkey = o_orderkey and -- modified for selectivity + l_suppkey = s_suppkey and + c_nationkey = s_nationkey and + s_nationkey = n_nationkey and + n_regionkey = r_regionkey and */ + r_name = 'ASIA' and + o_orderdate >= date '1993-01-01' and o_orderdate < date '1997-01-01' +group by + n_name +order by + revenue desc +) w; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testVariableLengthFields.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testVariableLengthFields.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testVariableLengthFields.sql new file mode 100644 index 0000000..d72da1c --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLQueryTests/testVariableLengthFields.sql @@ -0,0 +1 @@ +SELECT L_COMMENT FROM LINEITEM WHERE L_ORDERKEY > 1 AND L_LINENUMBER > 0; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectAll.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectAll.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectAll.sql new file mode 100644 index 0000000..1ec1bf7 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectAll.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectLimit.sql ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectLimit.sql b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectLimit.sql new file mode 100644 index 0000000..7173101 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/queries/TestPgSQLSimpleQueryTests/testSelectLimit.sql @@ -0,0 +1 @@ +SELECT * FROM LINEITEM LIMIT 3; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenDates.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenDates.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenDates.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenDates.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenNumbers.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenNumbers.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenNumbers.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testBetweenNumbers.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCaseWhenFilter.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCaseWhenFilter.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCaseWhenFilter.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCaseWhenFilter.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCountAsterisk.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCountAsterisk.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCountAsterisk.result new file mode 100644 index 0000000..7044801 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCountAsterisk.result @@ -0,0 +1,3 @@ +?count +------------------------------- +5 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCtasToHdfs.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCtasToHdfs.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCtasToHdfs.result new file mode 100644 index 0000000..dd34c54 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testCtasToHdfs.result @@ -0,0 +1,7 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a +3,2,1798,1,45.0,54058.05,0.06,0.0,R,F,1994-02-02,1994-01-04,1994-02-23,NONE,AIR,ongside of the furiously brave acco +3,3,6540,2,49.0,46796.47,0.1,0.0,R,F,1993-11-09,1993-12-20,1993-11-24,TAKE BACK RETURN,RAIL,unusual accounts. eve http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testDateTimeTypes.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testDateTimeTypes.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testDateTimeTypes.result new file mode 100644 index 0000000..cd68a38 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testDateTimeTypes.result @@ -0,0 +1,6 @@ +date_field,time_field,ts_field +------------------------------- +1980-04-01,01:50:27,1980-04-01 01:50:27 +1984-01-05,02:45:31,1984-01-05 02:45:31 +1984-01-15,14:12:58,1984-01-15 14:12:58 +2015-03-21,08:11:01,2015-03-21 08:11:01 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFixedLengthFields.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFixedLengthFields.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFixedLengthFields.result new file mode 100644 index 0000000..ae8384d --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFixedLengthFields.result @@ -0,0 +1,5 @@ +l_shipinstruct,l_shipmode +------------------------------- +TAKE BACK RETURN,RAIL +NONE,AIR +TAKE BACK RETURN,RAIL http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFunctionWithinFilter.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFunctionWithinFilter.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFunctionWithinFilter.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testFunctionWithinFilter.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithLiterals.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithLiterals.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithLiterals.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithLiterals.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithNumbers.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithNumbers.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithNumbers.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testInPredicateWithNumbers.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testProjectedColumns.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testProjectedColumns.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testProjectedColumns.result new file mode 100644 index 0000000..bb3f58d --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testProjectedColumns.result @@ -0,0 +1,5 @@ +l_orderkey,l_shipdate +------------------------------- +2,1997-01-28 +3,1994-02-02 +3,1993-11-09 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testQueryWithConnProperties.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testQueryWithConnProperties.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testQueryWithConnProperties.result new file mode 100644 index 0000000..2eb253e --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testQueryWithConnProperties.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a +3,2,1798,1,45.0,54058.05,0.06,0.0,R,F,1994-02-02,1994-01-04,1994-02-23,NONE,AIR,ongside of the furiously brave acco +3,3,6540,2,49.0,46796.47,0.1,0.0,R,F,1993-11-09,1993-12-20,1993-11-24,TAKE BACK RETURN,RAIL,unusual accounts. eve http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testSimpleFilter.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testSimpleFilter.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testSimpleFilter.result new file mode 100644 index 0000000..2eb253e --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testSimpleFilter.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a +3,2,1798,1,45.0,54058.05,0.06,0.0,R,F,1994-02-02,1994-01-04,1994-02-23,NONE,AIR,ongside of the furiously brave acco +3,3,6540,2,49.0,46796.47,0.1,0.0,R,F,1993-11-09,1993-12-20,1993-11-24,TAKE BACK RETURN,RAIL,unusual accounts. eve http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q1.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q1.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q1.result new file mode 100644 index 0000000..3020f56 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q1.result @@ -0,0 +1,4 @@ +l_returnflag,l_linestatus,sum_qty,sum_base_price,sum_disc_price,sum_charge,avg_qty,avg_price,avg_disc,count_order +------------------------------- +N,O,91.0,111845.85,106860.63639999999,112012.46995200001,30.333333333333332,37281.950000000004,0.043333333333333335,3 +R,F,94.0,100854.52,92931.39000000001,92931.39000000001,47.0,50427.26,0.08,2 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part.result new file mode 100644 index 0000000..64d8e12 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part.result @@ -0,0 +1,3 @@ +s_acctbal,s_name,n_name,p_partkey,p_mfgr,s_address,s_phone,s_comment,ps_supplycost,r_name,p_type,p_size +------------------------------- +4192.4,Supplier#000000003,ARGENTINA,2,Manufacturer#1,q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3,11-383-516-1199,blithely silent requests after the express dependencies are sl,1.01,AMERICA,LARGE BRUSHED BRASS,15 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.result new file mode 100644 index 0000000..64d8e12 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q2_Part_MixedStorage.result @@ -0,0 +1,3 @@ +s_acctbal,s_name,n_name,p_partkey,p_mfgr,s_address,s_phone,s_comment,ps_supplycost,r_name,p_type,p_size +------------------------------- +4192.4,Supplier#000000003,ARGENTINA,2,Manufacturer#1,q1,G3Pj6OjIuUYfUoH18BFTKP5aU9bEV3,11-383-516-1199,blithely silent requests after the express dependencies are sl,1.01,AMERICA,LARGE BRUSHED BRASS,15 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q3.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q3.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q3.result new file mode 100644 index 0000000..2ad8a05 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q3.result @@ -0,0 +1,5 @@ +l_orderkey,revenue,o_orderdate,o_shippriority +------------------------------- +3,92931.39000000001,1993-10-14,0 +1,62166.1764,1996-01-02,0 +2,44694.46,1996-12-01,0 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q5.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q5.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q5.result new file mode 100644 index 0000000..09f3cad --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testTPCH_Q5.result @@ -0,0 +1,27 @@ +n_name,revenue +------------------------------- +ROMANIA,1798128.2 +SAUDI ARABIA,1798128.2 +IRAQ,1798128.2 +UNITED STATES,1798128.2 +EGYPT,1798128.2 +ETHIOPIA,1798128.2 +ALGERIA,1798128.2 +IRAN,1798128.2 +MOZAMBIQUE,1798128.2 +KENYA,1798128.2 +VIETNAM,1798128.2 +MOROCCO,1798128.2 +GERMANY,1798128.2 +PERU,1798128.2 +CANADA,1798128.2 +INDONESIA,1798128.2 +JAPAN,1798128.2 +INDIA,1798128.2 +CHINA,1798128.2 +FRANCE,1798128.2 +UNITED KINGDOM,1798128.2 +BRAZIL,1798128.2 +RUSSIA,1798128.2 +JORDAN,1798128.2 +ARGENTINA,1798128.2 http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testVariableLengthFields.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testVariableLengthFields.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testVariableLengthFields.result new file mode 100644 index 0000000..531402c --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLQueryTests/testVariableLengthFields.result @@ -0,0 +1,5 @@ +l_comment +------------------------------- +ven requests. deposits breach a +ongside of the furiously brave acco +unusual accounts. eve http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectAll.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectAll.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectAll.result new file mode 100644 index 0000000..dd34c54 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectAll.result @@ -0,0 +1,7 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a +3,2,1798,1,45.0,54058.05,0.06,0.0,R,F,1994-02-02,1994-01-04,1994-02-23,NONE,AIR,ongside of the furiously brave acco +3,3,6540,2,49.0,46796.47,0.1,0.0,R,F,1993-11-09,1993-12-20,1993-11-24,TAKE BACK RETURN,RAIL,unusual accounts. eve http://git-wip-us.apache.org/repos/asf/tajo/blob/144a02e3/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectLimit.result ---------------------------------------------------------------------- diff --git a/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectLimit.result b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectLimit.result new file mode 100644 index 0000000..a7f7d20 --- /dev/null +++ b/tajo-storage/tajo-storage-pgsql/src/test/resources/results/TestPgSQLSimpleQueryTests/testSelectLimit.result @@ -0,0 +1,5 @@ +l_orderkey,l_partkey,l_suppkey,l_linenumber,l_quantity,l_extendedprice,l_discount,l_tax,l_returnflag,l_linestatus,l_shipdate,l_commitdate,l_receiptdate,l_shipinstruct,l_shipmode,l_comment +------------------------------- +1,1,7706,1,17.0,21168.23,0.04,0.02,N,O,1996-03-13,1996-02-12,1996-03-22,DELIVER IN PERSON,TRUCK,egular courts above the +1,1,7311,2,36.0,45983.16,0.09,0.06,N,O,1996-04-12,1996-02-28,1996-04-20,TAKE BACK RETURN,MAIL,ly final dependencies: slyly bold +2,2,1191,1,38.0,44694.46,0.0,0.05,N,O,1997-01-28,1997-01-14,1997-02-02,TAKE BACK RETURN,RAIL,ven requests. deposits breach a
