siddharthteotia commented on code in PR #10565:
URL: https://github.com/apache/pinot/pull/10565#discussion_r1162810575


##########
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java:
##########
@@ -144,20 +141,34 @@ private QueryContext(@Nullable String tableName, 
@Nullable QueryContext subquery
     _explain = explain;
   }
 
+  public DataSourceContext getDataSource() {
+    return _dataSource;
+  }
+
   /**
    * Returns the table name.
-   * NOTE: on the broker side, table name might be {@code null} when subquery 
is available.
    */
   public String getTableName() {
-    return _tableName;
+    if (_dataSource.getSubquery() != null) {
+      return _dataSource.getSubquery().getTableName();

Review Comment:
   So this handles the Standard SQL subquery where the inner query refers to 
the same table as outer query ?
   
   How will this handle the generic subquery support (in multi stage engine) or 
is this specific to `IN_SUBQUERY` support in existing engine ? 



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