krishan1390 commented on code in PR #15244:
URL: https://github.com/apache/pinot/pull/15244#discussion_r1992960652


##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/MultiStageEngineIntegrationTest.java:
##########
@@ -1596,6 +1606,32 @@ public void testNumServersQueried() throws Exception {
   }
 
   @Test
+  public void testLookupJoin() throws Exception {
+
+    Schema lookupTableSchema = createSchema(DIM_TABLE_SCHEMA_PATH);
+    addSchema(lookupTableSchema);
+    TableConfig tableConfig = createTableConfig(DIM_TABLE_TABLE_CONFIG_PATH);
+    addTableConfig(tableConfig);
+    createAndUploadSegmentFromFile(tableConfig, lookupTableSchema, 
DIM_TABLE_DATA_PATH, FileFormat.CSV,
+        DIM_NUMBER_OF_RECORDS, 60_000);
+
+    Schema primaryTableSchema = createSchema(PRIMARY_TABLE_SCHEMA_PATH);
+    addSchema(primaryTableSchema);
+    TableConfig primaryTableConfig = 
createTableConfig(PRIMARY_TABLE_TABLE_CONFIG_PATH);
+    addTableConfig(primaryTableConfig);
+    createAndUploadSegmentFromFile(primaryTableConfig, primaryTableSchema, 
PRIMARY_TABLE_DATA_PATH, FileFormat.CSV,
+        PRIMARY_NUMBER_OF_RECORDS, 60_000);
+
+    String query = "select /*+ joinOptions(join_strategy='lookup') */ yearID, 
teamName from baseballStats "
+        + "join dimBaseballTeams ON baseballStats.teamID = 
dimBaseballTeams.teamID where playerId = 'aardsda01'";
+    JsonNode jsonNode = postQuery(query);
+    long result = jsonNode.get("resultTable").get("rows").size();
+    assertEquals(result, 3);

Review Comment:
   thanks. 
   
   The LOOKUP_JOIN operator is a robust verification. Verified that this check 
fails if I remove `/* joinOptions(join_strategy='lookup') */` so its helpful. 
Added this. 
   
   The explain plan / implementation plan verifications are string pattern 
matching verifications. I think better to not verify explain plan / 
implementation plan in this integration test because its part of details of how 
lookup join is implemented. And any changes there would affect this test case 
unncessarily. 
   
   Let me know if thats fine or if you have other opinions. 



-- 
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