walterddr commented on code in PR #9823:
URL: https://github.com/apache/pinot/pull/9823#discussion_r1025402079


##########
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"},

Review Comment:
   yes but this demonstrates aliasing via `tbl.col` works and can properly 
identify same column name in different table



##########
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"},

Review Comment:
   yes but this demonstrates referencing via `tbl.col` works and can properly 
identify same column name in different table



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to