ehds commented on code in PR #5288:
URL: https://github.com/apache/calcite/pull/5288#discussion_r4094816507
##########
core/src/main/java/org/apache/calcite/rel/metadata/RelMdTableReferences.java:
##########
@@ -159,11 +160,25 @@ public Set<RelTableRef> getTableReferences(TableScan rel,
RelMetadataQuery mq) {
* references.
*/
public @Nullable Set<RelTableRef> getTableReferences(SetOp rel,
RelMetadataQuery mq) {
+ return getTableReferences(rel.getInputs(), mq);
+ }
+
+ /**
+ * Table references from TableFunctionScan.
+ */
+ public @Nullable Set<RelTableRef> getTableReferences(TableFunctionScan rel,
+ RelMetadataQuery mq) {
+ return getTableReferences(rel.getInputs(), mq);
Review Comment:
Good catch. `SubQueryRemoveRule` already handles a RexSubQuery in
TableFunctionScan.getCall(). I’ve added the corresponding table-reference
handling and tests.
--
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]