Skip to content

Commit c1e930a

Browse files
committed
Fix return types in CalcitePPLTpchIT
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>
1 parent 3aa7ce7 commit c1e930a

8 files changed

Lines changed: 35 additions & 48 deletions

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLAggregationIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLAppendcolIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLBuiltinFunctionsNullIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLCaseFunctionIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLCastFunctionIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLCryptographicFunctionIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/remote/CalcitePPLDateTimeBuiltinFunctionIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
/*
2-
*
3-
* * Copyright OpenSearch Contributors
4-
* * SPDX-License-Identifier: Apache-2.0
5-
*
2+
* Copyright OpenSearch Contributors
3+
* SPDX-License-Identifier: Apache-2.0
64
*/
75

86
package org.opensearch.sql.calcite.remote;

integ-test/src/test/java/org/opensearch/sql/calcite/tpch/CalcitePPLTpchIT.java

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void testQ1() {
9292
schema("avg_qty", "double"),
9393
schema("avg_price", "double"),
9494
schema("avg_disc", "double"),
95-
schema("count_order", "long"));
95+
schema("count_order", "bigint"));
9696
verifyDataRows(
9797
actual,
9898
rows(
@@ -150,7 +150,7 @@ public void testQ2() {
150150
schema("s_acctbal", "double"),
151151
schema("s_name", "string"),
152152
schema("n_name", "string"),
153-
schema("p_partkey", "long"),
153+
schema("p_partkey", "bigint"),
154154
schema("p_mfgr", "string"),
155155
schema("s_address", "string"),
156156
schema("s_phone", "string"),
@@ -164,10 +164,10 @@ public void testQ3() {
164164
JSONObject actual = executeQuery(ppl);
165165
verifySchemaInOrder(
166166
actual,
167-
schema("l_orderkey", "long"),
167+
schema("l_orderkey", "bigint"),
168168
schema("revenue", "double"),
169169
schema("o_orderdate", "timestamp"),
170-
schema("o_shippriority", "integer"));
170+
schema("o_shippriority", "int"));
171171
verifyDataRows(
172172
actual,
173173
rows(1637, 164224.9253, "1995-02-08 00:00:00", 0),
@@ -184,7 +184,8 @@ public void testQ3() {
184184
public void testQ4() {
185185
String ppl = loadFromFile("tpch/queries/q4.ppl");
186186
JSONObject actual = executeQuery(ppl);
187-
verifySchemaInOrder(actual, schema("o_orderpriority", "string"), schema("order_count", "long"));
187+
verifySchemaInOrder(
188+
actual, schema("o_orderpriority", "string"), schema("order_count", "bigint"));
188189
verifyDataRows(
189190
actual,
190191
rows("1-URGENT", 9),
@@ -217,15 +218,15 @@ public void testQ7() {
217218
actual,
218219
schema("supp_nation", "string"),
219220
schema("cust_nation", "string"),
220-
schema("l_year", "integer"),
221+
schema("l_year", "int"),
221222
schema("revenue", "double"));
222223
verifyNumOfRows(actual, 0);
223224
}
224225

225226
public void testQ8() {
226227
String ppl = loadFromFile("tpch/queries/q8.ppl");
227228
JSONObject actual = executeQuery(ppl);
228-
verifySchemaInOrder(actual, schema("o_year", "integer"), schema("mkt_share", "double"));
229+
verifySchemaInOrder(actual, schema("o_year", "int"), schema("mkt_share", "double"));
229230
verifyDataRows(actual, rows(1995, 0.0), rows(1996, 0.0));
230231
}
231232

@@ -236,7 +237,7 @@ public void testQ9() {
236237
verifySchemaInOrder(
237238
actual,
238239
schema("nation", "string"),
239-
schema("o_year", "integer"),
240+
schema("o_year", "int"),
240241
schema("sum_profit", "double"));
241242
verifyNumOfRows(actual, 60);
242243
}
@@ -247,7 +248,7 @@ public void testQ10() {
247248
JSONObject actual = executeQuery(ppl);
248249
verifySchemaInOrder(
249250
actual,
250-
schema("c_custkey", "long"),
251+
schema("c_custkey", "bigint"),
251252
schema("c_name", "string"),
252253
schema("revenue", "double"),
253254
schema("c_acctbal", "double"),
@@ -274,7 +275,7 @@ public void testQ10() {
274275
public void testQ11() {
275276
String ppl = loadFromFile("tpch/queries/q11.ppl");
276277
JSONObject actual = executeQuery(ppl);
277-
verifySchemaInOrder(actual, schema("ps_partkey", "long"), schema("value", "double"));
278+
verifySchemaInOrder(actual, schema("ps_partkey", "bigint"), schema("value", "double"));
278279
verifyNumOfRows(actual, 0);
279280
}
280281

@@ -285,16 +286,16 @@ public void testQ12() {
285286
verifySchemaInOrder(
286287
actual,
287288
schema("l_shipmode", "string"),
288-
schema("high_line_count", "integer"),
289-
schema("low_line_count", "integer"));
289+
schema("high_line_count", "int"),
290+
schema("low_line_count", "int"));
290291
verifyDataRows(actual, rows("MAIL", 5, 5), rows("SHIP", 5, 10));
291292
}
292293

293294
@Test
294295
public void testQ13() {
295296
String ppl = loadFromFile("tpch/queries/q13.ppl");
296297
JSONObject actual = executeQuery(ppl);
297-
verifySchemaInOrder(actual, schema("c_count", "long"), schema("custdist", "long"));
298+
verifySchemaInOrder(actual, schema("c_count", "bigint"), schema("custdist", "bigint"));
298299
verifyDataRows(
299300
actual,
300301
rows(0, 50),
@@ -340,7 +341,7 @@ public void testQ15() {
340341
JSONObject actual = executeQuery(ppl);
341342
verifySchemaInOrder(
342343
actual,
343-
schema("s_suppkey", "long"),
344+
schema("s_suppkey", "bigint"),
344345
schema("s_name", "string"),
345346
schema("s_address", "string"),
346347
schema("s_phone", "string"),
@@ -358,8 +359,8 @@ public void testQ16() {
358359
actual,
359360
schema("p_brand", "string"),
360361
schema("p_type", "string"),
361-
schema("p_size", "integer"),
362-
schema("supplier_cnt", "long"));
362+
schema("p_size", "int"),
363+
schema("supplier_cnt", "bigint"));
363364
verifyDataRows(
364365
actual,
365366
rows("Brand#11", "PROMO ANODIZED TIN", 45, 4),
@@ -428,8 +429,8 @@ public void testQ18() {
428429
verifySchemaInOrder(
429430
actual,
430431
schema("c_name", "string"),
431-
schema("c_custkey", "long"),
432-
schema("o_orderkey", "long"),
432+
schema("c_custkey", "bigint"),
433+
schema("o_orderkey", "bigint"),
433434
schema("o_orderdate", "timestamp"),
434435
schema("o_totalprice", "double"),
435436
schema("sum(l_quantity)", "double"));
@@ -471,7 +472,7 @@ public void testQ20() {
471472
public void testQ21() {
472473
String ppl = loadFromFile("tpch/queries/q21.ppl");
473474
JSONObject actual = executeQuery(ppl);
474-
verifySchemaInOrder(actual, schema("s_name", "string"), schema("numwait", "long"));
475+
verifySchemaInOrder(actual, schema("s_name", "string"), schema("numwait", "bigint"));
475476
verifyNumOfRows(actual, 0);
476477
}
477478

@@ -482,7 +483,7 @@ public void testQ22() {
482483
verifySchemaInOrder(
483484
actual,
484485
schema("cntrycode", "string"),
485-
schema("numcust", "long"),
486+
schema("numcust", "bigint"),
486487
schema("totacctbal", "double"));
487488
verifyDataRows(
488489
actual,

0 commit comments

Comments
 (0)