This only affects the Blink planner. The legacy planner works fine.
With Orders as a TableSource, and Orders2 as a Table with the same content:
This works (TableSource on the query side):
While this does not (Table on the query side):
Throwing an NPE in FlinkRelBuilder, called from LogicalCorrelateToJoinFromTemporalTableFunctionRule. Attached is Java code for reproduction, along with the full log and stacktrace, and a pom.xml.
EDIT: This may not be Table vs TableSource, maybe more a projection or a decorrelate issue? Don't know how the planner works well enough to characterize it better.