hi, Jun Zhang. Currently, the rule `PushLimitIntoTableSourceScanRule` captures the structure that the `FlinkLogicalSort` node is the parent of the `FlinkLogicalTableSourceScan`.
In your case, we have a Calc node between the Sort node and the Scan node, which makes the rule fails to apply. Maybe we can add a rule to transpose between the Sort and Calc. Best, Shengkai Jun Zhang <zhangjunemail...@gmail.com> 于2020年12月28日周一 下午5:31写道: > when I query hive table by sql, like this `select * from hivetable where id > = 1 limit 1`, I found that the limit push down is invalid, is it a bug or > was it designed like this? > > if the sql is 'select * from hivetable limit 1' ,it is ok > > thanks >