This is an automated email from the ASF dual-hosted git repository.
siddteotia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 150a6eafd2 adding in select test list (#9823)
150a6eafd2 is described below
commit 150a6eafd2625caf1c2148cfc890e8aabd513b50
Author: Rong Rong <[email protected]>
AuthorDate: Thu Nov 17 07:22:11 2022 -0800
adding in select test list (#9823)
Co-authored-by: Rong Rong <[email protected]>
---
.../runtime/queries/ResourceBasedQueriesTest.java | 1 +
.../test/resources/queries/SelectExpressions.json | 42 ++++++++++++++++++++++
2 files changed, 43 insertions(+)
diff --git
a/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/queries/ResourceBasedQueriesTest.java
b/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/queries/ResourceBasedQueriesTest.java
index f9de64c8bc..690406025b 100644
---
a/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/queries/ResourceBasedQueriesTest.java
+++
b/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/queries/ResourceBasedQueriesTest.java
@@ -62,6 +62,7 @@ public class ResourceBasedQueriesTest extends
QueryRunnerTestBase {
"BasicQuery.json",
"SpecialSyntax.json",
"LexicalStructure.json",
+ "SelectExpressions.json",
"ValueExpressions.json",
"NumericTypes.json"
);
diff --git
a/pinot-query-runtime/src/test/resources/queries/SelectExpressions.json
b/pinot-query-runtime/src/test/resources/queries/SelectExpressions.json
new file mode 100644
index 0000000000..57c0b09f1a
--- /dev/null
+++ b/pinot-query-runtime/src/test/resources/queries/SelectExpressions.json
@@ -0,0 +1,42 @@
+{
+ "select_expression_test": {
+ "tables": {
+ "tbl1": {
+ "schema":[
+ {"name": "intCol", "type": "INT"},
+ {"name": "longCol", "type": "LONG"},
+ {"name": "floatCol", "type": "FLOAT"},
+ {"name": "doubleCol", "type": "DOUBLE"},
+ {"name": "strCol", "type": "STRING"}
+ ],
+ "inputs": [
+ [1, 8, 3.0, 5.176518e16, "lyons"],
+ [2, 9, 4.0, 4.608155e11, "onan"],
+ [3, 14, 5.0, 1.249261e11, "rudvalis"],
+ [4, 21, 6.0, 8.677557e19, "janko"],
+ [1, 41, 2.0, 4.15478e33, "baby"],
+ [2, 46, 1.0, 8.08017e53, "monster"]
+ ]
+ },
+ "tbl2": {
+ "schema":[
+ {"name": "intCol", "type": "INT"},
+ {"name": "strCol", "type": "STRING"}
+ ],
+ "inputs": [
+ [1, "foo"],
+ [2, "bar"]
+ ]
+ }
+ },
+ "queries": [
+ { "sql": "SELECT intCol, longCol, doubleCol, strCol FROM {tbl1}"},
+ { "sql": "SELECT {tbl1}.intCol, {tbl2}.strCol FROM {tbl1}, {tbl2} WHERE
{tbl1}.intCol = {tbl2}.intCol"},
+ { "sql": "SELECT {tbl1}.*, {tbl2}.strCol FROM {tbl1}, {tbl2} WHERE
{tbl1}.intCol = {tbl2}.intCol"},
+ { "sql": "SELECT intCol as \"value\", doubleCol + floatCol AS \"sum\"
FROM {tbl1}"},
+ { "sql": "SELECT intCol as \"from\" FROM {tbl1}"},
+ { "sql": "SELECT intCol as key, SUM(doubleCol + floatCol) AS aggSum FROM
{tbl1} GROUP BY intCol"},
+ { "sql": "SELECT a.intCol as key, SUM(a.doubleCol + b.intCol) AS aggSum
FROM {tbl1} AS a JOIN {tbl2} AS b ON a.intCol = b.intCol GROUP BY a.intCol"}
+ ]
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]