You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "siddharthteotia (via GitHub)" <gi...@apache.org> on 2023/04/11 08:07:00 UTC

[GitHub] [pinot] siddharthteotia commented on a diff in pull request #10565: LOCAL_JOIN Operator

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


##########
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();
+    }
+    if (_dataSource.getTableName() != null) {
+      return _dataSource.getTableName();
+    }
+    assert _dataSource.getJoin() != null;
+    return _dataSource.getJoin().getLeftTableName();

Review Comment:
   Not sure I follow this. Why should this return left table name in case of JOIN query ?



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org